Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(service-portal): sp list submitted #16383

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libs/portals/admin/signature-collection/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ export const m = defineMessages({
defaultMessage: 'Læsa söfnun',
description: '',
},
lockListDescription: {
id: 'admin-portal.signature-collection:lockListDescription',
defaultMessage:
'Ýtið hér ef framboð hefur skilað inn framboðsgögnum fyrir lok framboðsfrest',
description: '',
},
lockListSuccess: {
id: 'admin-portal.signature-collection:lockListSuccess',
defaultMessage: 'Tókst að læsa söfnun',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ActionLockList = ({
closeButtonLabel={''}
>
<Box marginTop={5}>
<Text>{formatMessage(m.lockList)}</Text>
<Text>{formatMessage(m.lockListDescription)}</Text>
<Box display="flex" justifyContent="flexEnd" marginTop={5}>
<Button
iconType="outline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ export const m = defineMessages({
defaultMessage: 'Ógilt meðmæli',
description: '',
},
listSubmitted: {
id: 'sp.signatureCollection:listSubmitted',
defaultMessage: 'Lista skilað',
description: '',
},

/* Signee View */
noCollectionIsActive: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,58 +106,73 @@ const OwnerView = ({
withLabel: true,
}}
eyebrow={list.title.split(' - ')[0]}
cta={{
label: formatMessage(m.viewList),
variant: 'text',
icon: 'arrowForward',
onClick: () => {
const path = location.pathname.includes('fyrirtaeki')
? SignatureCollectionPaths.CompanyViewParliamentaryList
: SignatureCollectionPaths.ViewParliamentaryList
navigate(path.replace(':id', list.id), {
state: {
collectionId: currentCollection?.id || '',
},
})
},
}}
tag={{
label: 'Cancel collection',
renderTag: () => (
<DialogPrompt
baseId="cancel_collection_dialog"
title={
formatMessage(m.cancelCollectionButton) +
' - ' +
list.area?.name
cta={
list.active
? {
label: formatMessage(m.viewList),
variant: 'text',
icon: 'arrowForward',
onClick: () => {
const path = location.pathname.includes('fyrirtaeki')
? SignatureCollectionPaths.CompanyViewParliamentaryList
: SignatureCollectionPaths.ViewParliamentaryList
navigate(path.replace(':id', list.id), {
state: {
collectionId: currentCollection?.id || '',
},
})
},
}
description={formatMessage(
m.cancelCollectionModalMessage,
)}
ariaLabel="delete"
disclosureElement={
<Tag outlined variant="red">
<Box display="flex" alignItems="center">
<Icon icon="trash" size="small" type="outline" />
</Box>
</Tag>
: undefined
}
tag={
list.active
? {
label: 'Cancel collection',
renderTag: () => (
<DialogPrompt
baseId="cancel_collection_dialog"
title={
formatMessage(m.cancelCollectionButton) +
' - ' +
list.area?.name
}
description={formatMessage(
m.cancelCollectionModalMessage,
)}
ariaLabel="delete"
disclosureElement={
<Tag outlined variant="red">
<Box display="flex" alignItems="center">
<Icon
icon="trash"
size="small"
type="outline"
/>
</Box>
</Tag>
}
onConfirm={() => {
onCancelCollection(list.id)
}}
buttonTextConfirm={formatMessage(
m.cancelCollectionModalConfirmButton,
)}
buttonPropsConfirm={{
variant: 'primary',
colorScheme: 'destructive',
}}
buttonTextCancel={formatMessage(
m.cancelCollectionModalCancelButton,
)}
/>
),
}
onConfirm={() => {
onCancelCollection(list.id)
}}
buttonTextConfirm={formatMessage(
m.cancelCollectionModalConfirmButton,
)}
buttonPropsConfirm={{
variant: 'primary',
colorScheme: 'destructive',
}}
buttonTextCancel={formatMessage(
m.cancelCollectionModalCancelButton,
)}
/>
),
}}
: {
label: formatMessage(m.listSubmitted),
variant: 'blueberry',
}
}
/>
</Box>
))
Expand Down