diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a56a695c1718..4a9b1e81dbaf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -132,6 +132,7 @@ codemagic.yaml /apps/services/regulations-admin-backend/ @island-is/hugsmidjan /apps/services/user-profile/ @island-is/hugsmidjan @island-is/juni @island-is/aranja /apps/web/components/Grant/ @island-is/hugsmidjan +/apps/web/components/GrantCardsList/ @island-is/hugsmidjan /apps/web/screens/Grants/ @island-is/hugsmidjan /apps/web/screens/Regulations/ @island-is/hugsmidjan /apps/web/components/Regulations/ @island-is/hugsmidjan diff --git a/apps/download-service/src/app/modules/finance-documents/document.controller.ts b/apps/download-service/src/app/modules/finance-documents/document.controller.ts index 23b15bac679d..845529eda9a6 100644 --- a/apps/download-service/src/app/modules/finance-documents/document.controller.ts +++ b/apps/download-service/src/app/modules/finance-documents/document.controller.ts @@ -9,13 +9,13 @@ import { ApiScope } from '@island.is/auth/scopes' import { FinanceClientService } from '@island.is/clients/finance' import { AuditService } from '@island.is/nest/audit' import { - Body, Controller, Header, Param, Post, Res, UseGuards, + Query, } from '@nestjs/common' import { ApiOkResponse } from '@nestjs/swagger' import { Response } from 'express' @@ -39,19 +39,20 @@ export class FinanceDocumentController { @CurrentUser() user: User, @Res() res: Response, @Param('pdfId') pdfId: string, - @Body('annualDoc') annualDoc?: string, + @Query('action') action?: string, ) { - const documentResponse = annualDoc - ? await this.financeService.getAnnualStatusDocument( - user.nationalId, - pdfId, - user, - ) - : await this.financeService.getFinanceDocument( - user.nationalId, - pdfId, - user, - ) + const documentResponse = + action === 'annualDoc' + ? await this.financeService.getAnnualStatusDocument( + user.nationalId, + pdfId, + user, + ) + : await this.financeService.getFinanceDocument( + user.nationalId, + pdfId, + user, + ) const documentBase64 = documentResponse?.docment?.document diff --git a/apps/judicial-system/backend/infra/judicial-system-backend.ts b/apps/judicial-system/backend/infra/judicial-system-backend.ts index 8d8fb88fcd95..1445073f9aa3 100644 --- a/apps/judicial-system/backend/infra/judicial-system-backend.ts +++ b/apps/judicial-system/backend/infra/judicial-system-backend.ts @@ -74,6 +74,8 @@ export const serviceSetup = (): ServiceBuilder<'judicial-system-backend'> => PRISON_ADMIN_EMAIL: '/k8s/judicial-system/PRISON_ADMIN_EMAIL', PRISON_ADMIN_INDICTMENT_EMAILS: '/k8s/judicial-system/PRISON_ADMIN_INDICTMENT_EMAILS', + PUBLIC_PROSECUTOR_CRIMINAL_RECORDS_EMAIL: + '/k8s/judicial-system/PUBLIC_PROSECUTOR_CRIMINAL_RECORDS_EMAIL', AUTH_JWT_SECRET: '/k8s/judicial-system/AUTH_JWT_SECRET', ADMIN_USERS: '/k8s/judicial-system/ADMIN_USERS', BACKEND_ACCESS_TOKEN: '/k8s/judicial-system/BACKEND_ACCESS_TOKEN', diff --git a/apps/judicial-system/backend/src/app/messages/notifications.ts b/apps/judicial-system/backend/src/app/messages/notifications.ts index ed00262e39d9..c8135dac6d6f 100644 --- a/apps/judicial-system/backend/src/app/messages/notifications.ts +++ b/apps/judicial-system/backend/src/app/messages/notifications.ts @@ -781,6 +781,11 @@ export const notifications = { defaultMessage: 'Landsréttur', description: 'Nafn á Landsrétti í tölvupóstum', }, + publicProsecutorCriminalRecords: { + id: 'judicial.system.backend:notifications.email_names.public_prosecutor_criminal_records', + defaultMessage: 'Ritari sakaskrár', + description: 'Nafn á ritara sakaskrá í tölvupóstum', + }, }), COAJudgeAssigned: defineMessages({ subject: { @@ -837,9 +842,9 @@ export const notifications = { description: 'Fyrirsögn í pósti til dómstóls þegar ákæra er afturkölluð', }, body: { - id: 'judicial.system.backend:notifications.court_revoked_indictment_email.body', + id: 'judicial.system.backend:notifications.court_revoked_indictment_email.body_v1', defaultMessage: - '{prosecutorsOffice} hefur afturkallað ákæru {courtCaseNumber, select, NONE {í máli sem ekki hefur enn fengið málsnúmer} other {í máli {courtCaseNumber}}}.', + '{prosecutorsOffice} hefur afturkallað ákæru í máli {caseNumber}.', description: 'Texti í pósti til dómstóls þegar ákæra er afturkölluð', }, }), diff --git a/apps/judicial-system/backend/src/app/modules/case/case.service.ts b/apps/judicial-system/backend/src/app/modules/case/case.service.ts index 41350c8064a1..d266510204bb 100644 --- a/apps/judicial-system/backend/src/app/modules/case/case.service.ts +++ b/apps/judicial-system/backend/src/app/modules/case/case.service.ts @@ -867,6 +867,17 @@ export class CaseService { type: MessageType.DELIVERY_TO_COURT_INDICTMENT_CANCELLATION_NOTICE, user, caseId: theCase.id, + // Upon case cancellation, we send the same notification type to: + // (1) relevant court emails + // (2) court system (via robot). + // + // When a case is revoked without a court case number, we send email (1). + // The court must then add the case number in the system, triggering notification (2) for full cancellation. + // + // The court system requires a case number before posting data via robot, so it must be added despite the cancellation. + // Notifications (1) and (2) must match, thus we use the flag below to ensure the same message is sent. + // Without the flag, email (2) would get notification including the court case number. + // For more context: https://github.com/island-is/island.is/pull/17385/files#r1904268032 body: { withCourtCaseNumber: false }, }) } diff --git a/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts b/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts index 8a06a7825db3..d0e54067af7f 100644 --- a/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts +++ b/apps/judicial-system/backend/src/app/modules/case/internalCase.service.ts @@ -672,6 +672,9 @@ export class InternalCaseService { ): Promise { await this.refreshFormatMessage() + const courtCaseNumber = withCourtCaseNumber && theCase.courtCaseNumber + const caseNumber = courtCaseNumber || theCase.policeCaseNumbers.join(', ') + return this.courtService .updateIndictmentCaseWithCancellationNotice( user, @@ -679,16 +682,14 @@ export class InternalCaseService { theCase.court?.name, theCase.courtCaseNumber, this.formatMessage(notifications.courtRevokedIndictmentEmail.subject, { - courtCaseNumber: - (withCourtCaseNumber && theCase.courtCaseNumber) || 'NONE', + courtCaseNumber: courtCaseNumber || 'NONE', }), stripHtmlTags( `${this.formatMessage( notifications.courtRevokedIndictmentEmail.body, { prosecutorsOffice: theCase.creatingProsecutor?.institution?.name, - courtCaseNumber: - (withCourtCaseNumber && theCase.courtCaseNumber) || 'NONE', + caseNumber, }, )} ${this.formatMessage(notifications.emailTail)}`, ), diff --git a/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentCancellationNoticeToCourt.spec.ts b/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentCancellationNoticeToCourt.spec.ts index 4acce978ca98..e1a571a8368e 100644 --- a/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentCancellationNoticeToCourt.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/case/test/internalCaseController/deliverIndictmentCancellationNoticeToCourt.spec.ts @@ -25,6 +25,10 @@ describe('InternalCaseController - Deliver indictment cancellation notice to cou const courtName = uuid() const courtCaseNumber = uuid() const prosecutorsOffice = uuid() + const policeCase1 = '007-2022-01' + const policeCase2 = '007-2022-02' + + const policeCaseNumbers = [policeCase1, policeCase2] const theCase = { id: caseId, @@ -32,6 +36,7 @@ describe('InternalCaseController - Deliver indictment cancellation notice to cou creatingProsecutor: { institution: { name: prosecutorsOffice } }, court: { name: courtName }, courtCaseNumber, + policeCaseNumbers, } as Case let mockCourtService: CourtService @@ -88,7 +93,7 @@ describe('InternalCaseController - Deliver indictment cancellation notice to cou }) }) - describe('deliver cancellation notice without court case number', () => { + describe('deliver cancellation notice with police case numbers', () => { let then: Then beforeAll(async () => { @@ -104,7 +109,7 @@ describe('InternalCaseController - Deliver indictment cancellation notice to cou courtName, courtCaseNumber, 'Ákæra afturkölluð', - `${prosecutorsOffice} hefur afturkallað ákæru í máli sem ekki hefur enn fengið málsnúmer. Hægt er að nálgast yfirlitssíðu málsins á rettarvorslugatt.island.is.`, + `${prosecutorsOffice} hefur afturkallað ákæru í máli ${policeCase1}, ${policeCase2}. Hægt er að nálgast yfirlitssíðu málsins á rettarvorslugatt.island.is.`, ) expect(then.result).toEqual({ delivered: true }) diff --git a/apps/judicial-system/backend/src/app/modules/notification/notification.config.ts b/apps/judicial-system/backend/src/app/modules/notification/notification.config.ts index e91cc08bd354..05e1bd9a9ac5 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/notification.config.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/notification.config.ts @@ -18,6 +18,10 @@ export const notificationModuleConfig = defineConfig({ 'PRISON_ADMIN_INDICTMENT_EMAILS', '', ), + publicProsecutorCriminalRecordsEmail: env.required( + 'PUBLIC_PROSECUTOR_CRIMINAL_RECORDS_EMAIL', + '', + ), courtsEmails: env.requiredJSON('COURTS_EMAILS', {}) as { [key: string]: string }, diff --git a/apps/judicial-system/backend/src/app/modules/notification/notificationDispatch.service.ts b/apps/judicial-system/backend/src/app/modules/notification/notificationDispatch.service.ts index dbaff1fd065d..c3c809c2a400 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/notificationDispatch.service.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/notificationDispatch.service.ts @@ -3,12 +3,12 @@ import { Injectable, InternalServerErrorException, } from '@nestjs/common' -import { ConfigType } from '@nestjs/config' import { type Logger, LOGGER_PROVIDER } from '@island.is/logging' import { MessageService, MessageType } from '@island.is/judicial-system/message' import { + CaseFileCategory, EventNotificationType, IndictmentCaseNotificationType, InstitutionNotificationType, @@ -71,7 +71,7 @@ export class NotificationDispatchService { private async dispatchIndictmentSentToPublicProsecutorNotifications( theCase: Case, ): Promise { - return this.messageService.sendMessagesToQueue([ + const messages = [ { type: MessageType.INDICTMENT_CASE_NOTIFICATION, caseId: theCase.id, @@ -79,7 +79,20 @@ export class NotificationDispatchService { type: IndictmentCaseNotificationType.INDICTMENT_VERDICT_INFO, }, }, - ]) + ] + const hasCriminalRecordFiles = theCase.caseFiles?.some( + (file) => file.category === CaseFileCategory.CRIMINAL_RECORD_UPDATE, + ) + if (hasCriminalRecordFiles) { + messages.push({ + type: MessageType.INDICTMENT_CASE_NOTIFICATION, + caseId: theCase.id, + body: { + type: IndictmentCaseNotificationType.CRIMINAL_RECORD_FILES_UPLOADED, + }, + }) + } + return this.messageService.sendMessagesToQueue(messages) } async dispatchEventNotification( diff --git a/apps/judicial-system/backend/src/app/modules/notification/services/caseNotification/caseNotification.service.ts b/apps/judicial-system/backend/src/app/modules/notification/services/caseNotification/caseNotification.service.ts index 5c631cc51bee..9d438c6ec5e5 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/services/caseNotification/caseNotification.service.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/services/caseNotification/caseNotification.service.ts @@ -1443,24 +1443,25 @@ export class CaseNotificationService extends BaseNotificationService { recipientName?: string, recipientEmail?: string, ): Promise { + const { courtCaseNumber } = theCase const subject = this.formatMessage( notifications.courtRevokedIndictmentEmail.subject, { - courtCaseNumber: theCase.courtCaseNumber ?? 'NONE', + courtCaseNumber: courtCaseNumber || 'NONE', }, ) const body = this.formatMessage( notifications.courtRevokedIndictmentEmail.body, { prosecutorsOffice: theCase.creatingProsecutor?.institution?.name, - courtCaseNumber: theCase.courtCaseNumber ?? 'NONE', + caseNumber: courtCaseNumber || theCase.policeCaseNumbers.join(', '), }, ) return this.sendEmail(subject, body, recipientName, recipientEmail) } - private async sendRevodeNotificationsForIndictmentCase( + private async sendRevokeNotificationsForIndictmentCase( theCase: Case, ): Promise { const promises: Promise[] = [] @@ -1538,7 +1539,7 @@ export class CaseNotificationService extends BaseNotificationService { if (isRequestCase(theCase.type)) { return this.sendRevokedNotificationsForRequestCase(theCase) } else { - return this.sendRevodeNotificationsForIndictmentCase(theCase) + return this.sendRevokeNotificationsForIndictmentCase(theCase) } } //#endregion diff --git a/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.service.ts b/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.service.ts index 821662fa0ca0..b44322fda25d 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.service.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.service.ts @@ -10,12 +10,13 @@ import { EmailService } from '@island.is/email-service' import { type Logger, LOGGER_PROVIDER } from '@island.is/logging' import { type ConfigType } from '@island.is/nest/config' +import { ROUTE_HANDLER_ROUTE } from '@island.is/judicial-system/consts' import { CaseIndictmentRulingDecision, IndictmentCaseNotificationType, - IndictmentDecision, } from '@island.is/judicial-system/types' +import { notifications } from '../../../../messages' import { Case } from '../../../case' import { EventService } from '../../../event' import { BaseNotificationService } from '../../baseNotification.service' @@ -124,6 +125,42 @@ export class IndictmentCaseNotificationService extends BaseNotificationService { ) } + private async sendCriminalRecordFilesUploadedNotification( + theCase: Case, + ): Promise { + const formattedSubject = this.formatMessage( + strings.criminalRecordFilesUploadedEmail.subject, + { + courtCaseNumber: theCase.courtCaseNumber, + }, + ) + + const formattedBody = this.formatMessage( + strings.criminalRecordFilesUploadedEmail.body, + { + courtCaseNumber: theCase.courtCaseNumber, + courtName: theCase.court?.name.replace('dómur', 'dómi'), + linkStart: ``, + linkEnd: '', + }, + ) + + return this.sendEmails( + theCase, + IndictmentCaseNotificationType.CRIMINAL_RECORD_FILES_UPLOADED, + formattedSubject, + formattedBody, + [ + { + name: this.formatMessage( + notifications.emailNames.publicProsecutorCriminalRecords, + ), + email: this.config.email.publicProsecutorCriminalRecordsEmail, + }, + ], + ) + } + private sendNotification( notificationType: IndictmentCaseNotificationType, theCase: Case, @@ -131,6 +168,8 @@ export class IndictmentCaseNotificationService extends BaseNotificationService { switch (notificationType) { case IndictmentCaseNotificationType.INDICTMENT_VERDICT_INFO: return this.sendVerdictInfoNotification(theCase) + case IndictmentCaseNotificationType.CRIMINAL_RECORD_FILES_UPLOADED: + return this.sendCriminalRecordFilesUploadedNotification(theCase) default: throw new InternalServerErrorException( diff --git a/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.strings.ts b/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.strings.ts index c9ed5ec52513..71dd26bfecd1 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.strings.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/services/indictmentCaseNotification/indictmentCaseNotification.strings.ts @@ -16,4 +16,19 @@ export const strings = { 'Notað sem body í tilkynningu um stöðu birtingar dóms í lokinni ákæru', }, }), + criminalRecordFilesUploadedEmail: defineMessages({ + subject: { + id: 'judicial.system.backend:notifications.criminal_record_files_uploaded_email.subject', + defaultMessage: 'Tilkynning til sakaskrár í máli {courtCaseNumber}', + description: + 'Fyrirsögn í pósti til ritara sakaskrá þegar skjal fyrir tilkynningu til skakaskrár er hlaðið upp', + }, + body: { + id: 'judicial.system.backend:notifications.criminal_record_files_uploaded_email.body', + defaultMessage: + 'Máli {courtCaseNumber} hjá {courtName} hefur verið lokið. Skjöl málsins eru aðgengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}', + description: + 'Texti í pósti til ritara sakaskrá þegar skjal fyrir tilkynningu til skakaskrár er hlaðið upp', + }, + }), } diff --git a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/eventNotificationDispatch/eventNotificationDispatch.spec.ts b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/eventNotificationDispatch/eventNotificationDispatch.spec.ts index 490b135e8429..65ada891562b 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/eventNotificationDispatch/eventNotificationDispatch.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/eventNotificationDispatch/eventNotificationDispatch.spec.ts @@ -2,6 +2,7 @@ import { uuid } from 'uuidv4' import { MessageService, MessageType } from '@island.is/judicial-system/message' import { + CaseFileCategory, EventNotificationType, IndictmentCaseNotificationType, } from '@island.is/judicial-system/types' @@ -9,10 +10,19 @@ import { import { createTestingNotificationModule } from '../../createTestingNotificationModule' import { Case } from '../../../../case' +import { CaseFile } from '../../../../file' import { InternalNotificationController } from '../../../internalNotification.controller' describe('InternalNotificationController - Dispatch event notifications', () => { - const theCase = { id: uuid() } as Case + const theCase = { + id: uuid(), + caseFiles: [ + { + category: CaseFileCategory.CRIMINAL_RECORD_UPDATE, + }, + ] as CaseFile[], + } as Case + let mockMessageService: MessageService let internalNotificationController: InternalNotificationController @@ -32,23 +42,32 @@ describe('InternalNotificationController - Dispatch event notifications', () => { notificationType: EventNotificationType.INDICTMENT_SENT_TO_PUBLIC_PROSECUTOR, - expectedMessage: { - type: MessageType.INDICTMENT_CASE_NOTIFICATION, - caseId: theCase.id, - body: { - type: IndictmentCaseNotificationType.INDICTMENT_VERDICT_INFO, + expectedMessages: [ + { + type: MessageType.INDICTMENT_CASE_NOTIFICATION, + caseId: theCase.id, + body: { + type: IndictmentCaseNotificationType.INDICTMENT_VERDICT_INFO, + }, }, - }, + { + type: MessageType.INDICTMENT_CASE_NOTIFICATION, + caseId: theCase.id, + body: { + type: IndictmentCaseNotificationType.CRIMINAL_RECORD_FILES_UPLOADED, + }, + }, + ], }, ] it.each( - notificationScenarios.map(({ notificationType, expectedMessage }) => ({ + notificationScenarios.map(({ notificationType, expectedMessages }) => ({ notificationType, - expectedMessage, - description: `should send message to queue for notification type ${notificationType}`, + expectedMessages, + description: `should send messages to queue for notification type ${notificationType}`, })), - )('$description', async ({ notificationType, expectedMessage }) => { + )('$description', async ({ notificationType, expectedMessages }) => { const result = await internalNotificationController.dispatchEventNotification( theCase.id, @@ -56,9 +75,9 @@ describe('InternalNotificationController - Dispatch event notifications', () => { type: notificationType }, ) - expect(mockMessageService.sendMessagesToQueue).toHaveBeenCalledWith([ - expectedMessage, - ]) + expect(mockMessageService.sendMessagesToQueue).toHaveBeenCalledWith( + expectedMessages, + ) expect(result).toEqual({ delivered: true }) }) diff --git a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/indictmentCaseNotification/sendIndictmentCriminalRecordFilesUploadedNotification.spec.ts b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/indictmentCaseNotification/sendIndictmentCriminalRecordFilesUploadedNotification.spec.ts new file mode 100644 index 000000000000..5f097dc9a952 --- /dev/null +++ b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/indictmentCaseNotification/sendIndictmentCriminalRecordFilesUploadedNotification.spec.ts @@ -0,0 +1,93 @@ +import { uuid } from 'uuidv4' + +import { EmailService } from '@island.is/email-service' +import { ConfigType } from '@island.is/nest/config' + +import { IndictmentCaseNotificationType } from '@island.is/judicial-system/types' + +import { createTestingNotificationModule } from '../../createTestingNotificationModule' + +import { Case } from '../../../../case' +import { DeliverResponse } from '../../../models/deliver.response' +import { notificationModuleConfig } from '../../../notification.config' + +interface Then { + result: DeliverResponse + error: Error +} + +type GivenWhenThen = ( + theCase: Case, + notificationType: IndictmentCaseNotificationType, +) => Promise + +describe('IndictmentCaseService', () => { + const caseId = uuid() + const courtName = uuid() + + const courtCaseNumber = uuid() + const theCase = { + id: caseId, + court: { name: courtName }, + courtCaseNumber, + } as Case + + let mockEmailService: EmailService + let mockConfig: ConfigType + let givenWhenThen: GivenWhenThen + + beforeEach(async () => { + process.env.PUBLIC_PROSECUTOR_CRIMINAL_RECORDS_EMAIL = + 'publicProsecutor@omnitrix.is' + + const { + emailService, + notificationConfig, + indictmentCaseNotificationService, + } = await createTestingNotificationModule() + + mockEmailService = emailService + mockConfig = notificationConfig + + givenWhenThen = async ( + theCase: Case, + notificationType: IndictmentCaseNotificationType, + ) => { + const then = {} as Then + + await indictmentCaseNotificationService + .sendIndictmentCaseNotification(notificationType, theCase) + .then((result) => (then.result = result)) + .catch((error) => (then.error = error)) + + return then + } + }) + + describe('notification sent to public prosecutor criminal records secretary', () => { + it('should send notification', async () => { + const then = await givenWhenThen( + theCase, + IndictmentCaseNotificationType.CRIMINAL_RECORD_FILES_UPLOADED, + ) + + expect(mockEmailService.sendEmail).toBeCalledWith( + expect.objectContaining({ + to: [ + { + name: 'Ritari sakaskrár', + address: mockConfig.email.publicProsecutorCriminalRecordsEmail, + }, + ], + subject: expect.stringContaining( + `Tilkynning til sakaskrár í máli ${courtCaseNumber}`, + ), + html: expect.stringContaining( + `Máli ${courtCaseNumber} hjá ${courtName} hefur verið lokið.`, + ), + }), + ) + expect(then.result).toEqual({ delivered: true }) + }) + }) +}) diff --git a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRevokedNotifications.spec.ts b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRevokedNotifications.spec.ts index 274a52a42c74..3749df975be5 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRevokedNotifications.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRevokedNotifications.spec.ts @@ -35,6 +35,8 @@ describe('InternalNotificationController - Send revoked notifications for indict const prosecutorsOfficeName = uuid() const courtName = uuid() const courtCaseNumber = uuid() + const policeCaseNumbers = ['007-2022-01'] + const theCase = { id: caseId, judge: { name: judge.name, email: judge.email }, @@ -49,6 +51,7 @@ describe('InternalNotificationController - Send revoked notifications for indict creatingProsecutor: { institution: { name: prosecutorsOfficeName } }, court: { name: courtName }, courtCaseNumber, + policeCaseNumbers, } let mockEmailService: EmailService diff --git a/apps/web/components/Organization/NewsArticle/NewsArticle.tsx b/apps/web/components/Organization/NewsArticle/NewsArticle.tsx index 32669c00d3d0..e1ecb92c5b76 100644 --- a/apps/web/components/Organization/NewsArticle/NewsArticle.tsx +++ b/apps/web/components/Organization/NewsArticle/NewsArticle.tsx @@ -34,7 +34,7 @@ const NewsItemImage = ({ newsItem }: NewsArticleProps) => {...newsItem?.image} url={ newsItem?.image?.url - ? newsItem.image?.url + '?w=774&fm=webp&q=80' + ? newsItem.image?.url + '?w=1000&fm=webp&q=80' : '' } thumbnail={ @@ -112,7 +112,11 @@ export const NewsArticle: React.FC< Image: (slice: ImageProps) => { return ( - + ) }, diff --git a/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx b/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx index 07eb23a1c730..d9807cde2242 100644 --- a/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx +++ b/apps/web/components/Organization/Wrapper/OrganizationWrapper.tsx @@ -679,10 +679,10 @@ export const OrganizationExternalLinks: React.FC< pureChildren={true} >