Skip to content
Snippets Groups Projects
Commit b8a9b9c9 authored by Bogdan Cochior's avatar Bogdan Cochior
Browse files

fix(heInvite): hide actions if HE is Unassigned

parent 46dc8157
No related branches found
No related tags found
1 merge request!43Sprint #19
...@@ -14,42 +14,43 @@ const PersonInvitation = ({ ...@@ -14,42 +14,43 @@ const PersonInvitation = ({
}) => ( }) => (
<Root {...rest}> <Root {...rest}>
<Text>{name}</Text> <Text>{name}</Text>
{!hasAnswer && ( {!hasAnswer &&
<Fragment> name !== 'Unassigned' && (
<OpenModal <Fragment>
isFetching={isFetching} <OpenModal
onConfirm={resendInvitation} isFetching={isFetching}
title="Are you sure you want to resend the invitation?" onConfirm={resendInvitation}
> title="Are you sure you want to resend the invitation?"
{showModal => ( >
<IconButton {showModal => (
icon="refresh-cw" <IconButton
iconSize={2} icon="refresh-cw"
ml={2} iconSize={2}
onClick={showModal} ml={2}
secondary onClick={showModal}
/> secondary
)} />
</OpenModal> )}
<OpenModal </OpenModal>
confirmText="Remove invite" <OpenModal
isFetching={isFetching} confirmText="Remove invite"
onConfirm={revokeInvitation} isFetching={isFetching}
subtitle="Clicking ‘Remove’ will allow you to invite a different Handling Editor" onConfirm={revokeInvitation}
title="Remove invitation to Handling Editor?" subtitle="Clicking ‘Remove’ will allow you to invite a different Handling Editor"
> title="Remove invitation to Handling Editor?"
{showModal => ( >
<IconButton {showModal => (
icon="x-circle" <IconButton
iconSize={2} icon="x-circle"
ml={2} iconSize={2}
onClick={showModal} ml={2}
secondary onClick={showModal}
/> secondary
)} />
</OpenModal> )}
</Fragment> </OpenModal>
)} </Fragment>
)}
</Root> </Root>
) )
......
...@@ -9,7 +9,7 @@ const generatePasswordHash = () => ...@@ -9,7 +9,7 @@ const generatePasswordHash = () =>
).join('') ).join('')
export const setAdmin = values => { export const setAdmin = values => {
const newValues = { ...values } const newValues = { ...values, isActive: true }
if (newValues.roles && newValues.roles.includes('admin')) { if (newValues.roles && newValues.roles.includes('admin')) {
newValues.admin = true newValues.admin = true
} else { } else {
......
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