Skip to content
Snippets Groups Projects
Commit f160f857 authored by Anca Ursachi's avatar Anca Ursachi
Browse files

fix(utilis(helpers)): Change error messages.

parent a8d8fe3d
No related branches found
No related tags found
3 merge requests!176Sprint 24,!171Sprint 24,!168Hin 845 revoke and assign he fix
...@@ -66,7 +66,7 @@ const PersonInvitation = ({ ...@@ -66,7 +66,7 @@ const PersonInvitation = ({
isFetching={isFetching} isFetching={isFetching}
modalKey={`remove-${id}`} modalKey={`remove-${id}`}
onConfirm={revokeInvitation} onConfirm={revokeInvitation}
subtitle={`Are you sure you want to remove ${email}? This decision will erase all data from the current fragment.`} subtitle="Deleting the handling editor at this moment will also remove all his work."
title="Revoke invitation?" title="Revoke invitation?"
> >
{showModal => ( {showModal => (
......
import { get, chain, find } from 'lodash' import { get, chain, find } from 'lodash'
export const handleError = fn => e => { export const handleError = fn => e => {
fn(get(JSON.parse(e.response), 'error', 'Oops! Something went wrong!')) const errorForAuthorWhenHEWasRevoked =
'Your Handling Editor was changed. A new handling editor will be assigned to your manuscript soon. Sorry for the inconvenience.'
let error = get(
JSON.parse(e.response),
'error',
'Oops! Something went wrong!',
)
if (error === 'No revision has been found.') {
error = errorForAuthorWhenHEWasRevoked
}
fn(error)
} }
export const getReportComments = ({ report, isPublic = false }) => export const getReportComments = ({ report, isPublic = false }) =>
......
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