Skip to content

Commit

Permalink
Merge branch 'main' into service-portal/subpoena-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Oct 4, 2024
2 parents 4562a76 + babf669 commit 030a1ad
Show file tree
Hide file tree
Showing 16 changed files with 330 additions and 129 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 21 additions & 6 deletions libs/portals/admin/signature-collection/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const m = defineMessages({
},
filter: {
id: 'admin-portal.signature-collection:filter',
defaultMessage: 'Opna síu',
defaultMessage: 'Sía',
description: '',
},
filterBy: {
Expand Down Expand Up @@ -110,9 +110,14 @@ export const m = defineMessages({
defaultMessage: 'Hreinsa allar síur',
description: '',
},
typeOfSignee: {
id: 'admin-portal.signature-collection:typeOfSignee',
defaultMessage: 'Tegund meðmæla',
description: '',
},
createCollection: {
id: 'admin-portal.signature-collection:createCollection',
defaultMessage: 'Stofna söfnun',
defaultMessage: 'Stofna nýja meðmælasöfnun',
description: '',
},
createCollectionSuccess: {
Expand All @@ -128,7 +133,7 @@ export const m = defineMessages({
createCollectionModalDescription: {
id: 'admin-portal.signature-collection:createCollectionModalDescription',
defaultMessage:
'Til þess að stofna meðmælasöfnun þarf að slá inn kennitölu frambjóðs.',
'Til þess að stofna meðmælasöfnun þarf að slá inn kennitölu framboðs.',
description: '',
},
candidateNationalId: {
Expand All @@ -151,6 +156,11 @@ export const m = defineMessages({
defaultMessage: 'Lokadagur',
description: '',
},
editListEndTime: {
id: 'admin-portal.signature-collection:editListEndTime',
defaultMessage: 'Breyta',
description: '',
},
collectionTitle: {
id: 'admin-portal.signature-collection:collectionTitle',
defaultMessage: 'Forsetakosningar 2024',
Expand Down Expand Up @@ -245,13 +255,13 @@ export const m = defineMessages({
singleListIntro: {
id: 'admin-portal.signature-collection:singleListIntro',
defaultMessage:
'Hér birtast nöfn meðmælenda frambjóðandans. Hægt er að framlengja tímafrest söfnunarinnar og bæta við meðmælum af blaði.',
'Hér birtast nöfn meðmælenda framboðs. Hægt er að framlengja tímafrest söfnunarinnar og bæta við meðmælum af blaði.',
description: '',
},
singleListIntroManage: {
id: 'admin-portal.signature-collection:singleListIntroManage',
defaultMessage:
'Hér birtast nöfn meðmælenda frambjóðandans. Hægt er að leita að meðmælendum eftir nafni eða kennitölu.',
'Hér birtast nöfn meðmælenda framboðs. Hægt er að leita að meðmælendum eftir nafni eða kennitölu.',
description: '',
},
collectors: {
Expand Down Expand Up @@ -300,9 +310,14 @@ export const m = defineMessages({
defaultMessage: 'Leita eftir nafni eða kennitölu',
description: '',
},
searchNationalIdPlaceholder: {
id: 'admin-portal.signature-collection:searchNationalIdPlaceholder',
defaultMessage: 'Leita eftir kennitölu',
description: '',
},
sortBy: {
id: 'admin-portal.signature-collection:sortBy',
defaultMessage: 'Raða eftir',
defaultMessage: 'Raða',
description: '',
},
sortAlphabeticallyAsc: {
Expand Down
12 changes: 11 additions & 1 deletion libs/portals/admin/signature-collection/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,22 @@ export const countryAreas = [
{ value: 'Austfirðingafjórðungur', label: 'Austfirðingafjórðungur' },
]

export type Filters = {
export const signeeTypes = [
{ value: 'paper', label: 'Af blaði' },
{ value: 'digital', label: 'Rafræn' },
]

export type FiltersOverview = {
area: Array<string>
candidate: Array<string>
input: string
}

export type FiltersSigneeType = {
signeeType: Array<string>
pageNumber: Array<string>
}

export enum ListStatus {
Active = 'Active',
InReview = 'InReview',
Expand Down
24 changes: 21 additions & 3 deletions libs/portals/admin/signature-collection/src/module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,37 @@ export const signatureCollectionModule: PortalModule = {
{
name: m.signatureListsTitle,
path: SignatureCollectionPaths.ParliamentaryRoot,
element: <ParliamentaryRoot />,
element: (
<ParliamentaryRoot
allowedToProcess={props.userInfo.scopes.some(
(scope) => scope === AdminPortalScope.signatureCollectionProcess,
)}
/>
),
loader: listsLoader(props),
},
{
name: m.signatureListsConstituencyTitle,
path: SignatureCollectionPaths.ParliamentaryConstituency,
element: <ParliamentaryConstituency />,
element: (
<ParliamentaryConstituency
allowedToProcess={props.userInfo.scopes.some(
(scope) => scope === AdminPortalScope.signatureCollectionProcess,
)}
/>
),
loader: listsLoader(props),
},
{
name: m.singleList,
path: SignatureCollectionPaths.ParliamentaryConstituencyList,
element: <ParliamentaryList />,
element: (
<ParliamentaryList
allowedToProcess={props.userInfo.scopes.some(
(scope) => scope === AdminPortalScope.signatureCollectionProcess,
)}
/>
),
loader: listLoader(props),
},

Expand Down
Loading

0 comments on commit 030a1ad

Please sign in to comment.