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:
- source deploy.sh
- 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:
image: pubsweet/deployer:latest
stage: deploy
......
import * as validators from './formValidators'
export * from './utils'
export { default as withFilePreview } from './withFilePreview'
export * from './withFileDownload'
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) => {
try {
const user = await UserModel.findByEmail(email)
await teamHelper.setupTeam({ user, role, objectType: 'collection' })
invitationHelper.userId = user.id
let invitation = invitationHelper.getInvitation({
invitations: collection.invitations,
......@@ -89,6 +88,7 @@ module.exports = models => async (req, res) => {
}
invitation.invitedOn = Date.now()
await teamHelper.setupTeam({ user, role, objectType: 'collection' })
await collection.save()
await collectionHelper.addHandlingEditor({ user, invitation })
......
......@@ -47,7 +47,7 @@ import {
canOverrideTechnicalChecks,
getInvitationsWithReviewersForFragment,
} 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 { parseEicDecision, parseSearchParams, redirectToError } from './utils'
......@@ -200,7 +200,7 @@ export default compose(
fetchUpdatedCollection()
modalProps.hideModal()
})
.catch(() => modalProps.setModalError('Oops! Something went wrong.')),
.catch(handleError(modalProps.setModalError)),
revokeHE: ({
getCollection,
revokeHandlingEditor,
......@@ -214,7 +214,7 @@ export default compose(
getCollection({ id: collectionId })
modalProps.hideModal()
})
.catch(() => modalProps.setModalError('Oops! Something went wrong.')),
.catch(handleError(modalProps.setModalError)),
createRecommendation: ({
fragment,
collection,
......@@ -231,9 +231,7 @@ export default compose(
fetchUpdatedCollection()
modalProps.hideModal()
})
.catch(() => {
modalProps.setModalError('Oops! Something went wrong.')
})
.catch(handleError(modalProps.setModalError))
},
onHEResponse: ({
history,
......
......@@ -18,7 +18,7 @@ module.exports = dir => {
devServer: {
compress: true,
disableHostCheck: true,
public: 'styleguide.faraday.hindawi.com',
public: 'styleguide.review.hindawi.com',
},
entry: './src/index.js',
module: {
......
......@@ -78,7 +78,7 @@ module.exports = {
host: process.env.FTP_HOST,
port: 21,
localRoot: `./`,
remoteRoot: '/',
remoteRoot: '/BCA/',
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