From 41f5580c76436bbeef617d1f183a9f775de18082 Mon Sep 17 00:00:00 2001 From: andes-it Date: Mon, 14 Oct 2024 14:05:47 +0000 Subject: [PATCH] chore: nx format:write update dirty files --- .../signature-collection/src/lib/messages.ts | 3 +- .../screens/Parliamentary/OwnerView/index.tsx | 118 ++++++++++-------- 2 files changed, 67 insertions(+), 54 deletions(-) diff --git a/libs/portals/admin/signature-collection/src/lib/messages.ts b/libs/portals/admin/signature-collection/src/lib/messages.ts index 53828d6ed9aa..624895b9f682 100644 --- a/libs/portals/admin/signature-collection/src/lib/messages.ts +++ b/libs/portals/admin/signature-collection/src/lib/messages.ts @@ -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: { diff --git a/libs/service-portal/signature-collection/src/screens/Parliamentary/OwnerView/index.tsx b/libs/service-portal/signature-collection/src/screens/Parliamentary/OwnerView/index.tsx index 832bec09a9cd..23f020c6afc6 100644 --- a/libs/service-portal/signature-collection/src/screens/Parliamentary/OwnerView/index.tsx +++ b/libs/service-portal/signature-collection/src/screens/Parliamentary/OwnerView/index.tsx @@ -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: () => ( - { + 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={ - - - - - + : undefined + } + tag={ + list.active + ? { + label: 'Cancel collection', + renderTag: () => ( + + + + + + } + 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', + } + } /> ))