Skip to content

Commit

Permalink
chore: nx format:write update dirty files
Browse files Browse the repository at this point in the history
  • Loading branch information
andes-it committed Oct 14, 2024
1 parent 198d09e commit 41f5580
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 54 deletions.
3 changes: 2 additions & 1 deletion libs/portals/admin/signature-collection/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ export const m = defineMessages({
},
lockListDescription: {
id: 'admin-portal.signature-collection:lockListDescription',
defaultMessage: 'Ýtið hér ef framboð hefur skilað inn framboðsgögnum fyrir lok framboðsfrest',
defaultMessage:
'Ýtið hér ef framboð hefur skilað inn framboðsgögnum fyrir lok framboðsfrest',
description: '',
},
lockListSuccess: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,61 +106,73 @@ const OwnerView = ({
withLabel: true,
}}
eyebrow={list.title.split(' - ')[0]}
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 || '',
},
})
},
} : undefined}
tag={list.active ? {
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',
}}
: {
label: formatMessage(m.listSubmitted),
variant: 'blueberry',
}
}
/>
</Box>
))
Expand Down

0 comments on commit 41f5580

Please sign in to comment.