Skip to content
Snippets Groups Projects
Commit a1efe07c authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

Merge branch 'develop' of gitlab.coko.foundation:xpub/xpub-faraday into HIN-971

parents fdb6f4d1 b9182d06
No related branches found
No related tags found
2 merge requests!58Sprint #20 - Goal - Reviewers submit report,!54HIN-971: Reviewer respond to invitation
...@@ -138,6 +138,23 @@ deploy:qa: ...@@ -138,6 +138,23 @@ deploy:qa:
- source deploy.sh - source deploy.sh
- create_deployment - create_deployment
deploy:styleguide:
image: pubsweet/deployer:latest
stage: deploy
when: manual
only:
- develop
variables:
PACKAGE_NAME: xpub-styleguide
IMAGE_REPO: $CI_ECR_URL
IMAGE_TAG: latest
environment:
name: styleguide
url: http://styleguide.review.hindawi.com
script:
- source deploy.sh
- create_deployment
deploy:staging: deploy:staging:
image: pubsweet/deployer:latest image: pubsweet/deployer:latest
stage: deploy stage: deploy
......
import * as validators from './formValidators' import * as validators from './formValidators'
export * from './utils'
export { default as withFilePreview } from './withFilePreview' export { default as withFilePreview } from './withFilePreview'
export * from './withFileDownload' export * from './withFileDownload'
export { default as withNativeFileDrop } from './withNativeFileDrop' export { default as withNativeFileDrop } from './withNativeFileDrop'
......
import { get } from 'lodash'
export const handleError = fn => e => {
fn(get(JSON.parse(e.response), 'error', 'Oops! Something went wrong!'))
}
...@@ -69,7 +69,6 @@ module.exports = models => async (req, res) => { ...@@ -69,7 +69,6 @@ module.exports = models => async (req, res) => {
try { try {
const user = await UserModel.findByEmail(email) const user = await UserModel.findByEmail(email)
await teamHelper.setupTeam({ user, role, objectType: 'collection' })
invitationHelper.userId = user.id invitationHelper.userId = user.id
let invitation = invitationHelper.getInvitation({ let invitation = invitationHelper.getInvitation({
invitations: collection.invitations, invitations: collection.invitations,
...@@ -89,6 +88,7 @@ module.exports = models => async (req, res) => { ...@@ -89,6 +88,7 @@ module.exports = models => async (req, res) => {
} }
invitation.invitedOn = Date.now() invitation.invitedOn = Date.now()
await teamHelper.setupTeam({ user, role, objectType: 'collection' })
await collection.save() await collection.save()
await collectionHelper.addHandlingEditor({ user, invitation }) await collectionHelper.addHandlingEditor({ user, invitation })
......
...@@ -47,7 +47,7 @@ import { ...@@ -47,7 +47,7 @@ import {
canOverrideTechnicalChecks, canOverrideTechnicalChecks,
getInvitationsWithReviewersForFragment, getInvitationsWithReviewersForFragment,
} from 'pubsweet-component-faraday-selectors' } from 'pubsweet-component-faraday-selectors'
import { RemoteOpener } from 'pubsweet-component-faraday-ui' import { RemoteOpener, handleError } from 'pubsweet-component-faraday-ui'
import ManuscriptLayout from './ManuscriptLayout' import ManuscriptLayout from './ManuscriptLayout'
import { parseEicDecision, parseSearchParams, redirectToError } from './utils' import { parseEicDecision, parseSearchParams, redirectToError } from './utils'
...@@ -200,7 +200,7 @@ export default compose( ...@@ -200,7 +200,7 @@ export default compose(
fetchUpdatedCollection() fetchUpdatedCollection()
modalProps.hideModal() modalProps.hideModal()
}) })
.catch(() => modalProps.setModalError('Oops! Something went wrong.')), .catch(handleError(modalProps.setModalError)),
revokeHE: ({ revokeHE: ({
getCollection, getCollection,
revokeHandlingEditor, revokeHandlingEditor,
...@@ -214,7 +214,7 @@ export default compose( ...@@ -214,7 +214,7 @@ export default compose(
getCollection({ id: collectionId }) getCollection({ id: collectionId })
modalProps.hideModal() modalProps.hideModal()
}) })
.catch(() => modalProps.setModalError('Oops! Something went wrong.')), .catch(handleError(modalProps.setModalError)),
createRecommendation: ({ createRecommendation: ({
fragment, fragment,
collection, collection,
...@@ -231,9 +231,7 @@ export default compose( ...@@ -231,9 +231,7 @@ export default compose(
fetchUpdatedCollection() fetchUpdatedCollection()
modalProps.hideModal() modalProps.hideModal()
}) })
.catch(() => { .catch(handleError(modalProps.setModalError))
modalProps.setModalError('Oops! Something went wrong.')
})
}, },
onHEResponse: ({ onHEResponse: ({
history, history,
......
...@@ -18,7 +18,7 @@ module.exports = dir => { ...@@ -18,7 +18,7 @@ module.exports = dir => {
devServer: { devServer: {
compress: true, compress: true,
disableHostCheck: true, disableHostCheck: true,
public: 'styleguide.faraday.hindawi.com', public: 'styleguide.review.hindawi.com',
}, },
entry: './src/index.js', entry: './src/index.js',
module: { module: {
......
...@@ -78,7 +78,7 @@ module.exports = { ...@@ -78,7 +78,7 @@ module.exports = {
host: process.env.FTP_HOST, host: process.env.FTP_HOST,
port: 21, port: 21,
localRoot: `./`, localRoot: `./`,
remoteRoot: '/', remoteRoot: '/BCA/',
exclude: ['*.js'], exclude: ['*.js'],
}, },
}, },
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment