Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/island-is/island.is into sp…
Browse files Browse the repository at this point in the history
…_petitions_exportlist
  • Loading branch information
albina committed Nov 14, 2024
2 parents a6c017e + c788e6a commit 67c8d44
Show file tree
Hide file tree
Showing 1,245 changed files with 17,999 additions and 1,981 deletions.
24 changes: 12 additions & 12 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/apps/application-system/ @island-is/norda-applications
/apps/web*/ @island-is/juni @island-is/stefna
/libs/application/ @island-is/norda-applications
/libs/service-portal/ @island-is/hugsmidjan
/libs/portals/my-pages/ @island-is/hugsmidjan
/libs/portals/admin/ @island-is/aranja
/libs/portals/core/ @island-is/aranja @island-is/hugsmidjan
/libs/shared/connected/ @island-is/stefna
Expand All @@ -36,13 +36,13 @@
/libs/clients/rsk/ @island-is/juni
/libs/clients/zendesk/ @island-is/juni
/libs/icelandic-names-registry/ @island-is/juni
/libs/service-portal/petitions/ @island-is/juni
/libs/service-portal/signature-collection/ @island-is/juni
/libs/service-portal/education/ @island-is/juni @island-is/hugsmidjan
/libs/service-portal/education-career/ @island-is/juni @island-is/hugsmidjan
/libs/service-portal/education-degree/ @island-is/juni @island-is/hugsmidjan
/libs/service-portal/education-license/ @island-is/juni @island-is/hugsmidjan
/libs/service-portal/education-student-assessment/ @island-is/juni @island-is/norda @island-is/hugsmidjan
/libs/portals/my-pages/petitions/ @island-is/juni
/libs/portals/my-pages/signature-collection/ @island-is/juni
/libs/portals/my-pages/education/ @island-is/juni @island-is/hugsmidjan
/libs/portals/my-pages/education-career/ @island-is/juni @island-is/hugsmidjan
/libs/portals/my-pages/education-degree/ @island-is/juni @island-is/hugsmidjan
/libs/portals/my-pages/education-license/ @island-is/juni @island-is/hugsmidjan
/libs/portals/my-pages/education-student-assessment/ @island-is/juni @island-is/norda @island-is/hugsmidjan
/libs/clients/driving-license/ @island-is/juni
/libs/clients/judicial-administration/ @island-is/juni
/libs/application/templates/announcement-of-death/ @island-is/juni
Expand Down Expand Up @@ -104,9 +104,9 @@ libs/clients/rsk/relationships/
/libs/clients/sessions @island-is/aranja
/libs/portals/shared-modules/delegations @island-is/aranja
/libs/portals/admin/ids-admin @island-is/aranja
/libs/service-portal/consent @island-is/aranja
/libs/service-portal/restrictions @island-is/aranja
/libs/service-portal/sessions @island-is/aranja
/libs/portals/my-pages/consent @island-is/aranja
/libs/portals/my-pages/restrictions @island-is/aranja
/libs/portals/my-pages/sessions @island-is/aranja
/apps/native/app/ @island-is/aranja-app
codemagic.yaml @island-is/aranja-app
/apps/web/public/.well-known/ @island-is/aranja-app
Expand Down Expand Up @@ -230,7 +230,7 @@ codemagic.yaml
/libs/application/template-api-modules/src/lib/modules/templates/data-protection-complaint/ @island-is/norda
/libs/shared/form-fields/ @island-is/norda @island-is/island-ui

/libs/service-portal/applications/ @island-is/norda-applications
/libs/portals/my-pages/applications/ @island-is/norda-applications
/libs/portals/admin/application-system/ @island-is/norda-applications
/libs/api/domains/application/ @island-is/norda-applications
/libs/api/domains/payment/ @island-is/norda-applications
Expand Down
27 changes: 6 additions & 21 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ updates:
directory: /
schedule:
interval: weekly
time: 02:00
time: '02:00'
day: saturday
timezone: Etc/UTC
labels:
Expand All @@ -17,25 +17,22 @@ updates:
prefix-development: chore(deps-dev)
open-pull-requests-limit: 2
groups:
# Group minor and patch updates together
minor-patch-dependencies:
patterns:
- '*'
update-types:
- minor
- patch
ignore:
# Ignore major updates as they might break things
- dependency-name: '*'
update-types: ['version-update:semver-major']
versioning-strategy: increase

# Infra npm dependencies
- package-ecosystem: npm
directory: /infra
schedule:
interval: weekly
time: 03:00
time: '03:00'
timezone: Etc/UTC
labels:
- automerge
Expand All @@ -45,26 +42,23 @@ updates:
prefix-development: chore(deps-infra)
open-pull-requests-limit: 2
groups:
# Group minor and patch updates together
minor-patch-dependencies:
patterns:
- '*'
update-types:
- minor
- patch
ignore:
# Ignore major updates as they might break things
- dependency-name: '*'
update-types: ['version-update:semver-major']
versioning-strategy: increase

# GitHub Actions
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly # Less frequent for Actions
interval: weekly
day: saturday
time: 04:00
time: '04:00'
timezone: Etc/UTC
labels:
- automerge
Expand All @@ -73,26 +67,23 @@ updates:
prefix: chore(ci)
open-pull-requests-limit: 2
groups:
# Group minor and patch updates together
minor-patch-dependencies:
patterns:
- '*'
update-types:
- minor
- patch
ignore:
# Ignore major updates as they might break things
- dependency-name: '*'
update-types: ['version-update:semver-major']
versioning-strategy: increase

# GitHub Actions npm dependencies
- package-ecosystem: npm
directory: /.github/actions/
schedule:
interval: weekly
day: saturday
time: 05:00
time: '05:00'
timezone: Etc/UTC
labels:
- automerge
Expand All @@ -101,26 +92,23 @@ updates:
prefix: chore(ci-deps)
open-pull-requests-limit: 2
groups:
# Group minor and patch updates together
minor-patch-dependencies:
patterns:
- '*'
update-types:
- minor
- patch
ignore:
# Ignore major updates as they might break things
- dependency-name: '*'
update-types: ['version-update:semver-major']
versioning-strategy: increase

# CI Scripts dependencies
- package-ecosystem: npm
directory: /scripts/ci/cache
schedule:
interval: weekly
day: saturday
time: 06:00
time: '06:00'
timezone: Etc/UTC
labels:
- automerge
Expand All @@ -129,15 +117,12 @@ updates:
prefix: chore(ci-deps)
open-pull-requests-limit: 2
groups:
# Group minor and patch updates together
minor-patch-dependencies:
patterns:
- '*'
update-types:
- minor
- patch
ignore:
# Ignore major updates as they might break things
- dependency-name: '*'
update-types: ['version-update:semver-major']
versioning-strategy: increase
16 changes: 16 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
image: '${{ env.DOCKER_BASE_IMAGE_REGISTRY }}/eks-distro-build-tooling/binfmt-misc:qemu-v6.1.0'
- name: Check if cached buildx image exists
id: cache-check
run: |
if ! docker pull ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1 ; then
docker pull docker.io/moby/buildkit:buildx-stable-1
docker tag docker.io/moby/buildkit:buildx-stable-1 ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1
docker push ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
Expand Down Expand Up @@ -555,6 +563,14 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
image: '${{ env.DOCKER_BASE_IMAGE_REGISTRY }}/eks-distro-build-tooling/binfmt-misc:qemu-v6.1.0'
- name: Check if cached buildx image exists
id: cache-check
run: |
if ! docker pull ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1 ; then
docker pull docker.io/moby/buildkit:buildx-stable-1
docker tag docker.io/moby/buildkit:buildx-stable-1 ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1
docker push ${{vars.AWS_ECR_REPO_BASE}}/moby/buildkit:buildx-stable-1
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ const ChartComponentSourceDataKeyField = () => {
}))
}

const disableMoreThanOneItemOnPieChart = manualData?.categoryItems?.length > 0
const disableMoreThanOneItemOnPieChart =
typeIsPieChart && manualData?.categoryItems?.length > 0

return (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,30 @@ export class RegulationDocumentsController {
return res.status(500).end('Unable to generate pdf')
}

function updateMinistryName(ministryRaw?: string): string | undefined {
if (!ministryRaw) {
return undefined
}
const suffix = 'ráðuneyti'
const newSuffix = 'ráðuneytinu'

if (ministryRaw.endsWith(suffix)) {
return ministryRaw.slice(0, -suffix.length) + newSuffix
}

return ministryRaw
}

const draftMinistry = updateMinistryName(draftRegulation.ministry)

const input: RegulationPdfInput = {
title: draftRegulation.title,
text: draftRegulation.text,
appendixes: draftRegulation.appendixes,
comments: draftRegulation.comments,
name: draftRegulation.name,
publishedDate: draftRegulation.idealPublishDate,
ministry: draftRegulation.ministry,
ministry: draftMinistry,
}

const documentResponse =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ export const DefendantInfo: FC<DefendantInfoProps> = (props) => {
defender,
} = props
const { formatMessage } = useIntl()
const hasDefender = defendant.defenderName || defender?.name
const defenderLabel =
defender?.sessionArrangement ===
SessionArrangements.ALL_PRESENT_SPOKESPERSON
? formatMessage(strings.spokesperson)
: formatMessage(strings.defender)
const defenderName = defendant.defenderName || defender?.name
const defenderEmail = defendant.defenderEmail || defender?.email
const defenderPhoneNumber =
defendant.defenderPhoneNumber || defender?.phoneNumber

const appealExpirationInfo = getAppealExpirationInfo(
defendant.verdictAppealDeadline,
Expand Down Expand Up @@ -103,36 +113,31 @@ export const DefendantInfo: FC<DefendantInfoProps> = (props) => {
{defendant.address ? defendant.address : 'Ekki skráð'}
</Text>
</Box>
{defendant.defenderName || defender?.name ? (
<Box component="p">
<Text as="span" whiteSpace="pre" fontWeight="semiBold">
{defender?.sessionArrangement ===
SessionArrangements.ALL_PRESENT_SPOKESPERSON
? `${formatMessage(strings.spokesperson)}: `
: `${formatMessage(strings.defender)}: `}
</Text>
{RenderPersonalData(
defendant.defenderName || defender?.name,
defendant.defenderEmail || defender?.email,
defendant.defenderPhoneNumber || defender?.phoneNumber,
<Box component="p">
<Text as="span" whiteSpace="pre" fontWeight="semiBold">
{`${defenderLabel}: `}
</Text>
{hasDefender ? (
RenderPersonalData(
defenderName,
defenderEmail,
defenderPhoneNumber,
false,
)}
</Box>
) : (
<Text>{`${formatMessage(strings.defender)}: ${formatMessage(
strings.noDefender,
)}`}</Text>
)}
)
) : (
<Text as="span">{formatMessage(strings.noDefender)}</Text>
)}
</Box>
{displayAppealExpirationInfo && (
<Box>
<Box marginTop={1}>
<Text as="span">
{formatMessage(appealExpirationInfo.message, {
appealExpirationDate: appealExpirationInfo.date,
})}
</Text>
</Box>
)}
{displayVerdictViewDate && (
{displayVerdictViewDate && defendant.serviceRequirement && (
<Text marginTop={1} fontWeight="semiBold">
{getVerdictViewDateText(
formatMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ describe('InfoCard', () => {

// Act and Assert
expect(
await screen.findByText('Verjandi: Hefur ekki verið skráður'),
await screen.findByText(
(_, element) =>
element?.textContent === 'Verjandi: Hefur ekki verið skráður',
),
).toBeTruthy()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const Overview: FC = () => {
</Box>
)}
<Box component="section" marginBottom={5}>
<InfoCardActiveIndictment displayVerdictViewDate={true} />
<InfoCardActiveIndictment displayVerdictViewDate />
</Box>
{(hasLawsBroken || hasMergeCases) && (
<Box marginBottom={5}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ export const strings = defineMessages({
description:
'Texti á takka til að bæta við skjölum á Yfirlit ákæru skefi í ákærum.',
},
servedToElectronically: {
id: 'judicial.system.core:overview.served_electronically',
defaultMessage: 'Rafrænt pósthólf island.is',
description: 'Notaður sem texti þegar birt var í pósthólfi.',
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
CaseState,
Defendant,
IndictmentDecision,
ServiceStatus,
Subpoena,
UserRole,
} from '@island.is/judicial-system-web/src/graphql/schema'
Expand Down Expand Up @@ -67,15 +68,27 @@ const ServiceAnnouncement: FC<ServiceAnnouncementProps> = (props) => {
const getMessage = (
servedBy?: string | null,
serviceDate?: string | null,
serviceStatus?: ServiceStatus | null,
): string => {
return [servedBy, formatDate(serviceDate, 'Pp')].filter(Boolean).join(', ')
const processServer =
serviceStatus === ServiceStatus.ELECTRONICALLY
? formatMessage(strings.servedToElectronically)
: servedBy

return [processServer, formatDate(serviceDate, 'Pp')]
.filter(Boolean)
.join(', ')
}

return (
<AlertMessage
type="success"
title={getTitle(defendant.name)}
message={getMessage(subpoena.servedBy, subpoena.serviceDate)}
message={getMessage(
subpoena.servedBy,
subpoena.serviceDate,
subpoena.serviceStatus,
)}
/>
)
}
Expand Down
Loading

0 comments on commit 67c8d44

Please sign in to comment.