diff --git a/.yarn/patches/cache-manager-ioredis-yet-npm-1.1.0-da7d1a9865.patch b/.yarn/patches/cache-manager-ioredis-yet-npm-1.1.0-da7d1a9865.patch new file mode 100644 index 000000000000..c97e9538ce39 --- /dev/null +++ b/.yarn/patches/cache-manager-ioredis-yet-npm-1.1.0-da7d1a9865.patch @@ -0,0 +1,26 @@ +diff --git a/dist/index.js b/dist/index.js +index 21d1ae2f70d7c5b38e17d053a9bf68454edfe98a..6045a01e347041e0cb0b7025dc5734d9f44a9bfb 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -90,7 +90,7 @@ function builder(redisCache, reset, keys, options) { + yield redisCache.del(key); + }); + }, +- ttl: (key) => __awaiter(this, void 0, void 0, function* () { return redisCache.ttl(key); }), ++ ttl: (key) => __awaiter(this, void 0, void 0, function* () { return redisCache.pttl(key); }), + keys: (pattern = '*') => keys(pattern), + reset, + isCacheable, +diff --git a/src/index.ts b/src/index.ts +index 267bdf152027f4bc6f0321c186542ce2dc5f3bb1..a295c85899f6206de13d202967e7676247925a53 100644 +--- a/src/index.ts ++++ b/src/index.ts +@@ -87,7 +87,7 @@ function builder( + async del(key) { + await redisCache.del(key); + }, +- ttl: async (key) => redisCache.ttl(key), ++ ttl: async (key) => redisCache.pttl(key), + keys: (pattern = '*') => keys(pattern), + reset, + isCacheable, diff --git a/.yarn/patches/dd-trace-npm-5.14.1-8d45ad14d6.patch b/.yarn/patches/dd-trace-npm-5.14.1-8d45ad14d6.patch new file mode 100644 index 000000000000..d673f4c70e2d --- /dev/null +++ b/.yarn/patches/dd-trace-npm-5.14.1-8d45ad14d6.patch @@ -0,0 +1,44 @@ +diff --git a/packages/dd-trace/src/external-logger/src/index.js b/packages/dd-trace/src/external-logger/src/index.js +index aa21b20b6e78336329f8f99214a36fde3b9c2c59..523c285768a9f34ba9bc353a5caff6962cf1ff5c 100644 +--- a/packages/dd-trace/src/external-logger/src/index.js ++++ b/packages/dd-trace/src/external-logger/src/index.js +@@ -81,7 +81,7 @@ class ExternalLogger { + let encodedLogs + + if (!this.queue.length) { +- setImmediate(() => cb()) ++ setTimeout(() => cb(), 0) + return + } + +@@ -93,7 +93,7 @@ class ExternalLogger { + encodedLogs = JSON.stringify(logs) + } catch (error) { + tracerLogger.error(`failed to encode ${numLogs} logs`) +- setImmediate(() => cb(error)) ++ setTimeout(() => cb(error), 0) + return + } + +diff --git a/packages/dd-trace/src/telemetry/dependencies.js b/packages/dd-trace/src/telemetry/dependencies.js +index 992dde7d2ec7b6742b55e48bb0941f88d01669bf..9a0559d576663eaff4291edf0fdda6ea51da1456 100644 +--- a/packages/dd-trace/src/telemetry/dependencies.js ++++ b/packages/dd-trace/src/telemetry/dependencies.js +@@ -32,7 +32,7 @@ function createBatchPayload (payload) { + } + function waitAndSend (config, application, host) { + if (!immediate) { +- immediate = setImmediate(() => { ++ immediate = setTimeout(() => { + immediate = null + if (savedDependenciesToSend.size > 0) { + const dependencies = Array.from(savedDependenciesToSend.values()) +@@ -69,7 +69,7 @@ function waitAndSend (config, application, host) { + waitAndSend(config, application, host) + } + } +- }) ++ }, 0) + immediate.unref() + } + } diff --git a/apps/judicial-system/api/src/app/modules/case-list/interceptors/caseList.interceptor.ts b/apps/judicial-system/api/src/app/modules/case-list/interceptors/caseList.interceptor.ts index 14552ce3ebf9..ebaf57a518d7 100644 --- a/apps/judicial-system/api/src/app/modules/case-list/interceptors/caseList.interceptor.ts +++ b/apps/judicial-system/api/src/app/modules/case-list/interceptors/caseList.interceptor.ts @@ -27,6 +27,11 @@ export class CaseListInterceptor implements NestInterceptor { return next.handle().pipe( map((cases: CaseListEntry[]) => { return cases.map((theCase) => { + const indictmentInfo = getIndictmentInfo( + theCase.rulingDate, + theCase.type, + theCase.defendants, + ) return { ...theCase, isValidToDateInThePast: theCase.validToDate @@ -36,8 +41,7 @@ export class CaseListInterceptor implements NestInterceptor { theCase.prosecutorPostponedAppealDate, theCase.accusedPostponedAppealDate, ), - indictmentAppealDeadline: getIndictmentInfo(theCase.rulingDate) - .indictmentAppealDeadline, + ...indictmentInfo, } }) }), diff --git a/apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts b/apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts index c7e2d8a73f81..fda810ed9962 100644 --- a/apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts +++ b/apps/judicial-system/api/src/app/modules/case-list/models/caseList.model.ts @@ -114,4 +114,10 @@ export class CaseListEntry { @Field(() => String, { nullable: true }) readonly indictmentAppealDeadline?: string + + @Field(() => Boolean, { nullable: true }) + readonly indictmentVerdictViewedByAll?: boolean + + @Field(() => String, { nullable: true }) + readonly indictmentVerdictAppealDeadline?: string } diff --git a/apps/judicial-system/api/src/app/modules/case/interceptors/case.transformer.ts b/apps/judicial-system/api/src/app/modules/case/interceptors/case.transformer.ts index 7356b0753950..bcf7f8adbafc 100644 --- a/apps/judicial-system/api/src/app/modules/case/interceptors/case.transformer.ts +++ b/apps/judicial-system/api/src/app/modules/case/interceptors/case.transformer.ts @@ -1,9 +1,12 @@ import { CaseAppealDecision, + CaseType, getStatementDeadline, + isIndictmentCase, UserRole, } from '@island.is/judicial-system/types' +import { Defendant } from '../../defendant' import { Case } from '../models/case.model' const getDays = (days: number) => days * 24 * 60 * 60 * 1000 @@ -21,6 +24,8 @@ interface AppealInfo { interface IndictmentInfo { indictmentAppealDeadline?: string + indictmentVerdictViewedByAll?: boolean + indictmentVerdictAppealDeadline?: string } const isAppealableDecision = (decision?: CaseAppealDecision | null) => { @@ -91,10 +96,14 @@ export const getAppealInfo = (theCase: Case): AppealInfo => { return appealInfo } -export const getIndictmentInfo = (rulingDate?: string): IndictmentInfo => { +export const getIndictmentInfo = ( + rulingDate?: string, + caseType?: CaseType, + defendants?: Defendant[], +): IndictmentInfo => { const indictmentInfo: IndictmentInfo = {} - if (!rulingDate) { + if ((caseType && !isIndictmentCase(caseType)) || !rulingDate) { return indictmentInfo } @@ -103,12 +112,64 @@ export const getIndictmentInfo = (rulingDate?: string): IndictmentInfo => { theRulingDate.setDate(theRulingDate.getDate() + 28), ).toISOString() + if (defendants) { + const verdictViewDates = defendants?.map( + (defendant) => defendant.verdictViewDate, + ) + + if (!verdictViewDates || verdictViewDates?.some((date) => !date)) { + indictmentInfo.indictmentVerdictViewedByAll = false + } else { + indictmentInfo.indictmentVerdictViewedByAll = true + const newestViewDate = verdictViewDates + ?.filter((date): date is string => date !== undefined) + .map((date) => new Date(date)) + .reduce( + (newest, current) => (current > newest ? current : newest), + new Date(0), + ) + const expiryDate = new Date(newestViewDate.getTime()) + expiryDate.setDate(newestViewDate.getDate() + 28) + + indictmentInfo.indictmentVerdictAppealDeadline = expiryDate.toISOString() + } + } + return indictmentInfo } +const getDefendantsInfo = ( + defendants: Defendant[] | undefined, + caseType?: CaseType, +) => { + if (!defendants || !isIndictmentCase(caseType)) { + return defendants + } + + const expiryDays = getDays(28) + + return defendants.map((defendant) => { + const { verdictViewDate } = defendant + return { + ...defendant, + verdictAppealDeadline: verdictViewDate + ? new Date( + new Date(verdictViewDate).getTime() + expiryDays, + ).toISOString() + : undefined, + } + }) +} + export const transformCase = (theCase: Case): Case => { const appealInfo = getAppealInfo(theCase) - const indictmentInfo = getIndictmentInfo(theCase.rulingDate) + const indictmentInfo = getIndictmentInfo( + theCase.rulingDate, + theCase.type, + theCase.defendants, + ) + const defendants = getDefendantsInfo(theCase.defendants, theCase.type) + return { ...theCase, requestProsecutorOnlySession: theCase.requestProsecutorOnlySession ?? false, @@ -129,6 +190,7 @@ export const transformCase = (theCase: Case): Case => { ? Date.now() >= new Date(theCase.appealReceivedByCourtDate).getTime() + getDays(1) : false, + defendants: defendants, ...appealInfo, ...indictmentInfo, } diff --git a/apps/judicial-system/api/src/app/modules/case/models/case.model.ts b/apps/judicial-system/api/src/app/modules/case/models/case.model.ts index 9fbb0a8e9ea6..9106303bbec5 100644 --- a/apps/judicial-system/api/src/app/modules/case/models/case.model.ts +++ b/apps/judicial-system/api/src/app/modules/case/models/case.model.ts @@ -428,4 +428,10 @@ export class Case { @Field(() => String, { nullable: true }) readonly indictmentAppealDeadline?: string + + @Field(() => Boolean, { nullable: true }) + readonly indictmentVerdictViewedByAll?: boolean + + @Field(() => String, { nullable: true }) + readonly indictmentVerdictAppealDeadline?: string } diff --git a/apps/judicial-system/api/src/app/modules/defendant/models/defendant.model.ts b/apps/judicial-system/api/src/app/modules/defendant/models/defendant.model.ts index be22c0f5a29c..50c1fed8da12 100644 --- a/apps/judicial-system/api/src/app/modules/defendant/models/defendant.model.ts +++ b/apps/judicial-system/api/src/app/modules/defendant/models/defendant.model.ts @@ -65,4 +65,7 @@ export class Defendant { @Field(() => String, { nullable: true }) readonly verdictViewDate?: string + + @Field(() => String, { nullable: true }) + readonly verdictAppealDeadline?: string } diff --git a/apps/judicial-system/backend/src/app/messages/notifications.ts b/apps/judicial-system/backend/src/app/messages/notifications.ts index 446394f2b1df..af2339b4fc38 100644 --- a/apps/judicial-system/backend/src/app/messages/notifications.ts +++ b/apps/judicial-system/backend/src/app/messages/notifications.ts @@ -267,16 +267,16 @@ export const notifications = { 'Notaður sem nafn á þingbókarviðhengi í pósti til hagaðila vegna undirritunar úrskurðar', }, prosecutorBodyS3: { - id: 'judicial.system.backend:notifications.signed_ruling.prosecutor_body_s3_v2', + id: 'judicial.system.backend:notifications.signed_ruling.prosecutor_body_s3_v3', defaultMessage: - 'Dómari hefur {isModifyingRuling, select, true {leiðrétt} other {undirritað og staðfest}} úrskurð í máli {courtCaseNumber} hjá {courtName}.

Skjöl málsins eru aðengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', + 'Dómari hefur {isModifyingRuling, select, true {leiðrétt} other {undirritað og staðfest}} úrskurð í máli {courtCaseNumber} hjá {courtName}.

Skjöl málsins eru aðgengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', description: 'Notaður sem texti í pósti til sækjanda vegna undirritunar úrskurðar ef tókst að vista úrskurð í AWS S3', }, courtBody: { - id: 'judicial.system.backend:notifications.signed_ruling.court_body', + id: 'judicial.system.backend:notifications.signed_ruling.court_body_v1', defaultMessage: - 'Ekki tókst að vista þingbók og/eða úrskurð í máli {courtCaseNumber} í Auði.

Skjöl málsins eru aðengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', + 'Ekki tókst að vista þingbók og/eða úrskurð í máli {courtCaseNumber} í Auði.

Skjöl málsins eru aðgengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', description: 'Notaður sem texti í pósti til dómara og dómritara vegna undirritunar úrskurðar ef ekki tókst að vista þingbók eða úrskurð í Auði', }, @@ -303,16 +303,16 @@ export const notifications = { 'Notaður sem titill í pósti til hagaðila vegna staðfests dóms', }, prosecutorBody: { - id: 'judicial.system.backend:notifications.case_completed.prosecutor_body_v1', + id: 'judicial.system.backend:notifications.case_completed.prosecutor_body_v2', defaultMessage: - 'Máli {courtCaseNumber} hjá {courtName} hefur verið lokið.

Niðurstaða: {caseIndictmentRulingDecision}

Skjöl málsins eru aðengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', + 'Máli {courtCaseNumber} hjá {courtName} hefur verið lokið.

Niðurstaða: {caseIndictmentRulingDecision}

Skjöl málsins eru aðgengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.', description: 'Notaður sem texti í pósti til sækjanda vegna staðfests dóms', }, defenderBody: { - id: 'judicial.system.backend:notifications.case_completed.defender_body_v3', + id: 'judicial.system.backend:notifications.case_completed.defender_body_v4', defaultMessage: - 'Máli {courtCaseNumber} hjá {courtName} hefur verið lokið.

Niðurstaða: {caseIndictmentRulingDecision}

{defenderHasAccessToRvg, select, false {Þú getur nálgast gögn málsins hjá {courtName} ef þau hafa ekki þegar verið afhent} other {Þú getur nálgast gögn málsins á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}}}.', + 'Máli {courtCaseNumber} hjá {courtName} hefur verið lokið.

Niðurstaða: {caseIndictmentRulingDecision}

{defenderHasAccessToRvg, select, false {Þú getur nálgast gögn málsins hjá {courtName} ef þau hafa ekki þegar verið afhent} other {Skjöl málsins eru aðgengileg á {linkStart}yfirlitssíðu málsins í Réttarvörslugátt{linkEnd}.}}.', description: 'Notaður sem texti í pósti til verjanda vegna staðfests dóms', }, diff --git a/apps/judicial-system/backend/src/app/modules/case/dto/internalCases.dto.ts b/apps/judicial-system/backend/src/app/modules/case/dto/internalCases.dto.ts new file mode 100644 index 000000000000..c4b9adffdcd7 --- /dev/null +++ b/apps/judicial-system/backend/src/app/modules/case/dto/internalCases.dto.ts @@ -0,0 +1,10 @@ +import { IsNotEmpty, IsString } from 'class-validator' + +import { ApiProperty } from '@nestjs/swagger' + +export class InternalCasesDto { + @IsNotEmpty() + @IsString() + @ApiProperty({ type: String }) + readonly nationalId!: string +} diff --git a/apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts b/apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts index 9e127847386f..585a3e7c04f4 100644 --- a/apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts +++ b/apps/judicial-system/backend/src/app/modules/case/internalCase.controller.ts @@ -13,6 +13,7 @@ import type { Logger } from '@island.is/logging' import { LOGGER_PROVIDER } from '@island.is/logging' import { TokenGuard } from '@island.is/judicial-system/auth' +import { formatNationalId } from '@island.is/judicial-system/formatters' import { messageEndpoint, MessageType, @@ -25,6 +26,7 @@ import { import { CaseEvent, EventService } from '../event' import { DeliverDto } from './dto/deliver.dto' +import { InternalCasesDto } from './dto/internalCases.dto' import { InternalCreateCaseDto } from './dto/internalCreateCase.dto' import { CurrentCase } from './guards/case.decorator' import { CaseCompletedGuard } from './guards/caseCompleted.guard' @@ -68,6 +70,21 @@ export class InternalCaseController { return this.internalCaseService.archive() } + @Post('cases/indictments') + @ApiOkResponse({ + type: Case, + isArray: true, + description: 'Gets all indictment cases', + }) + getIndictmentCases( + @Body() internalCasesDto: InternalCasesDto, + ): Promise { + this.logger.debug('Getting all indictment cases') + const nationalId = formatNationalId(internalCasesDto.nationalId) + + return this.internalCaseService.getIndictmentCases(nationalId) + } + @UseGuards(CaseExistsGuard) @Post( `case/:caseId/${messageEndpoint[MessageType.DELIVERY_TO_COURT_PROSECUTOR]}`, 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 2deede784006..690b48e5e69e 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 @@ -60,6 +60,7 @@ import { archiveFilter } from './filters/case.archiveFilter' import { ArchiveResponse } from './models/archive.response' import { Case } from './models/case.model' import { CaseArchive } from './models/caseArchive.model' +import { DateLog } from './models/dateLog.model' import { DeliverResponse } from './models/deliver.response' import { caseModuleConfig } from './case.config' @@ -1151,4 +1152,19 @@ export class InternalCaseService { return originalAncestor } + + async getIndictmentCases(nationalId: string): Promise { + return this.caseModel.findAll({ + include: [ + { model: Defendant, as: 'defendants' }, + { model: DateLog, as: 'dateLogs' }, + ], + order: [[{ model: DateLog, as: 'dateLogs' }, 'created', 'DESC']], + attributes: ['id', 'courtCaseNumber', 'type', 'state'], + where: { + type: CaseType.INDICTMENT, + '$defendants.national_id$': nationalId, + }, + }) + } } diff --git a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRulingNotifications.spec.ts b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRulingNotifications.spec.ts index 99dfcbed296a..d8fa2a8618b1 100644 --- a/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRulingNotifications.spec.ts +++ b/apps/judicial-system/backend/src/app/modules/notification/test/internalNotificationController/sendRulingNotifications.spec.ts @@ -108,7 +108,7 @@ describe('InternalNotificationController - Send ruling notifications', () => { expect.objectContaining({ to: [{ name: prosecutor.name, address: prosecutor.email }], subject: 'Máli lokið 007-2022-07', - html: `Máli 007-2022-07 hjá Héraðsdómi Reykjavíkur hefur verið lokið.

Niðurstaða: Ekki skráð

Skjöl málsins eru aðengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, + html: `Máli 007-2022-07 hjá Héraðsdómi Reykjavíkur hefur verið lokið.

Niðurstaða: Ekki skráð

Skjöl málsins eru aðgengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, }), ) }) @@ -138,7 +138,7 @@ describe('InternalNotificationController - Send ruling notifications', () => { expect.objectContaining({ to: [{ name: prosecutor.name, address: prosecutor.email }], subject: 'Úrskurður í máli 007-2022-07', - html: `Dómari hefur undirritað og staðfest úrskurð í máli 007-2022-07 hjá Héraðsdómi Reykjavíkur.

Skjöl málsins eru aðengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, + html: `Dómari hefur undirritað og staðfest úrskurð í máli 007-2022-07 hjá Héraðsdómi Reykjavíkur.

Skjöl málsins eru aðgengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, }), ) }) @@ -169,7 +169,7 @@ describe('InternalNotificationController - Send ruling notifications', () => { expect.objectContaining({ to: [{ name: prosecutor.name, address: prosecutor.email }], subject: 'Úrskurður í máli 007-2022-07 leiðréttur', - html: `Dómari hefur leiðrétt úrskurð í máli 007-2022-07 hjá Héraðsdómi Reykjavíkur.

Skjöl málsins eru aðengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, + html: `Dómari hefur leiðrétt úrskurð í máli 007-2022-07 hjá Héraðsdómi Reykjavíkur.

Skjöl málsins eru aðgengileg á ${expectedLink}yfirlitssíðu málsins í Réttarvörslugátt.`, }), ) }) diff --git a/apps/judicial-system/digital-mailbox-api/src/app/app.config.ts b/apps/judicial-system/digital-mailbox-api/src/app/app.config.ts index 5c52fbad0eac..5f7cb17ecf78 100644 --- a/apps/judicial-system/digital-mailbox-api/src/app/app.config.ts +++ b/apps/judicial-system/digital-mailbox-api/src/app/app.config.ts @@ -1,15 +1,28 @@ import { defineConfig } from '@island.is/nest/config' -export default defineConfig({ - name: 'AppModule', +export const digitalMailboxModuleConfig = defineConfig({ + name: 'DigitalMailboxModule', load: (env) => ({ - errorReportUrl: env.required('ERROR_EVENT_URL', ''), - backend: { - accessToken: env.required( - 'BACKEND_ACCESS_TOKEN', - 'secret-backend-api-token', - ), - url: env.required('BACKEND_URL', 'http://localhost:3344'), - }, + scope: env.required('AUTH_IDS_SCOPE', 'openid profile'), + clientId: env.required('AUTH_IDS_CLIENT_ID', '@island.is'), + issuer: env.required( + 'IDENTITY_SERVER_ISSUER_URL', + 'https://innskra.island.is', + ), + clientSecret: env.required('AUTH_IDS_SECRET', ''), + redirectUri: env.required( + 'AUTH_IDS_REDIRECT_URI', + 'http://localhost:4200/api/auth/callback/identity-server', + ), + logoutRedirectUri: env.required( + 'AUTH_IDS_LOGOUT_REDIRECT_URI', + 'http://localhost:4200', + ), + allowAuthBypass: env.required('ALLOW_AUTH_BYPASS', 'true') === 'true', + backendUrl: env.required('BACKEND_URL', 'http://localhost:3344'), + secretToken: env.required( + 'BACKEND_ACCESS_TOKEN', + 'secret-backend-api-token', + ), }), }) diff --git a/apps/judicial-system/digital-mailbox-api/src/app/app.controller.ts b/apps/judicial-system/digital-mailbox-api/src/app/app.controller.ts index 5bda74f60457..842481baa932 100644 --- a/apps/judicial-system/digital-mailbox-api/src/app/app.controller.ts +++ b/apps/judicial-system/digital-mailbox-api/src/app/app.controller.ts @@ -1,12 +1,17 @@ -import { Controller, Get, Inject } from '@nestjs/common' +import { Controller, Get, Inject, Query, UseGuards } from '@nestjs/common' import { ApiCreatedResponse } from '@nestjs/swagger' -import type { Logger } from '@island.is/logging' -import { LOGGER_PROVIDER } from '@island.is/logging' +import { type Logger, LOGGER_PROVIDER } from '@island.is/logging' +import type { User as TUser } from '@island.is/judicial-system/types' + +import { JwtAuthGuard } from './guards/auth.guard' +import { User } from './guards/user.decorator' +import { CasesResponse } from './models/cases.response' import { AppService } from './app.service' @Controller('api') +@UseGuards(JwtAuthGuard) export class AppController { constructor( private readonly appService: AppService, @@ -15,9 +20,20 @@ export class AppController { @Get('test') @ApiCreatedResponse({ type: String, description: 'Test connection' }) - async test(): Promise { + async test(@User() user: Pick): Promise { this.logger.debug('Testing connection') - return this.appService.testConnection() + return this.appService.testConnection(user.nationalId) + } + + @Get('cases') + @ApiCreatedResponse({ type: String, description: 'Get all cases' }) + async getAllCases( + @User() user: Pick, + @Query() query?: { lang: string }, + ): Promise { + this.logger.debug('Getting all cases') + + return this.appService.getCases(user.nationalId, query?.lang) } } diff --git a/apps/judicial-system/digital-mailbox-api/src/app/app.module.ts b/apps/judicial-system/digital-mailbox-api/src/app/app.module.ts index 9ebdfe08242e..9e6d767c6bac 100644 --- a/apps/judicial-system/digital-mailbox-api/src/app/app.module.ts +++ b/apps/judicial-system/digital-mailbox-api/src/app/app.module.ts @@ -8,17 +8,19 @@ import { auditTrailModuleConfig, } from '@island.is/judicial-system/audit-trail' -import appModuleConfig from './app.config' +import { AuthModule } from '../lib/auth.module' +import { digitalMailboxModuleConfig } from './app.config' import { AppController } from './app.controller' import { AppService } from './app.service' @Module({ imports: [ + AuthModule, AuditTrailModule, ProblemModule.forRoot({ logAllErrors: true }), ConfigModule.forRoot({ isGlobal: true, - load: [appModuleConfig, auditTrailModuleConfig], + load: [digitalMailboxModuleConfig, auditTrailModuleConfig], }), ], controllers: [AppController], diff --git a/apps/judicial-system/digital-mailbox-api/src/app/app.service.ts b/apps/judicial-system/digital-mailbox-api/src/app/app.service.ts index 4b935505d940..0941a71390e4 100644 --- a/apps/judicial-system/digital-mailbox-api/src/app/app.service.ts +++ b/apps/judicial-system/digital-mailbox-api/src/app/app.service.ts @@ -1,28 +1,104 @@ -import { Inject, Injectable } from '@nestjs/common' +import { BadGatewayException, Inject, Injectable } from '@nestjs/common' -import type { Logger } from '@island.is/logging' -import { LOGGER_PROVIDER } from '@island.is/logging' +import { type Logger, LOGGER_PROVIDER } from '@island.is/logging' import { type ConfigType } from '@island.is/nest/config' -import { AuditTrailService } from '@island.is/judicial-system/audit-trail' +import { + AuditedAction, + AuditTrailService, +} from '@island.is/judicial-system/audit-trail' +import { isCompletedCase } from '@island.is/judicial-system/types' -import appModuleConfig from './app.config' +import { CasesResponse } from './models/cases.response' +import { InternalCasesResponse } from './models/internalCases.response' +import { digitalMailboxModuleConfig } from './app.config' @Injectable() export class AppService { constructor( - @Inject(appModuleConfig.KEY) - private readonly config: ConfigType, + @Inject(digitalMailboxModuleConfig.KEY) + private readonly config: ConfigType, @Inject(LOGGER_PROVIDER) private readonly logger: Logger, private readonly auditTrailService: AuditTrailService, ) {} - private async test(): Promise { - return 'OK' + private async test(nationalId: string): Promise { + return `OK ${nationalId}` } - async testConnection(): Promise { - //TODO: Audit - return this.test() + async testConnection(nationalId: string): Promise { + return this.test(nationalId) + } + + private format( + response: InternalCasesResponse[], + lang?: string, + ): CasesResponse[] { + return response.map((item: InternalCasesResponse) => { + const language = lang?.toLowerCase() + + return { + id: item.id, + state: { + color: isCompletedCase(item.state) ? 'purple' : 'blue', + label: + language === 'en' + ? isCompletedCase(item.state) + ? 'Completed' + : 'Active' + : isCompletedCase(item.state) + ? 'Lokið' + : 'Í vinnslu', + }, + caseNumber: + language === 'en' + ? `Case number ${item.courtCaseNumber}` + : `Málsnúmer ${item.courtCaseNumber}`, + type: language === 'en' ? 'Indictment' : 'Ákæra', + } + }) + } + + private async getAllCases( + nationalId: string, + lang?: string, + ): Promise { + return fetch(`${this.config.backendUrl}/api/internal/cases/indictments`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + authorization: `Bearer ${this.config.secretToken}`, + }, + body: JSON.stringify({ nationalId }), + }) + .then(async (res) => { + const response = await res.json() + + if (res.ok) { + return this.format(response, lang) + } + + if (res.status < 500) { + throw new BadGatewayException(response?.detail) + } + + throw response + }) + .catch((reason) => { + if (reason instanceof BadGatewayException) { + throw reason + } + + throw new BadGatewayException(reason) + }) + } + + async getCases(nationalId: string, lang?: string): Promise { + return this.auditTrailService.audit( + 'digital-mailbox-api', + AuditedAction.GET_INDICTMENTS, + this.getAllCases(nationalId, lang), + nationalId, + ) } } diff --git a/apps/judicial-system/digital-mailbox-api/src/app/guards/auth.guard.ts b/apps/judicial-system/digital-mailbox-api/src/app/guards/auth.guard.ts new file mode 100644 index 000000000000..db03048f5cc7 --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/app/guards/auth.guard.ts @@ -0,0 +1,17 @@ +import { Injectable, UnauthorizedException } from '@nestjs/common' +import { AuthGuard } from '@nestjs/passport' + +import type { User } from '@island.is/judicial-system/types' + +@Injectable() +export class JwtAuthGuard extends AuthGuard('jwt') { + handleRequest>( + err: Error, + user: TUser, + ): TUser { + if (err || !user) { + throw new UnauthorizedException(err?.message || 'Unauthorized') //TODO: better error handling + } + return user + } +} diff --git a/apps/judicial-system/digital-mailbox-api/src/app/guards/user.decorator.ts b/apps/judicial-system/digital-mailbox-api/src/app/guards/user.decorator.ts new file mode 100644 index 000000000000..199ed60d988a --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/app/guards/user.decorator.ts @@ -0,0 +1,8 @@ +import { createParamDecorator, ExecutionContext } from '@nestjs/common' + +export const User = createParamDecorator( + (data: unknown, ctx: ExecutionContext) => { + const request = ctx.switchToHttp().getRequest() + return request.user + }, +) diff --git a/apps/judicial-system/digital-mailbox-api/src/app/models/cases.response.ts b/apps/judicial-system/digital-mailbox-api/src/app/models/cases.response.ts new file mode 100644 index 000000000000..36b1db25739d --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/app/models/cases.response.ts @@ -0,0 +1,18 @@ +import { ApiProperty } from '@nestjs/swagger' + +export class CasesResponse { + @ApiProperty({ type: String }) + id!: string + + @ApiProperty({ type: String }) + caseNumber!: string + + @ApiProperty({ type: String }) + type!: string + + @ApiProperty({ type: Object }) + state!: { + color: string + label: string + } +} diff --git a/apps/judicial-system/digital-mailbox-api/src/app/models/internalCases.response.ts b/apps/judicial-system/digital-mailbox-api/src/app/models/internalCases.response.ts new file mode 100644 index 000000000000..84b653596213 --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/app/models/internalCases.response.ts @@ -0,0 +1,17 @@ +import { ApiProperty } from '@nestjs/swagger' + +import { CaseState } from '@island.is/judicial-system/types' + +export class InternalCasesResponse { + @ApiProperty({ type: String }) + id!: string + + @ApiProperty({ type: String }) + courtCaseNumber!: string + + @ApiProperty({ type: String }) + type!: string + + @ApiProperty({ type: String }) + state!: CaseState +} diff --git a/apps/judicial-system/digital-mailbox-api/src/lib/auth.module.ts b/apps/judicial-system/digital-mailbox-api/src/lib/auth.module.ts new file mode 100644 index 000000000000..74a61fd3bc0e --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/lib/auth.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common' +import { PassportModule } from '@nestjs/passport' + +import { JwtStrategy } from './jwt.strategy' + +@Module({ + imports: [PassportModule], + providers: [JwtStrategy], + exports: [PassportModule], +}) +export class AuthModule {} diff --git a/apps/judicial-system/digital-mailbox-api/src/lib/jwt.strategy.ts b/apps/judicial-system/digital-mailbox-api/src/lib/jwt.strategy.ts new file mode 100644 index 000000000000..107d023332ab --- /dev/null +++ b/apps/judicial-system/digital-mailbox-api/src/lib/jwt.strategy.ts @@ -0,0 +1,36 @@ +import jwksRsa from 'jwks-rsa' +import { ExtractJwt, Strategy } from 'passport-jwt' + +import { Inject, Injectable } from '@nestjs/common' +import { ConfigType } from '@nestjs/config' +import { PassportStrategy } from '@nestjs/passport' + +import { User as TUser } from '@island.is/judicial-system/types' + +import { digitalMailboxModuleConfig } from '../app/app.config' + +@Injectable() +export class JwtStrategy extends PassportStrategy(Strategy) { + constructor( + @Inject(digitalMailboxModuleConfig.KEY) + config: ConfigType, + ) { + super({ + jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), + secretOrKeyProvider: jwksRsa.passportJwtSecret({ + cache: true, + rateLimit: true, + jwksUri: `${config.issuer}/.well-known/openid-configuration/jwks`, + }), + audience: config.clientId, + issuer: config.issuer, + algorithms: ['RS256'], + }) + } + + async validate(payload?: Pick) { + return { + nationalId: payload?.nationalId, + } + } +} diff --git a/apps/judicial-system/web/messages/Core/tables.ts b/apps/judicial-system/web/messages/Core/tables.ts index eb31f2865a5d..9cf5cab7a30f 100644 --- a/apps/judicial-system/web/messages/Core/tables.ts +++ b/apps/judicial-system/web/messages/Core/tables.ts @@ -97,4 +97,10 @@ export const tables = defineMessages({ defaultMessage: 'Ákvörðun', description: 'Notaður sem titill fyrir ákvörðun dálk í lista yfir mál.', }, + verdictViewState: { + id: 'judicial.system.core:tables.verdict_view_state', + defaultMessage: 'Birtingarstaða', + description: + 'Notaður sem titill fyrir birtingarstaða dálk í lista yfir mál.', + }, }) diff --git a/apps/judicial-system/web/src/components/FormProvider/case.graphql b/apps/judicial-system/web/src/components/FormProvider/case.graphql index dd224b72299b..a38e90c4fc42 100644 --- a/apps/judicial-system/web/src/components/FormProvider/case.graphql +++ b/apps/judicial-system/web/src/components/FormProvider/case.graphql @@ -24,6 +24,7 @@ query Case($input: CaseQueryInput!) { defendantPlea serviceRequirement verdictViewDate + verdictAppealDeadline } defenderName defenderNationalId @@ -260,5 +261,7 @@ query Case($input: CaseQueryInput!) { name } indictmentAppealDeadline + indictmentVerdictViewedByAll + indictmentVerdictAppealDeadline } } diff --git a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx index 8d5b7e4ea0a2..c26ca6f61568 100644 --- a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx +++ b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx @@ -25,13 +25,19 @@ export type DefendantInfoActionButton = { interface DefendantInfoProps { defendant: Defendant displayDefenderInfo: boolean + displayAppealExpirationInfo?: boolean defendantInfoActionButton?: DefendantInfoActionButton } export const DefendantInfo: FC> = ( props, ) => { - const { defendant, displayDefenderInfo, defendantInfoActionButton } = props + const { + defendant, + displayDefenderInfo, + displayAppealExpirationInfo, + defendantInfoActionButton, + } = props const { formatMessage } = useIntl() const getAppealExpirationInfo = (viewDate?: string) => { @@ -47,7 +53,6 @@ export const DefendantInfo: FC> = ( today < expiryDate ? strings.appealExpirationDate : strings.appealDateExpired - return formatMessage(message, { appealExpirationDate: formatDate(expiryDate, 'P'), }) @@ -75,19 +80,16 @@ export const DefendantInfo: FC> = ( -
- - {getAppealExpirationInfo(defendant.verdictViewDate ?? '')} - -
+ {displayAppealExpirationInfo && ( + + + {getAppealExpirationInfo(defendant.verdictViewDate ?? '')} + + + )} {defendant.defenderName && displayDefenderInfo && ( - + {`${formatMessage(strings.defender)}: ${ defendant.defenderName }`} diff --git a/apps/judicial-system/web/src/components/InfoCard/InfoCard.tsx b/apps/judicial-system/web/src/components/InfoCard/InfoCard.tsx index 0dd85e15c729..75a92e5a2259 100644 --- a/apps/judicial-system/web/src/components/InfoCard/InfoCard.tsx +++ b/apps/judicial-system/web/src/components/InfoCard/InfoCard.tsx @@ -38,6 +38,7 @@ interface Props { title: string items: Defendant[] defendantInfoActionButton?: DefendantInfoActionButton + displayAppealExpirationInfo?: boolean } defenders?: Defender[] icon?: IconMapIcon @@ -115,7 +116,7 @@ const InfoCard: React.FC = (props) => { {defendants && ( <> @@ -123,8 +124,12 @@ const InfoCard: React.FC = (props) => { {defendants.items.map((defendant) => ( = (props) => { ), items: workingCase.defendants, defendantInfoActionButton: defendantInfoActionButton, + displayAppealExpirationInfo: true, } : undefined } diff --git a/apps/judicial-system/web/src/routes/Prosecutor/components/DefendantInfo/DefendantInfo.tsx b/apps/judicial-system/web/src/routes/Prosecutor/components/DefendantInfo/DefendantInfo.tsx index 72b3c2e64a15..ec6f731369c6 100644 --- a/apps/judicial-system/web/src/routes/Prosecutor/components/DefendantInfo/DefendantInfo.tsx +++ b/apps/judicial-system/web/src/routes/Prosecutor/components/DefendantInfo/DefendantInfo.tsx @@ -110,7 +110,9 @@ const DefendantInfo: React.FC> = (props) => { address: personData.items[0].permanent_address.street?.nominative, }) } - }, [defendant.id, onChange, personData, personError, workingCase.id]) + // We only want this to run when a lookup is done in the national registry. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [personData, personError]) useEffect(() => { if (businessError || (businessData && businessData.items?.length === 0)) { @@ -133,7 +135,9 @@ const DefendantInfo: React.FC> = (props) => { citizenship: undefined, }) } - }, [businessData, businessError, defendant.id, onChange, workingCase.id]) + // We only want this to run when a lookup is done in the national registry. + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [businessData, businessError]) return ( diff --git a/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts b/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts index 420994b1d6d5..86650607956f 100644 --- a/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts +++ b/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.strings.ts @@ -30,4 +30,22 @@ export const strings = defineMessages({ description: 'Notaður sem titill á upplýsingaglugga ef engin yfirlesin mál eru til.', }, + tagVerdictUnviewed: { + id: 'judicial.system.core:public_prosecutor.tables.cases_reviewed.tag_verdict_unviewed', + defaultMessage: 'Óbirt', + description: + 'Notað sem texti á taggi fyrir "Dómur óbirtur" í yfirlesin mál málalista', + }, + tagVerdictViewOnDeadline: { + id: 'judicial.system.core:public_prosecutor.tables.cases_reviewed.tag_verdict_on_appeal_deadline', + defaultMessage: 'Á fresti', + description: + 'Notað sem texti á taggi fyrir "Á fresti" í yfirlesin mál málalista', + }, + tagVerdictViewComplete: { + id: 'judicial.system.core:public_prosecutor.tables.cases_reviewed.tag_verdict_viewed', + defaultMessage: 'Fullunnið', + description: + 'Notað sem texti á taggi fyrir "Dómur birtur" í yfirlesin mál málalista', + }, }) diff --git a/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx b/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx index 2abfc0dc1b3c..9569db67b06e 100644 --- a/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx +++ b/apps/judicial-system/web/src/routes/PublicProsecutor/Tables/CasesReviewed.tsx @@ -40,6 +40,26 @@ const CasesReviewed: FC = ({ loading, cases }) => { ), } + const getVerdictViewTag = (row: CaseListEntry) => { + const today = new Date() + const deadline = new Date(row.indictmentVerdictAppealDeadline ?? '') + const variant = !row.indictmentVerdictViewedByAll + ? 'red' + : today > deadline + ? 'mint' + : 'blue' + const message = !row.indictmentVerdictViewedByAll + ? strings.tagVerdictUnviewed + : today > deadline + ? strings.tagVerdictViewComplete + : strings.tagVerdictViewOnDeadline + return ( + + {formatMessage(message)} + + ) + } + return ( <> @@ -58,6 +78,7 @@ const CasesReviewed: FC = ({ loading, cases }) => { sortable: { isSortable: true, key: 'defendant' }, }, { title: formatMessage(tables.reviewDecision) }, + { title: formatMessage(tables.verdictViewState) }, { title: formatMessage(tables.prosecutorName) }, ]} data={cases} @@ -86,9 +107,10 @@ const CasesReviewed: FC = ({ loading, cases }) => { ), }, { - cell: (row: CaseListEntry) => ( - {row.indictmentReviewer?.name} - ), + cell: (row) => getVerdictViewTag(row), + }, + { + cell: (row) => {row.indictmentReviewer?.name}, }, ]} /> diff --git a/apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql b/apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql index 1200c0033236..2fd62e99ff51 100644 --- a/apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql +++ b/apps/judicial-system/web/src/routes/Shared/Cases/cases.graphql @@ -26,6 +26,7 @@ query Cases { name noNationalId defendantWaivesRightToCounsel + verdictViewDate } courtDate isValidToDateInThePast @@ -89,5 +90,7 @@ query Cases { } indictmentReviewDecision indictmentAppealDeadline + indictmentVerdictViewedByAll + indictmentVerdictAppealDeadline } } diff --git a/apps/native/app/src/assets/icons/inbox-read.png b/apps/native/app/src/assets/icons/inbox-read.png new file mode 100644 index 000000000000..c874d0b83c6b Binary files /dev/null and b/apps/native/app/src/assets/icons/inbox-read.png differ diff --git a/apps/native/app/src/assets/icons/inbox-read@2x.png b/apps/native/app/src/assets/icons/inbox-read@2x.png new file mode 100644 index 000000000000..0336e26b1cd1 Binary files /dev/null and b/apps/native/app/src/assets/icons/inbox-read@2x.png differ diff --git a/apps/native/app/src/assets/icons/inbox-read@3x.png b/apps/native/app/src/assets/icons/inbox-read@3x.png new file mode 100644 index 000000000000..f62dce9aea5a Binary files /dev/null and b/apps/native/app/src/assets/icons/inbox-read@3x.png differ diff --git a/apps/native/app/src/graphql/client.ts b/apps/native/app/src/graphql/client.ts index e0ebe1cc16b9..096adb246d21 100644 --- a/apps/native/app/src/graphql/client.ts +++ b/apps/native/app/src/graphql/client.ts @@ -154,6 +154,19 @@ const cache = new InMemoryCache({ } }, typePolicies: { + Query: { + fields: { + userNotifications: { + merge(existing, incoming) { + return { + ...existing, + ...incoming, + data: incoming.data || existing.data, + } + }, + }, + }, + }, Document: { fields: { archived: { diff --git a/apps/native/app/src/graphql/queries/notifications.graphql b/apps/native/app/src/graphql/queries/notifications.graphql index 788b25b6663c..64c2d16f982c 100644 --- a/apps/native/app/src/graphql/queries/notifications.graphql +++ b/apps/native/app/src/graphql/queries/notifications.graphql @@ -37,3 +37,9 @@ mutation MarkAllNotificationsAsSeen { success } } + +mutation MarkAllNotificationsAsRead { + markAllNotificationsRead { + success + } +} diff --git a/apps/native/app/src/messages/en.ts b/apps/native/app/src/messages/en.ts index 4e9a342e8802..1f9b5bf86547 100644 --- a/apps/native/app/src/messages/en.ts +++ b/apps/native/app/src/messages/en.ts @@ -274,6 +274,8 @@ export const en: TranslatedMessages = { // notifications 'notifications.screenTitle': 'Notifications', + 'notifications.markAllAsRead': 'Mark all as read', + 'notifications.settings': 'My settings', 'notifications.errorUnknown': 'Error occurred while loading notifications', // profile diff --git a/apps/native/app/src/messages/is.ts b/apps/native/app/src/messages/is.ts index 21a23e9f5b43..dd4cb29ef539 100644 --- a/apps/native/app/src/messages/is.ts +++ b/apps/native/app/src/messages/is.ts @@ -408,6 +408,8 @@ export const is = { // notifications 'notifications.screenTitle': 'Tilkynningar', + 'notifications.markAllAsRead': 'Merkja allt lesið', + 'notifications.settings': 'Mínar stillingar', 'notifications.errorUnknown': 'Villa kom upp við að sækja tilkynningar', // applications screen diff --git a/apps/native/app/src/screens/inbox/inbox.tsx b/apps/native/app/src/screens/inbox/inbox.tsx index ac1a5700a987..e558dd70f602 100644 --- a/apps/native/app/src/screens/inbox/inbox.tsx +++ b/apps/native/app/src/screens/inbox/inbox.tsx @@ -445,25 +445,13 @@ export const InboxScreen: NavigationFunctionComponent<{ id: 'inbox.filterButtonTitle', })} isOutlined + isUtilityButton style={{ - minWidth: 0, paddingTop: 0, paddingBottom: 0, - minHeight: 0, - borderColor: dynamicColor({ - light: '#CCDFFF', - dark: '#CCDFFF55', - }), }} icon={FilterIcon} iconStyle={{ tintColor: theme.color.blue400 }} - textStyle={{ - fontSize: 12, - color: dynamicColor({ - light: '#00003C', - dark: '#fff', - }), - }} onPress={() => { navigateTo('/inbox-filter', { opened, diff --git a/apps/native/app/src/screens/notifications/notifications.tsx b/apps/native/app/src/screens/notifications/notifications.tsx index 03adf84b246b..208655e1a3cf 100644 --- a/apps/native/app/src/screens/notifications/notifications.tsx +++ b/apps/native/app/src/screens/notifications/notifications.tsx @@ -1,4 +1,12 @@ -import { NavigationBarSheet, NotificationCard, Skeleton } from '@ui' +import { + Button, + NavigationBarSheet, + NotificationCard, + Skeleton, + Problem, +} from '@ui' +import { Reference, useApolloClient } from '@apollo/client' + import { dismissAllNotificationsAsync } from 'expo-notifications' import React, { useCallback, useEffect, useMemo, useState } from 'react' import { useIntl } from 'react-intl' @@ -13,12 +21,13 @@ import { GetUserNotificationsQuery, Notification, useGetUserNotificationsQuery, + useMarkAllNotificationsAsReadMutation, useMarkAllNotificationsAsSeenMutation, useMarkUserNotificationAsReadMutation, } from '../../graphql/types/schema' import { createNavigationOptionHooks } from '../../hooks/create-navigation-option-hooks' -import { navigateToNotification } from '../../lib/deep-linking' +import { navigateTo, navigateToNotification } from '../../lib/deep-linking' import { useNotificationsStore } from '../../stores/notifications-store' import { createSkeletonArr, @@ -26,13 +35,20 @@ import { } from '../../utils/create-skeleton-arr' import { isAndroid } from '../../utils/devices' import { testIDs } from '../../utils/test-ids' -import { Problem } from '@ui/lib/problem/problem' +import settings from '../../assets/icons/settings.png' +import inboxRead from '../../assets/icons/inbox-read.png' const LoadingWrapper = styled.View` padding-vertical: ${({ theme }) => theme.spacing[3]}px; ${({ theme }) => isAndroid && `padding-bottom: ${theme.spacing[6]}px;`} ` +const ButtonWrapper = styled.View` + flex-direction: row; + margin-horizontal: ${({ theme }) => theme.spacing[2]}px; + margin-top: ${({ theme }) => theme.spacing[2]}px; +` + const DEFAULT_PAGE_SIZE = 50 const { getNavigationOptions, useNavigationOptions } = @@ -54,6 +70,7 @@ export const NotificationsScreen: NavigationFunctionComponent = ({ useNavigationOptions(componentId) const intl = useIntl() const theme = useTheme() + const client = useApolloClient() const [loadingMore, setLoadingMore] = useState(false) const updateNavigationUnseenCount = useNotificationsStore( ({ updateNavigationUnseenCount }) => updateNavigationUnseenCount, @@ -62,11 +79,52 @@ export const NotificationsScreen: NavigationFunctionComponent = ({ const { data, loading, error, fetchMore } = useGetUserNotificationsQuery({ variables: { input: { limit: DEFAULT_PAGE_SIZE } }, }) + const showError = error && !data const [markUserNotificationAsRead] = useMarkUserNotificationAsReadMutation() const [markAllUserNotificationsAsSeen] = useMarkAllNotificationsAsSeenMutation() + const [markAllUserNotificationsAsRead] = + useMarkAllNotificationsAsReadMutation({ + onCompleted: (data) => { + if (data.markAllNotificationsRead?.success) { + // If all notifications are marked as read, update cache to reflect that + client.cache.modify({ + fields: { + userNotifications(existingNotifications = {}) { + const existingDataRefs = existingNotifications.data || [] + + const updatedData = existingDataRefs.forEach( + (ref: Reference | NotificationItem) => { + const id = client.cache.identify(ref) + client.cache.modify({ + id, + fields: { + metadata(existingMetadata) { + return { + ...existingMetadata, + read: false, + } + }, + }, + }) + return ref + }, + ) + + return { + ...existingNotifications, + data: updatedData, + unreadCount: 0, + } + }, + }, + }) + } + }, + }) + // On mount, mark all notifications as seen and update all screens navigation badge to 0 useEffect(() => { void markAllUserNotificationsAsSeen().then(() => @@ -97,7 +155,12 @@ export const NotificationsScreen: NavigationFunctionComponent = ({ }, []) const handleEndReached = async () => { - if (loadingMore || loading) return + if ( + loadingMore || + loading || + (data && !data?.userNotifications?.pageInfo.hasNextPage) + ) + return setLoadingMore(true) @@ -163,9 +226,12 @@ export const NotificationsScreen: NavigationFunctionComponent = ({ date={new Date(item.metadata.sent)} icon={ item.sender?.logoUrl && { - uri: `${item.sender.logoUrl}?w=64&h=64&fit=pad&bg=white&fm=png`, + uri: `${item.sender.logoUrl}?w=64&h=64&fit=pad&fm=png`, } } + underlayColor={ + theme.isDark ? theme.shade.shade400 : theme.color.blue100 + } unread={!item.metadata.read} onPress={() => onNotificationPress(item)} testID={testIDs.NOTIFICATION_CARD_BUTTON} @@ -187,11 +253,42 @@ export const NotificationsScreen: NavigationFunctionComponent = ({ style={{ marginHorizontal: 16 }} /> - {error ? ( + + diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/index.tsx b/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/index.tsx index f007395db344..c6c2a93a3991 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/index.tsx +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/index.tsx @@ -25,7 +25,13 @@ import { useMutation } from '@apollo/client' export const Overview: FC< React.PropsWithChildren -> = ({ setStep, reviewerNationalId = '', buyerOperator = {}, ...props }) => { +> = ({ + setStep, + reviewerNationalId = '', + buyerOperator = {}, + location = {}, + ...props +}) => { const { application, refetch } = props const { formatMessage } = useLocale() @@ -101,6 +107,7 @@ export const Overview: FC< diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/sections/LocationSection.tsx b/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/sections/LocationSection.tsx index 6ddc4e1803ec..dea5ce56ac83 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/sections/LocationSection.tsx +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/fields/Overview/sections/LocationSection.tsx @@ -44,6 +44,13 @@ export const LocationSection: FC< ? `${location.address} - ${location.postCode}` : formatMessage(overview.labels.noLocation)} + + {location?.moreInfo + ? `${location.moreInfo.slice(0, 25)}${ + location.moreInfo.length > 25 ? '...' : '' + }` + : ''} + diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/Rejected.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/Rejected.ts index d0d316ffdea9..680cd004e95f 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/Rejected.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/Rejected.ts @@ -9,6 +9,8 @@ import { } from '../lib/messages' import { Logo } from '../assets/Logo' import { buildFormConclusionSection } from '@island.is/application/ui-forms' +import { Machine } from '../shared' +import { getSelectedMachine } from '../utils' export const Rejected: Form = buildForm({ id: 'RejectedApplicationForm', @@ -37,12 +39,23 @@ export const Rejected: Form = buildForm({ children: [], }), buildFormConclusionSection({ - sectionTitle: conclusion.general.rejectedTitle, - multiFieldTitle: conclusion.general.title, + sectionTitle: conclusion.general.sectionTitle, alertTitle: conclusion.rejected.alertMessage, + multiFieldTitle: conclusion.general.title, alertMessage: conclusion.rejected.thirdText, - expandableHeader: conclusion.rejected.firstText, - expandableDescription: conclusion.rejected.secondText, + expandableHeader: (application) => { + const machine = getSelectedMachine( + application.externalData, + application.answers, + ) as Machine + return { + ...conclusion.rejected.firstText, + values: { regNumber: machine.regNumber }, + } + }, + expandableDescription: '', + expandableIntro: conclusion.rejected.secondText, + alertType: 'error', }), ], }) diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/buyerSubSection.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/buyerSubSection.ts index bc183003b2bc..c7f75e4884dd 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/buyerSubSection.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/buyerSubSection.ts @@ -3,6 +3,7 @@ import { buildNationalIdWithNameField, buildPhoneField, buildSubSection, + buildSubmitField, buildTextField, } from '@island.is/application/core' import { information } from '../../../lib/messages' diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/pickMachineSubSection.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/pickMachineSubSection.ts index 6b50aa8e997a..cc875ba4df91 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/pickMachineSubSection.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/forms/TransferOfMachineOwnershipForm/InformationSection/pickMachineSubSection.ts @@ -18,7 +18,7 @@ export const pickMachineSubSection = buildSubSection({ description: information.labels.pickMachine.description, children: [ buildRadioField({ - id: 'pickMachine.id', + id: 'machine.id', title: information.labels.pickMachine.title, condition: (_, externalData) => { const machines = getValueViaPath( diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/graphql/queries.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/graphql/queries.ts index 7111e293fde7..00be54cb2108 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/graphql/queries.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/graphql/queries.ts @@ -37,6 +37,7 @@ query GetMachineByRegno($regno: String!, $rel: String!) { plate disabled supervisorName + paymentRequiredForOwnerChange } } ` diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts index da959165e0d7..dbe3279c647a 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/TransferOfMachineOwnershipTemplate.ts @@ -180,14 +180,22 @@ const template: ApplicationTemplate< delete: true, }, ], + onExit: [ + defineTemplateApi({ + action: ApiActions.initReview, + }), + ], }, on: { [DefaultEvents.SUBMIT]: [ { target: States.PAYMENT, + cond: (application) => isPaymentRequired(application), + }, + { + target: States.REVIEW, cond: (application) => !isPaymentRequired(application), }, - { target: States.REVIEW }, ], }, }, diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/conclusion.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/conclusion.ts index 71ea68cb0680..96f384d443ab 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/conclusion.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/conclusion.ts @@ -74,7 +74,8 @@ export const conclusion = { rejected: defineMessages({ alertMessage: { id: 'aosh.tmo.application:conclusion.rejected.alertMessage', - defaultMessage: 'Tilkynning um eigendaskipti - Umsókn afturkölluð!', + defaultMessage: + 'Tilkynning um eigendaskipti - Umsókn afturkölluð! {regNumber}', description: 'Conclusion rejected alert message', }, firstText: { diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/information.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/information.ts index 0fff793c0900..5678775a9c72 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/information.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/lib/messages/information.ts @@ -261,6 +261,11 @@ export const information = { defaultMessage: 'Gsm númer', description: 'Buyer phone number label', }, + submitButton: { + id: 'aosh.tmo.application:information.labels.buyer.submitButton', + defaultMessage: 'Staðfesta', + description: 'Submit button for buyer', + }, }), buyerOperators: defineMessages({ title: { diff --git a/libs/application/templates/aosh/transfer-of-machine-ownership/src/utils/getSelectedMachine.ts b/libs/application/templates/aosh/transfer-of-machine-ownership/src/utils/getSelectedMachine.ts index 0a3ba85b5c49..cf579479964d 100644 --- a/libs/application/templates/aosh/transfer-of-machine-ownership/src/utils/getSelectedMachine.ts +++ b/libs/application/templates/aosh/transfer-of-machine-ownership/src/utils/getSelectedMachine.ts @@ -7,7 +7,12 @@ export const getSelectedMachine = ( externalData: ExternalData, answers: FormValue, ) => { - const machineId = getValueViaPath(answers, 'pickMachine.id', '') as Machine + if (answers.findVehicle) { + const machine = getValueViaPath(answers, 'machine') as Machine + return machine + } + + const machineId = getValueViaPath(answers, 'machine.id', '') as Machine const machinesWithTotal = getValueViaPath( externalData, 'machinesList.data', diff --git a/libs/application/templates/car-recycling/src/lib/CarRecyclingTemplate.ts b/libs/application/templates/car-recycling/src/lib/CarRecyclingTemplate.ts index 489d3ff3b8dc..144f64869049 100644 --- a/libs/application/templates/car-recycling/src/lib/CarRecyclingTemplate.ts +++ b/libs/application/templates/car-recycling/src/lib/CarRecyclingTemplate.ts @@ -21,7 +21,7 @@ import { AuthDelegationType } from '@island.is/shared/types' import { Actions } from '../shared' import { DataSchema } from './dataSchema' import { carRecyclingMessages, statesMessages } from './messages' -import { Features } from '@island.is/feature-flags' + import { VehicleSearchApi } from '../dataProviders' const enum States { @@ -50,7 +50,6 @@ const CarRecyclingTemplate: ApplicationTemplate< institution: carRecyclingMessages.shared.institution, translationNamespaces: [ApplicationConfigurations.CarRecycling.translation], dataSchema: DataSchema, - featureFlag: Features.carRecyclingApplication, allowedDelegations: [ { type: AuthDelegationType.ProcurationHolder }, { diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/dataProviders/index.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/dataProviders/index.ts index f8de130e36d1..ef00215234fb 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/dataProviders/index.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/dataProviders/index.ts @@ -23,11 +23,6 @@ export const ApplicantInformationApi = defineTemplateApi({ externalDataId: 'applicantInformation', }) -export const ResidenceConditionInfoApi = defineTemplateApi({ - action: ApiActions.getResidenceConditionInfo, - externalDataId: 'residenceConditionInfo', -}) - export const ResidenceInIcelandLastChangeDateApi = defineTemplateApi({ action: ApiActions.getResidenceInIcelandLastChangeDate, externalDataId: 'residenceInIcelandLastChangeDate', diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/fields/FormerIcelander/index.tsx b/libs/application/templates/directorate-of-immigration/citizenship/src/fields/FormerIcelander/index.tsx deleted file mode 100644 index 8596a0615a5a..000000000000 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/fields/FormerIcelander/index.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { FC, useState } from 'react' -import { information } from '../../lib/messages' -import { Box } from '@island.is/island-ui/core' -import { RadioController } from '@island.is/shared/form-fields' -import { useLocale } from '@island.is/localization' -import { getValueViaPath, NO, YES } from '@island.is/application/core' -import { FieldBaseProps } from '@island.is/application/types' - -export const FormerIcelander: FC = ({ application }) => { - const { answers } = application - - const [isFormerIcelander, setIsFormerIcelander] = useState( - getValueViaPath(answers, 'formerIcelander', '') as string, - ) - - const { formatMessage } = useLocale() - - const handleIsFormerIcelanderChange = (value: string) => { - setIsFormerIcelander(value) - } - - return ( - - { - handleIsFormerIcelanderChange(value) - }} - defaultValue={isFormerIcelander} - options={[ - { - value: YES, - label: formatMessage( - information.labels.radioButtons.radioOptionYes, - ), - }, - { - value: NO, - label: formatMessage(information.labels.radioButtons.radioOptionNo), - }, - ]} - /> - - ) -} diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/fields/index.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/fields/index.ts index b5f03c1f7246..224d3fbc69f6 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/fields/index.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/fields/index.ts @@ -5,6 +5,5 @@ export { Parents } from './Parents' export { StaysAbroad } from './StaysAbroad' export { CriminalRecords } from './CriminalRecords' export { Review } from './Review' -export { FormerIcelander } from './FormerIcelander' export { HiddenTextInput } from './HiddenTextInput' export { MoreChildInfo } from './SelectedChildrenExtra' diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/FormerIcelanderSubSection.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/FormerIcelanderSubSection.ts index ad32205529ef..09453213a773 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/FormerIcelanderSubSection.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/FormerIcelanderSubSection.ts @@ -7,27 +7,46 @@ import { getValueViaPath, } from '@island.is/application/core' import { information } from '../../../lib/messages' -import { Answer, YES } from '@island.is/application/types' +import { Answer, FormValue, YES } from '@island.is/application/types' import { Citizenship } from '../../../lib/dataSchema' -import { ApplicantResidenceConditionViewModel } from '@island.is/clients/directorate-of-immigration' +import { ApplicantInformation, ParentsToApplicant } from '../../../shared' export const FormerIcelanderSubSection = buildSubSection({ id: 'formerIcelander', title: information.labels.formerIcelander.subSectionTitle, - condition: (answer: Answer, externalData) => { - const answers = answer as Citizenship - const hasValidParents = answers?.parentInformation?.hasValidParents === YES - + condition: (formValue: FormValue, externalData) => { const residenceConditionInfo = getValueViaPath( externalData, - 'residenceConditionInfo.data', + 'applicantInformation.data.residenceConditionInfo', {}, - ) as ApplicantResidenceConditionViewModel - const isAnyResConValid = residenceConditionInfo.isAnyResConValid + ) as ApplicantInformation + + const parentAnswer = getValueViaPath( + formValue, + 'parentInformation.parents', + [], + ) as Array + + const totalParentsInAnswer = parentAnswer.filter( + (x) => x.wasRemoved === 'false', + ) + const hasResConMaritalStatus = + residenceConditionInfo.cohabitationISCitizen5YearDomicile || + residenceConditionInfo.cohabitationISCitizen5YrsDomicileMissingDate || + residenceConditionInfo.marriedISCitizenDomicile4Years || + residenceConditionInfo.marriedISCitizenDomicile4YrsMissingDate + + const hasOtherValidResidenceConditions = + residenceConditionInfo.domicileResidence7Years || + residenceConditionInfo.asylumSeekerOrHumanitarianResPerm5year || + residenceConditionInfo.noNationalityAnd5YearsDomicile || + residenceConditionInfo.nordicCitizenship4YearDomicile - // TODO revert - // return !isAnyResConValid && !hasValidParents - return !hasValidParents + return ( + !hasResConMaritalStatus && + !hasOtherValidResidenceConditions && + totalParentsInAnswer.length === 0 + ) }, children: [ buildMultiField({ @@ -49,24 +68,23 @@ export const FormerIcelanderSubSection = buildSubSection({ { value: NO, label: information.labels.radioButtons.radioOptionNo }, ], }), - // TODO revert - // buildAlertMessageField({ - // id: 'formerIcelanderAlert', - // title: information.labels.formerIcelander.alertTitle, - // alertType: 'error', - // message: information.labels.formerIcelander.alertDescription, - // condition: (answer: Answer) => { - // const answers = answer as Citizenship - // return answers?.formerIcelander === NO - // }, - // links: [ - // { - // title: information.labels.formerIcelander.alertLinkTitle, - // url: information.labels.formerIcelander.alertLinkUrl, - // isExternal: true, - // }, - // ], - // }), + buildAlertMessageField({ + id: 'formerIcelanderAlert', + title: information.labels.formerIcelander.alertTitle, + alertType: 'error', + message: information.labels.formerIcelander.alertDescription, + condition: (answer: Answer) => { + const answers = answer as Citizenship + return answers?.formerIcelander === NO + }, + links: [ + { + title: information.labels.formerIcelander.alertLinkTitle, + url: information.labels.formerIcelander.alertLinkUrl, + isExternal: true, + }, + ], + }), ], }), ], diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/MaritalStatusSubSection.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/MaritalStatusSubSection.ts index 95e011f82b71..b2aed0f500ab 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/MaritalStatusSubSection.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/MaritalStatusSubSection.ts @@ -7,41 +7,45 @@ import { } from '@island.is/application/core' import { information } from '../../../lib/messages' import { Application } from '@island.is/api/schema' -import { ApplicantResidenceConditionViewModel } from '@island.is/clients/directorate-of-immigration' import { formatDate } from '../../../utils' import { Routes } from '../../../lib/constants' import { NationalRegistryIndividual, NationalRegistrySpouse, } from '@island.is/application/types' +import { ApplicantInformation } from '../../../shared' export const MaritalStatusSubSection = buildSubSection({ id: Routes.MARITALSTATUS, title: information.labels.maritalStatus.subSectionTitle, condition: (_, externalData) => { - const spouseDetails = getValueViaPath( - externalData, - 'spouseDetails.data', - undefined, - ) as NationalRegistrySpouse | undefined - const maritalStatus = spouseDetails?.maritalStatus - const hasSpouse = !!spouseDetails?.nationalId - const isMarriedOrCohabitation = - maritalStatus === '3' || (maritalStatus === '1' && hasSpouse) - // Check if the only residence condition that the applicant can apply for, is related to marital status const residenceConditionInfo = getValueViaPath( externalData, - 'residenceConditionInfo.data', + 'applicantInformation.data.residenceConditionInfo', {}, - ) as ApplicantResidenceConditionViewModel - const hasOnlyResConMaritalStatus = - residenceConditionInfo.isAnyResConValid && - residenceConditionInfo.isOnlyMarriedOrCohabitationWithISCitizen + ) as ApplicantInformation + + const hasResConMaritalStatus = + residenceConditionInfo.cohabitationISCitizen5YearDomicile || + residenceConditionInfo.cohabitationISCitizen5YrsDomicileMissingDate || + residenceConditionInfo.marriedISCitizenDomicile4Years || + residenceConditionInfo.marriedISCitizenDomicile4YrsMissingDate + + const hasOtherValidResidenceConditions = + residenceConditionInfo.domicileResidence7Years || + residenceConditionInfo.asylumSeekerOrHumanitarianResPerm5year || + residenceConditionInfo.noNationalityAnd5YearsDomicile || + residenceConditionInfo.nordicCitizenship4YearDomicile + + const spouseIsCitizen = residenceConditionInfo.spouseIsCitizen + const eesResidenceCondition = residenceConditionInfo.eesResidenceCondition + const showThisPage = spouseIsCitizen && !eesResidenceCondition - // TODO revert - // return isMarriedOrCohabitation && hasOnlyResConMaritalStatus - return isMarriedOrCohabitation + return ( + (!!hasResConMaritalStatus && !hasOtherValidResidenceConditions) || + !!showThisPage + ) }, children: [ buildMultiField({ diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/ParentsSubSection.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/ParentsSubSection.ts index 30614805c663..40699c1e0d20 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/ParentsSubSection.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/CitizenshipForm/InformationSection/ParentsSubSection.ts @@ -6,7 +6,7 @@ import { } from '@island.is/application/core' import { information } from '../../../lib/messages' import { Routes } from '../../../lib/constants' -import { ApplicantResidenceConditionViewModel } from '@island.is/clients/directorate-of-immigration' +import { ApplicantInformation } from '../../../shared' export const ParentsSubSection = buildSubSection({ id: Routes.PARENTINFORMATION, @@ -14,14 +14,28 @@ export const ParentsSubSection = buildSubSection({ condition: (_, externalData) => { const residenceConditionInfo = getValueViaPath( externalData, - 'residenceConditionInfo.data', + 'applicantInformation.data.residenceConditionInfo', {}, - ) as ApplicantResidenceConditionViewModel - const isAnyResConValid = residenceConditionInfo.isAnyResConValid + ) as ApplicantInformation - // TODO revert - // return !isAnyResConValid - return true + const hasResConMaritalStatus = + residenceConditionInfo.cohabitationISCitizen5YearDomicile || + residenceConditionInfo.cohabitationISCitizen5YrsDomicileMissingDate || + residenceConditionInfo.marriedISCitizenDomicile4Years || + residenceConditionInfo.marriedISCitizenDomicile4YrsMissingDate + + const hasOtherValidResidenceConditions = + residenceConditionInfo.domicileResidence7Years || + residenceConditionInfo.asylumSeekerOrHumanitarianResPerm5year || + residenceConditionInfo.noNationalityAnd5YearsDomicile || + residenceConditionInfo.nordicCitizenship4YearDomicile + + const eesResidenceCondition = residenceConditionInfo.eesResidenceCondition + + return ( + (!hasResConMaritalStatus && !hasOtherValidResidenceConditions) || + !eesResidenceCondition + ) //only show this screen if cohabitation is not a reason for applying and no other conditions are met }, children: [ buildMultiField({ diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/Prerequisites/index.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/Prerequisites/index.ts index d845c241b098..48a928931113 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/forms/Prerequisites/index.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/forms/Prerequisites/index.ts @@ -22,7 +22,6 @@ import { NationalRegistryBirthplaceApi, NationalRegistryParentsApi, NationalRegistrySpouseDetailsApi, - ResidenceConditionInfoApi, ResidenceInIcelandLastChangeDateApi, UserProfileApi, UtlendingastofnunPaymentCatalogApi, @@ -95,10 +94,6 @@ export const Prerequisites: Form = buildForm({ provider: ApplicantInformationApi, title: '', }), - buildDataProviderItem({ - provider: ResidenceConditionInfoApi, - title: '', - }), buildDataProviderItem({ provider: CountriesApi, title: '', diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts index 1f9bdba16bbb..936f02db4cc2 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/lib/CitizenshipTemplate.ts @@ -29,7 +29,6 @@ import { NationalRegistrySpouseDetailsApi, NationalRegistryIndividualApi, NationalRegistryBirthplaceApi, - ResidenceConditionInfoApi, ResidenceInIcelandLastChangeDateApi, CountriesApi, TravelDocumentTypesApi, @@ -92,7 +91,6 @@ const template: ApplicationTemplate< NationalRegistryParentsApi, ChildrenCustodyInformationApi, UserProfileApi, - ResidenceConditionInfoApi, ResidenceInIcelandLastChangeDateApi, CountriesApi, UtlendingastofnunPaymentCatalogApi, diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/lib/dataSchema.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/lib/dataSchema.ts index 55e1a3ed88f6..7895eda6905d 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/lib/dataSchema.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/lib/dataSchema.ts @@ -294,12 +294,7 @@ export const CitizenshipSchema = z.object({ passport: PassportSchema, childrenPassport: z.array(ChildrenPassportSchema).optional(), maritalStatus: MaritalStatusSchema, - // TODO revert - // formerIcelander: z - // .string() - // .min(1) - // .refine((v) => v === YES), - formerIcelander: z.enum([YES, NO]), + formerIcelander: z.enum([YES, NO]).refine((v) => v === YES), supportingDocuments: SupportingDocumentsSchema, childrenSupportingDocuments: z .array(ChildrenSupportingDocumentsSchema) diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/shared/constants.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/shared/constants.ts index ee647fdd0791..c1e5239406a8 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/shared/constants.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/shared/constants.ts @@ -1,5 +1,4 @@ export enum ApiActions { - getResidenceConditionInfo = 'getResidenceConditionInfo', getCurrentCountryOfResidenceList = 'getCurrentCountryOfResidenceList', getResidenceInIcelandLastChangeDate = 'getResidenceInIcelandLastChangeDate', submitApplication = 'submitApplication', diff --git a/libs/application/templates/directorate-of-immigration/citizenship/src/shared/types.ts b/libs/application/templates/directorate-of-immigration/citizenship/src/shared/types.ts index 0fbb89398b9d..0c79c389cdda 100644 --- a/libs/application/templates/directorate-of-immigration/citizenship/src/shared/types.ts +++ b/libs/application/templates/directorate-of-immigration/citizenship/src/shared/types.ts @@ -5,8 +5,16 @@ import { SelectedChildSchema, } from '../lib/dataSchema' import { z } from 'zod' +import { ApplicantResidenceConditionViewModel } from '@island.is/clients/directorate-of-immigration' export type ParentsToApplicant = z.TypeOf export type ChildrenOfApplicant = z.TypeOf export type CountryOfResidence = z.TypeOf export type CountryOfVisit = z.TypeOf + +export interface ApplicantInformation + extends ApplicantResidenceConditionViewModel { + eesNordicCitizen?: boolean + eesResidenceCondition?: boolean + spouseIsCitizen?: boolean +} diff --git a/libs/application/templates/driving-license/src/forms/done.ts b/libs/application/templates/driving-license/src/forms/done.ts index cfe3977e5027..14cbf958d506 100644 --- a/libs/application/templates/driving-license/src/forms/done.ts +++ b/libs/application/templates/driving-license/src/forms/done.ts @@ -2,7 +2,7 @@ import { buildForm } from '@island.is/application/core' import { Form, FormModes } from '@island.is/application/types' import { m } from '../lib/messages' import { buildFormConclusionSection } from '@island.is/application/ui-forms' -import { B_TEMP } from '../lib/constants' +import { B_TEMP, BE } from '../lib/constants' export const done: Form = buildForm({ id: 'done', @@ -16,6 +16,8 @@ export const done: Form = buildForm({ alertMessage: ({ answers }) => answers.applicationFor === B_TEMP ? m.applicationDoneAlertMessage + : answers.applicationFor === BE + ? m.applicationDoneAlertMessageBE : m.applicationDoneAlertMessageBFull, expandableHeader: m.nextStepsTitle, expandableDescription: ({ answers }) => diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts index c8d4c96795eb..2cc84f82700e 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionApplicationFor.ts @@ -29,7 +29,7 @@ export const sectionApplicationFor = (allowBELicense = false) => 'currentLicense.data', ) ?? { currentLicense: null } - const { categories } = getValueViaPath( + let { categories } = getValueViaPath( app.externalData, 'currentLicense.data', ) ?? { categories: null } @@ -40,6 +40,8 @@ export const sectionApplicationFor = (allowBELicense = false) => ) if (fakeData?.useFakeData === 'yes') { currentLicense = fakeData.currentLicense ?? null + categories = + fakeData.currentLicense === 'full' ? [{ nr: 'B' }] : null } let options = [ diff --git a/libs/application/templates/driving-license/src/lib/messages.ts b/libs/application/templates/driving-license/src/lib/messages.ts index 6ad8da6d0eed..9ed093fd61e9 100644 --- a/libs/application/templates/driving-license/src/lib/messages.ts +++ b/libs/application/templates/driving-license/src/lib/messages.ts @@ -503,6 +503,12 @@ export const m = defineMessages({ defaultMessage: 'Umsókn þín um fullnaðarskírteini hefur verið móttekin.', description: 'Application received', }, + applicationDoneAlertMessageBE: { + id: 'dl.application:applicationDoneAlertMessageBE', + defaultMessage: + 'Umsókn þín um að hefja ökunám fyrir BE réttindi hefur verið móttekin.', + description: 'Application received', + }, nextStepsTitle: { id: 'dl.application:nextStepsTitle', defaultMessage: 'Næstu skref', diff --git a/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildInput.tsx b/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildInput.tsx index 66133c1b99ef..513d86a6257e 100644 --- a/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildInput.tsx +++ b/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildInput.tsx @@ -5,14 +5,9 @@ import { Text, Box } from '@island.is/island-ui/core' import { childrenForm } from '../../lib/messages' import format from 'date-fns/format' -import { - CheckboxController, - InputController, -} from '@island.is/shared/form-fields' +import { InputController } from '@island.is/shared/form-fields' import kennitala from 'kennitala' -import { getMessageForSchool } from '../../lib/formatters' -import { getSchoolType } from '../../lib/utils' import { useLocale } from '@island.is/localization' import { RecordObject } from '@island.is/application/types' import { getErrorViaPath } from '@island.is/application/core' @@ -49,11 +44,9 @@ export const ChildInput: FC> = ({ const age = kennitalaInfo?.age const dateOfBirth = new Date(birthday) - const schoolType = getSchoolType(age) - const { formatMessage } = useLocale() - if (!schoolType) { + if (age >= 18) { return null } return ( @@ -78,10 +71,8 @@ export const ChildInput: FC> = ({ id={schoolField} name={schoolField} required={true} - placeholder={formatMessage( - getMessageForSchool[schoolType].placeholder, - )} - label={formatMessage(getMessageForSchool[schoolType].label)} + placeholder={formatMessage(childrenForm.inputs.schoolPlaceholder)} + label={formatMessage(childrenForm.inputs.schoolLabel)} error={errors && getErrorViaPath(errors, schoolField)} backgroundColor="white" onChange={() => { diff --git a/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildrenForm.tsx b/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildrenForm.tsx index 9069d410dbf7..3d505d75d820 100644 --- a/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildrenForm.tsx +++ b/libs/application/templates/financial-aid/src/fields/ChildrenForm/ChildrenForm.tsx @@ -1,21 +1,29 @@ import React from 'react' import { useIntl } from 'react-intl' -import { Text, Box } from '@island.is/island-ui/core' +import { Text, Box, Input } from '@island.is/island-ui/core' import { DescriptionText } from '..' -import { FAFieldBaseProps } from '../../lib/types' +import { + FAFieldBaseProps, + SummaryComment as SummaryCommentType, +} from '../../lib/types' import withLogo from '../Logo/Logo' import { childrenForm } from '../../lib/messages' import { ChildInput } from './ChildInput' import { sortChildrenUnderAgeByAge } from '../../lib/utils' +import { SummaryComment } from '../Summary' +import { Controller, useFormContext } from 'react-hook-form' const ChildrenForm = ({ application, field, errors }: FAFieldBaseProps) => { const { formatMessage } = useIntl() - const { externalData } = application + const { setValue } = useFormContext() + + const { externalData, answers } = application const childrenExternalData = externalData.childrenCustodyInformation.data const childrenInfo = sortChildrenUnderAgeByAge(childrenExternalData) + const summaryCommentType = SummaryCommentType.CHILDRENCOMMENT return ( <> @@ -37,6 +45,45 @@ const ChildrenForm = ({ application, field, errors }: FAFieldBaseProps) => { /> ) })} + + + + + {formatMessage(childrenForm.page.commentTitle)} + + + + { + return ( + { + onChange(e.target.value) + setValue(summaryCommentType, e.target.value) + }} + /> + ) + }} + /> + ) } diff --git a/libs/application/templates/financial-aid/src/fields/Summary/ChildrenInfo.tsx b/libs/application/templates/financial-aid/src/fields/Summary/ChildrenInfo.tsx index 33fa1d31fe99..3af0704ebcff 100644 --- a/libs/application/templates/financial-aid/src/fields/Summary/ChildrenInfo.tsx +++ b/libs/application/templates/financial-aid/src/fields/Summary/ChildrenInfo.tsx @@ -14,16 +14,25 @@ interface Props { fullName: string }[] goToScreen: ((id: string) => void) | undefined + childrenComment?: string } -const ChildrenInfo = ({ childrenSchoolInfo, goToScreen }: Props) => { +const ChildrenInfo = ({ + childrenSchoolInfo, + goToScreen, + childrenComment, +}: Props) => { + const { formatMessage } = useIntl() + return ( goToScreen?.(Routes.CHILDRENSCHOOLINFO)} key="children-block" > - Börn + + {formatMessage(summaryForm.childrenInfo.title)} + {childrenSchoolInfo.map((child) => { @@ -35,6 +44,14 @@ const ChildrenInfo = ({ childrenSchoolInfo, goToScreen }: Props) => { /> ) })} + {childrenComment && ( + <> + + {formatMessage(summaryForm.childrenInfo.comment)} + + {childrenComment} + + )} ) } diff --git a/libs/application/templates/financial-aid/src/fields/Summary/SummaryForm.tsx b/libs/application/templates/financial-aid/src/fields/Summary/SummaryForm.tsx index a821406919fc..fd1f27ede0e3 100644 --- a/libs/application/templates/financial-aid/src/fields/Summary/SummaryForm.tsx +++ b/libs/application/templates/financial-aid/src/fields/Summary/SummaryForm.tsx @@ -131,6 +131,7 @@ const SummaryForm = ({ application, goToScreen }: FAFieldBaseProps) => { )} diff --git a/libs/application/templates/financial-aid/src/lib/dataSchema.ts b/libs/application/templates/financial-aid/src/lib/dataSchema.ts index 131f8504adaf..6592f9f41b12 100644 --- a/libs/application/templates/financial-aid/src/lib/dataSchema.ts +++ b/libs/application/templates/financial-aid/src/lib/dataSchema.ts @@ -29,6 +29,7 @@ export const dataSchema = z.object({ school: z.string(), }), ), + childrenComment: z.string().optional(), relationshipStatus: z .object({ unregisteredCohabitation: z diff --git a/libs/application/templates/financial-aid/src/lib/formatters.ts b/libs/application/templates/financial-aid/src/lib/formatters.ts index 939642e534fb..df808d6f5357 100644 --- a/libs/application/templates/financial-aid/src/lib/formatters.ts +++ b/libs/application/templates/financial-aid/src/lib/formatters.ts @@ -71,24 +71,6 @@ export const getMessageApproveOptionsForIncome: KeyMapping< No: m.incomeForm.summary.no, } -export const getMessageForSchool: KeyMapping< - SchoolType, - { label: MessageDescriptor; placeholder: MessageDescriptor } -> = { - kindergarden: { - placeholder: m.childrenForm.inputs.kindergardenPlaceholder, - label: m.childrenForm.inputs.kindergardenLabel, - }, - elementary: { - placeholder: m.childrenForm.inputs.elementarySchoolPlaceholder, - label: m.childrenForm.inputs.elementarySchoolLabel, - }, - highSchool: { - placeholder: m.childrenForm.inputs.highSchoolLabel, - label: m.childrenForm.inputs.highSchoolPlaceholder, - }, -} - export const formatAddress = (applicant?: NationalRegistryIndividual) => applicant?.address ? `${applicant.address.streetAddress}, ${applicant.address.postalCode} ${applicant.address.locality}` diff --git a/libs/application/templates/financial-aid/src/lib/messages/childrenForm.ts b/libs/application/templates/financial-aid/src/lib/messages/childrenForm.ts index aedcd98a9f57..50f0e75901a2 100644 --- a/libs/application/templates/financial-aid/src/lib/messages/childrenForm.ts +++ b/libs/application/templates/financial-aid/src/lib/messages/childrenForm.ts @@ -31,52 +31,33 @@ export const childrenForm = { defaultMessage: 'Fæðingardagur {birthday}', description: 'Text before birthday', }, + commentTitle: { + id: 'fa.application:section.personalInterest.childrenForm.page.commentTitle', + defaultMessage: 'Frekari upplýsingar', + description: 'Heading for input, with comment about children', + }, }), inputs: defineMessages({ - kindergardenLabel: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.kindergardenLabel', - defaultMessage: 'Leikskóli', - description: 'Label for kindergarden input', - }, - kindergardenPlaceholder: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.kindergardenPlaceholder', - defaultMessage: 'Í hvaða leikskóla er barnið?', - description: - 'Placeholder in input where asking about the childs kindergarden name', - }, - elementarySchoolLabel: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.elementarySchoolLabel', - defaultMessage: 'Grunnskóli', - description: 'Label for elementary school input', - }, - elementarySchoolPlaceholder: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.elementarySchoolPlaceholder', - defaultMessage: 'Í hvaða grunnskóla er barnið?', + schoolLabel: { + id: 'fa.application:section.personalInterest.childrenForm.inputs.schoolLabel', + defaultMessage: 'Skóli', + description: 'Label for school input', + }, + schoolPlaceholder: { + id: 'fa.application:section.personalInterest.childrenForm.inputs.schoollPlaceholder', + defaultMessage: 'Í hvaða skóla er barnið?', description: - 'Placeholder in input where asking about the childs elementary school name', + 'Placeholder in input where asking about the childs school name', }, - elementarySchoolFoodCheck: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.elementarySchoolFoodCheck', - defaultMessage: 'Barnið er skráð í skólamat', - description: - 'Checkmark to check wheter a child is signed up for food in elementary school', - }, - elementarySchoolAfterSchoolCheck: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.elementarySchoolAfterSchoolCheck', - defaultMessage: 'Barnið er í frístund', - description: - 'Checkmark to check wheter a child is signed up for after school activities in elementary school', - }, - highSchoolPlaceholder: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.highSchoolPlaceholder', - defaultMessage: 'Í hvaða framhaldsskóla er barnið?', - description: - 'Placeholder in input where asking about the childs high school name', + commentLabel: { + id: 'fa.application:section.personalInterest.childrenForm.inputs.commentLabel', + defaultMessage: 'Auka upplýsingar', + description: 'Label for comment about children', }, - highSchoolLabel: { - id: 'fa.application:section.personalInterest.childrenForm.inputs.highSchoolLabel', - defaultMessage: 'Framhaldsskóli', - description: 'Label for high school input', + commentPlaceholder: { + id: 'fa.application:section.personalInterest.childrenForm.inputs.commentPlaceholder', + defaultMessage: 'm.a. frístund eða skólamatur', + description: 'Placeholder for comment about children', }, }), } diff --git a/libs/application/templates/financial-aid/src/lib/messages/summaryForm.ts b/libs/application/templates/financial-aid/src/lib/messages/summaryForm.ts index c1ff35c59550..dcfd7d1f8f17 100644 --- a/libs/application/templates/financial-aid/src/lib/messages/summaryForm.ts +++ b/libs/application/templates/financial-aid/src/lib/messages/summaryForm.ts @@ -76,6 +76,11 @@ export const summaryForm = { }, }), childrenInfo: defineMessages({ + title: { + id: 'fa.application:section.summaryForm.childrenInfo.title', + defaultMessage: 'Börn', + description: 'Summary form children information title ', + }, name: { id: 'fa.application:section.summaryForm.childrenInfo.name', defaultMessage: 'Nafn', @@ -91,6 +96,12 @@ export const summaryForm = { defaultMessage: 'Skóli', description: 'Summary form children information title of school ', }, + comment: { + id: 'fa.application:section.summaryForm.childrenInfo.comment', + defaultMessage: 'Athugasemd', + description: + 'Summary form children information title of children comment ', + }, }), formInfo: defineMessages({ personalTaxCreditTitle: { diff --git a/libs/application/templates/financial-aid/src/lib/types.ts b/libs/application/templates/financial-aid/src/lib/types.ts index f900ffbbf7c8..d35f9f01d285 100644 --- a/libs/application/templates/financial-aid/src/lib/types.ts +++ b/libs/application/templates/financial-aid/src/lib/types.ts @@ -123,6 +123,7 @@ export type UploadFileType = export enum SummaryComment { FORMCOMMENT = 'formComment', SPOUSEFORMCOMMENT = 'spouseFormComment', + CHILDRENCOMMENT = 'childrenComment', } export enum SchoolType { diff --git a/libs/application/templates/financial-aid/src/lib/utils.ts b/libs/application/templates/financial-aid/src/lib/utils.ts index 927ac68ccbdf..8bee37ef8f45 100644 --- a/libs/application/templates/financial-aid/src/lib/utils.ts +++ b/libs/application/templates/financial-aid/src/lib/utils.ts @@ -112,18 +112,6 @@ export const waitingForSpouse = (state: string) => { ) } -export const getSchoolType = (age: number) => { - if (age < 6) { - return SchoolType.KINDERGARDEN - } - if (age >= 6 && age < 16) { - return SchoolType.ELEMENTARY - } - if (age >= 16 && age < 18) { - return SchoolType.HIGHSCHOOL - } -} - export const sortChildrenUnderAgeByAge = ( children: ApplicantChildCustodyInformation[], ): ApplicantChildCustodyInformation[] => { diff --git a/libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx b/libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx index 3430ceaa64f3..5f5d94964b16 100644 --- a/libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx +++ b/libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx @@ -94,7 +94,7 @@ const extractDetails = function ( return { ...extractCommonVehicleInfo(response.basicVehicleInformation), isDebtLess: response.isDebtLess ?? true, - validationErrorMessages: response.validationErrorMessages ?? [], + validationErrorMessages: response?.validationErrorMessages ?? [], } } else if ( isVehicleType( @@ -116,7 +116,7 @@ const extractDetails = function ( return { ...extractCommonVehicleInfo(response.basicVehicleInformation), isDebtLess: response.isDebtLess ?? true, - validationErrorMessages: response.validationErrorMessages ?? [], + validationErrorMessages: response?.validationErrorMessages ?? [], } } else if (isVehicleType(response, 'MachineDetails')) { return { @@ -177,9 +177,7 @@ export const FindVehicleFormField: FC> = ({ ) const [energyDetails, setEnergyDetails] = useState(null) - const [machineId, setMachineId] = useState( - getValueViaPath(application.answers, 'pickMachine.id', '') as string, - ) + const MAX_LENGTH = isMachine ? 6 : 5 const [submitButtonDisabledCalled, setSubmitButtonDisabledCalled] = useState(false) @@ -265,7 +263,11 @@ export const FindVehicleFormField: FC> = ({ } } } - + setValue('findVehicle', true) + setValue( + `${field.id}.paymentRequiredForOwnerChange`, + machineDetails.paymentRequiredForOwnerChange, + ) setValue(`${field.id}.regNumber`, machineDetails.regNumber) setValue(`${field.id}.category`, machineDetails.category) setValue(`${field.id}.type`, machineDetails.type || '') @@ -276,7 +278,6 @@ export const FindVehicleFormField: FC> = ({ setValue('pickMachine.id', machineDetails.id) setValue(`${field.id}.date`, new Date().toISOString()) setValue('pickMachine.isValid', machineDetails.disabled ? undefined : true) - setMachineId(machineDetails?.id || '') setSubmitButtonDisabled && setSubmitButtonDisabled(!machineDetails.disabled || false) setMachineDetails(machineDetails) diff --git a/libs/application/ui-forms/src/lib/formConclusionSection/formConclusionSection.ts b/libs/application/ui-forms/src/lib/formConclusionSection/formConclusionSection.ts index 0b0e0e227d49..fd93697ef00f 100644 --- a/libs/application/ui-forms/src/lib/formConclusionSection/formConclusionSection.ts +++ b/libs/application/ui-forms/src/lib/formConclusionSection/formConclusionSection.ts @@ -18,7 +18,7 @@ type Props = Partial<{ secondButtonLink: StaticText secondButtonLabel: StaticText secondButtonMessage: StaticText - expandableHeader: StaticText + expandableHeader: FormText expandableIntro: StaticText expandableDescription: FormText conclusionLinkS3FileKey: FormText diff --git a/libs/auth-api-lib/src/lib/delegations/DelegationConfig.ts b/libs/auth-api-lib/src/lib/delegations/DelegationConfig.ts index 56abef45d809..09f17469b597 100644 --- a/libs/auth-api-lib/src/lib/delegations/DelegationConfig.ts +++ b/libs/auth-api-lib/src/lib/delegations/DelegationConfig.ts @@ -95,6 +95,14 @@ export const DelegationConfig = defineConfig>({ DelegationType.Custom, ], }, + { + // This scope is not in use in our repo hence plain string instead of enum. + scopeName: '@skagafjordur.is/ibuagatt', + onlyForDelegationType: [ + DelegationType.ProcurationHolder, + DelegationType.Custom, + ], + }, ], userInfoUrl: env.required( diff --git a/libs/auth/scopes/src/index.ts b/libs/auth/scopes/src/index.ts index 7cbc8e66b894..05eb89b4b45a 100644 --- a/libs/auth/scopes/src/index.ts +++ b/libs/auth/scopes/src/index.ts @@ -21,5 +21,4 @@ export * from './lib/aosh.scope' export * from './lib/district-commissioners.scope' export * from './lib/hms.scope' export * from './lib/recycling-fund.scope' -export * from './lib/notifications.scope' export * from './lib/universityGateway.scope' diff --git a/libs/auth/scopes/src/lib/notifications.scope.ts b/libs/auth/scopes/src/lib/notifications.scope.ts deleted file mode 100644 index 5ea2627738f8..000000000000 --- a/libs/auth/scopes/src/lib/notifications.scope.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum NotificationsScope { - read = '@island.is/notifications:read', - write = '@island.is/notifications:write', -} diff --git a/libs/clients/directorate-of-immigration/src/clientConfig.json b/libs/clients/directorate-of-immigration/src/clientConfig.json index cb09624804b6..70df7ff8bbb0 100644 --- a/libs/clients/directorate-of-immigration/src/clientConfig.json +++ b/libs/clients/directorate-of-immigration/src/clientConfig.json @@ -1470,7 +1470,15 @@ "type": "object", "properties": { "isAnyResConValid": { "type": "boolean" }, - "isOnlyMarriedOrCohabitationWithISCitizen": { "type": "boolean" } + "domicileResidence7Years": { "type": "boolean" }, + "cohabitationISCitizen5YrsDomicileMissingDate": { "type": "boolean" }, + "asylumSeekerOrHumanitarianResPerm5year": { "type": "boolean" }, + "cohabitationISCitizen5YearDomicile": { "type": "boolean" }, + "isMarriedOrCohabiationWithISCitizen": { "type": "boolean" }, + "marriedISCitizenDomicile4Years": { "type": "boolean" }, + "noNationalityAnd5YearsDomicile": { "type": "boolean" }, + "nordicCitizenship4YearDomicile": { "type": "boolean" }, + "marriedISCitizenDomicile4YrsMissingDate": { "type": "boolean" } }, "additionalProperties": false }, @@ -1725,7 +1733,10 @@ "type": "object", "properties": { "applicantExists": { "type": "boolean" }, - "isEESCitizen": { "type": "boolean" } + "isEESCitizen": { "type": "boolean" }, + "eesNordicCitizen": { "type": "boolean" }, + "eesResidenceCondition": { "type": "boolean" }, + "spouseIsCitizen": { "type": "boolean" } }, "additionalProperties": false }, @@ -1928,7 +1939,9 @@ "parent1Name": { "type": "string", "nullable": true }, "postalCode": { "type": "string", "nullable": true }, "parent2SSN": { "type": "string", "nullable": true }, + "parentOfChild2SSN": { "type": "string", "nullable": true }, "parent2Name": { "type": "string", "nullable": true }, + "parentOfChild2Name": { "type": "string", "nullable": true }, "applicantIsChildOfIcelandicCitizen": { "type": "boolean", "nullable": true @@ -1945,7 +1958,8 @@ "properties": { "parent2SSN": { "type": "string", "nullable": true }, "parent2Name": { "type": "string", "nullable": true }, - "parent2BirthDate": { "type": "string", "nullable": true } + "parent2BirthDate": { "type": "string", "nullable": true }, + "nationality": { "type": "string", "nullable": true } }, "additionalProperties": false }, @@ -1970,7 +1984,9 @@ "parent1Name": { "type": "string", "nullable": true }, "postalCode": { "type": "string", "nullable": true }, "parent2SSN": { "type": "string", "nullable": true }, + "parentOfChild2SSN": { "type": "string", "nullable": true }, "parent2Name": { "type": "string", "nullable": true }, + "parentOfChild2Name": { "type": "string", "nullable": true }, "applicantIsChildOfIcelandicCitizen": { "type": "boolean", "nullable": true diff --git a/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.service.ts b/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.service.ts index 5575c32a008b..316482249036 100644 --- a/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.service.ts +++ b/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.service.ts @@ -310,6 +310,7 @@ export class DirectorateOfImmigrationClient { ? new Date(selectedChild.otherParentBirtDate).toISOString() : undefined, parent2Name: selectedChild.otherParentName, + nationality: childInfo.citizenship, }, }, }) diff --git a/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.types.ts b/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.types.ts index bd820b1dc4e6..dc528da47edc 100644 --- a/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.types.ts +++ b/libs/clients/directorate-of-immigration/src/lib/directorateOfImmigrationClient.types.ts @@ -68,6 +68,7 @@ export interface CitizenshipApplication { fullName: string givenName?: string | null familyName?: string | null + citizenship?: string }[] childrenPassport: { nationalId: string diff --git a/libs/clients/driving-license/src/lib/apiConfiguration.ts b/libs/clients/driving-license/src/lib/apiConfiguration.ts index 561167d2b096..87a213bb696c 100644 --- a/libs/clients/driving-license/src/lib/apiConfiguration.ts +++ b/libs/clients/driving-license/src/lib/apiConfiguration.ts @@ -4,7 +4,7 @@ import { ApiV1, ConfigV1 } from '../v1' import { ApiV2, ConfigV2 } from '../v2' import { ApiV4, ConfigV4 } from '../v4' import { DrivingLicenseApiConfig } from './drivingLicenseApi.config' -import { ApiV5, CodeTableV5, ConfigV5 } from '../v5' +import { ApiV5, ApplicationApiV5, CodeTableV5, ConfigV5 } from '../v5' const configFactory = ( config: ConfigType, @@ -68,6 +68,17 @@ export const exportedApis = [ }, inject: [DrivingLicenseApiConfig.KEY], }, + { + provide: ApplicationApiV5, + useFactory: (config: ConfigType) => { + return new ApplicationApiV5( + new ConfigV5( + configFactory(config, `${config.xroadBaseUrl}/${config.xroadPathV5}`), + ), + ) + }, + inject: [DrivingLicenseApiConfig.KEY], + }, { provide: CodeTableV5, useFactory: (config: ConfigType) => { diff --git a/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts b/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts index 61f236e02b69..7aeb2e1868fa 100644 --- a/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts +++ b/libs/clients/driving-license/src/lib/drivingLicenseApi.service.ts @@ -23,6 +23,7 @@ export class DrivingLicenseApi { constructor( private readonly v4: v4.ApiV4, private readonly v5: v5.ApiV5, + private readonly applicationV5: v5.ApplicationApiV5, private readonly v5CodeTable: v5.CodeTableV5, ) {} @@ -475,6 +476,24 @@ export class DrivingLicenseApi { return handledResponse.success } + async postApplyForBELicense(params: { + nationalIdApplicant: string + token: string + jurisdictionId: number + }): Promise { + const response = await this.applicationV5.apiApplicationsV5ApplyforBePost({ + apiVersion: v5.DRIVING_LICENSE_API_VERSION_V5, + apiVersion2: v5.DRIVING_LICENSE_API_VERSION_V5, + jwttoken: params.token.replace('Bearer ', ''), + postApplicationForBEModel: { + districtId: params.jurisdictionId, + userId: v5.DRIVING_LICENSE_API_USER_ID, + }, + }) + + return response.result ?? false + } + async postCanApplyForPracticePermit(params: { token: string studentSSN: string diff --git a/libs/clients/driving-license/src/v5/clientConfig.json b/libs/clients/driving-license/src/v5/clientConfig.json index 560d5b421485..1b948f3c0d97 100644 --- a/libs/clients/driving-license/src/v5/clientConfig.json +++ b/libs/clients/driving-license/src/v5/clientConfig.json @@ -3,13 +3,149 @@ "info": { "title": "RLS driver licence Rest API", "description": "RESTFul services for driver licences. Programmed in ASP.NET Core 3 API ", - "contact": { - "name": "TMD", - "email": "tmd@tmd.is" - }, + "contact": { "name": "TMD", "email": "tmd@tmd.is" }, "version": "5.0" }, "paths": { + "/api/applications/v5/applyfor/be": { + "post": { + "tags": ["Application"], + "summary": "Apply for BE category", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "JWT token", + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "requestBody": { + "description": "Application model", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostApplicationForBEModel" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ApplicationForCategoryDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationForCategoryDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationForCategoryDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "text/plain": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + }, + "text/json": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + } + } + } + } + } + }, + "/api/applications/v5/testfinished/{applicationId}": { + "post": { + "tags": ["Application"], + "summary": "Confirm application as done, test finished", + "parameters": [ + { + "name": "applicationId", + "in": "path", + "description": "RLS application id", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ApplicationFinishedDto" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationFinishedDto" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationFinishedDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "text/plain": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + }, + "text/json": { + "schema": { "$ref": "#/components/schemas/ProblemDetails" } + } + } + } + } + } + }, "/api/codetables/deprivations": { "get": { "tags": ["Codetables"], @@ -20,20 +156,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -43,25 +173,19 @@ "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegSviptingaDto" - } + "items": { "$ref": "#/components/schemas/TegSviptingaDto" } } } } @@ -79,20 +203,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -102,25 +220,19 @@ "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/TegundRettindaDto" - } + "items": { "$ref": "#/components/schemas/TegundRettindaDto" } } } } @@ -138,20 +250,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -197,20 +303,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -220,25 +320,19 @@ "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/EmbaettiDto" - } + "items": { "$ref": "#/components/schemas/EmbaettiDto" } } } } @@ -246,39 +340,205 @@ } } }, - "/api/drivinglicense/v5": { + "/api/imagecontroller/v5/hasqualityphoto": { "get": { - "tags": ["Okuskirteini"], - "summary": "Get for person driver licence", - "operationId": "GetCurrentLicenseV5", + "tags": ["Image"], + "summary": "Check if person has quality marked photo", "parameters": [ { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { "type": "integer", "format": "int32" } + }, + "application/json": { + "schema": { "type": "integer", "format": "int32" } + }, + "text/json": { + "schema": { "type": "integer", "format": "int32" } + } } + } + } + } + }, + "/api/imagecontroller/v5/hasqualitysignature": { + "get": { + "tags": ["Image"], + "summary": "Check if person has quality marked photo", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "Token with national id", + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { "type": "integer", "format": "int32" } + }, + "application/json": { + "schema": { "type": "integer", "format": "int32" } + }, + "text/json": { + "schema": { "type": "integer", "format": "int32" } + } } + } + } + } + }, + "/api/imagecontroller/v5/getqualityphoto": { + "get": { + "tags": ["Image"], + "summary": "Get quality marked photo for person", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "Token with national id", + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { "type": "string", "format": "byte" } + }, + "application/json": { + "schema": { "type": "string", "format": "byte" } + }, + "text/json": { "schema": { "type": "string", "format": "byte" } } } + }, + "204": { "description": "No Content" } + } + } + }, + "/api/imagecontroller/v5/getqualitysignature": { + "get": { + "tags": ["Image"], + "summary": "Get quality marked photo for person", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "Token with national id", + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { "type": "string", "format": "byte" } + }, + "application/json": { + "schema": { "type": "string", "format": "byte" } + }, + "text/json": { "schema": { "type": "string", "format": "byte" } } + } + }, + "204": { "description": "No Content" } + } + } + }, + "/api/imagecontroller/v5/{SSN}/fromnationalregistry": { + "get": { + "tags": ["Image"], + "summary": "Get for all images from thjodskra", + "parameters": [ + { + "name": "SSN", + "in": "path", + "description": "Person social serial number", + "required": true, + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -287,38 +547,77 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" + "$ref": "#/components/schemas/ImagesFromThjodskraDto" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" + "$ref": "#/components/schemas/ImagesFromThjodskraDto" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/DriverLicenseDto" + "$ref": "#/components/schemas/ImagesFromThjodskraDto" } } } + } + } + } + }, + "/api/drivinglicense/v5": { + "get": { + "tags": ["Okuskirteini"], + "summary": "Get for person driver licence", + "operationId": "GetCurrentLicenseV5", + "parameters": [ + { + "name": "jwttoken", + "in": "header", + "description": "Token with national id", + "schema": { "type": "string" } + }, + { + "name": "api-version", + "in": "header", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + }, + { + "name": "api-version", + "in": "query", + "description": "The requested API version", + "required": true, + "schema": { "type": "string", "default": "5.0" } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } + }, + "application/json": { + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } + }, + "text/json": { + "schema": { "$ref": "#/components/schemas/DriverLicenseDto" } + } + } }, "400": { "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -334,52 +633,36 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { - "204": { - "description": "No Content" - }, + "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -396,37 +679,27 @@ "in": "path", "description": "Category to check for (B, C, and so on)", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -463,38 +736,28 @@ "in": "path", "description": "Category in license", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostNewFinalLicense" - } + "schema": { "$ref": "#/components/schemas/PostNewFinalLicense" } } } }, @@ -503,22 +766,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } }, @@ -526,19 +780,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -554,38 +802,28 @@ "name": "jwttoken", "in": "header", "description": "JWT token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostNewCollaborative" - } + "schema": { "$ref": "#/components/schemas/PostNewCollaborative" } } } }, @@ -594,22 +832,13 @@ "description": "Created", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } }, @@ -617,19 +846,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -645,29 +868,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -675,19 +890,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/DeprivationDto" - } + "schema": { "$ref": "#/components/schemas/DeprivationDto" } } } } @@ -704,29 +913,21 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model of application", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostTemporaryLicense" - } + "schema": { "$ref": "#/components/schemas/PostTemporaryLicense" } } } }, @@ -783,29 +984,21 @@ "name": "jwttoken", "in": "header", "description": "JWT token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -873,20 +1066,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -952,29 +1139,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -982,19 +1161,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PenaltyPointsDto" - } + "schema": { "$ref": "#/components/schemas/PenaltyPointsDto" } } } } @@ -1009,29 +1182,21 @@ { "name": "jwttoken", "in": "header", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1068,19 +1233,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1096,29 +1255,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1126,22 +1277,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1158,29 +1300,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1216,29 +1350,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1246,22 +1372,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1277,29 +1394,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1307,22 +1416,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "application/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, "text/json": { - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } } } } @@ -1338,29 +1438,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1368,28 +1460,15 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -1402,29 +1481,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1432,28 +1503,15 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, "application/json": { - "schema": { - "type": "string", - "format": "byte" - } + "schema": { "type": "string", "format": "byte" } }, - "text/json": { - "schema": { - "type": "string", - "format": "byte" - } - } + "text/json": { "schema": { "type": "string", "format": "byte" } } } }, - "204": { - "description": "No Content" - } + "204": { "description": "No Content" } } } }, @@ -1465,29 +1523,21 @@ { "name": "jwttoken", "in": "header", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1524,20 +1574,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { @@ -1551,26 +1595,18 @@ } }, "responses": { - "204": { - "description": "No Content" - }, + "204": { "description": "No Content" }, "400": { "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1584,29 +1620,21 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1634,19 +1662,13 @@ "description": "Not Found", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -1663,20 +1685,14 @@ "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1686,25 +1702,19 @@ "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/InstructorDto" - } + "items": { "$ref": "#/components/schemas/InstructorDto" } } } } @@ -1723,49 +1733,35 @@ "in": "path", "description": "Driver license number", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { "200": { "description": "Success", "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "text/plain": { + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/LicenseStatusDto" - } + "schema": { "$ref": "#/components/schemas/LicenseStatusDto" } } } } @@ -1782,47 +1778,34 @@ "in": "path", "description": "Category to check, optional, default B", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "drivinglicenseid", "in": "path", "description": "License id, optional, default persons newest license", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1830,19 +1813,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/CategoryValidDto" - } + "schema": { "$ref": "#/components/schemas/CategoryValidDto" } } } } @@ -1859,37 +1836,27 @@ "in": "path", "description": "License category", "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -1925,38 +1892,28 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the practice permit", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostPracticePermit" - } + "schema": { "$ref": "#/components/schemas/PostPracticePermit" } } } }, @@ -1965,19 +1922,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } }, @@ -1985,19 +1936,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } } @@ -2013,38 +1958,28 @@ "name": "jwttoken", "in": "header", "description": "Token with national id", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the practice permit", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostPracticePermit" - } + "schema": { "$ref": "#/components/schemas/PostPracticePermit" } } } }, @@ -2053,19 +1988,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } }, @@ -2073,26 +2002,20 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/PracticePermitDto" - } + "schema": { "$ref": "#/components/schemas/PracticePermitDto" } } } } } } }, - "/api/drivinglicense/v5/applications/{SSN}/renewal65": { + "/api/drivinglicense/v5/applications/renewal65": { "post": { "tags": ["Okuskirteini"], "summary": "Post renewal request for people 65 year old or older", @@ -2101,46 +2024,28 @@ "name": "jwttoken", "in": "header", "description": "Token with person social security number", - "schema": { - "type": "string" - } - }, - { - "name": "SSN", - "in": "path", - "required": true, - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "requestBody": { "description": "Model with information about the person", "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/PostRenewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/PostRenewal65AndOver" } } } }, @@ -2149,19 +2054,13 @@ "description": "Success", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } } } }, @@ -2169,19 +2068,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/Renewal65AndOver" - } + "schema": { "$ref": "#/components/schemas/Renewal65AndOver" } } } } @@ -2198,42 +2091,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2279,42 +2158,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2360,42 +2225,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2441,42 +2292,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2522,42 +2359,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2603,42 +2426,28 @@ "in": "path", "description": "Year from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 2022 - } + "schema": { "type": "integer", "format": "int32", "default": 2022 } }, { "name": "monthfrom", "in": "path", "description": "Month from", "required": true, - "schema": { - "type": "integer", - "format": "int32", - "default": 1 - } + "schema": { "type": "integer", "format": "int32", "default": 1 } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2683,39 +2492,28 @@ "name": "jwttoken", "in": "header", "description": "jwt token", - "schema": { - "type": "string" - } + "schema": { "type": "string" } }, { "name": "licenseid", "in": "path", "description": "License id", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } + "schema": { "type": "integer", "format": "int32" } }, { "name": "api-version", "in": "header", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } }, { "name": "api-version", "in": "query", "description": "The requested API version", "required": true, - "schema": { - "type": "string", - "default": "5.0" - } + "schema": { "type": "string", "default": "5.0" } } ], "responses": { @@ -2725,25 +2523,19 @@ "text/plain": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } }, "application/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } }, "text/json": { "schema": { "type": "array", - "items": { - "$ref": "#/components/schemas/MedferdDto" - } + "items": { "$ref": "#/components/schemas/MedferdDto" } } } } @@ -2752,19 +2544,13 @@ "description": "Bad Request", "content": { "text/plain": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "application/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } }, "text/json": { - "schema": { - "$ref": "#/components/schemas/ProblemDetails" - } + "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } @@ -2774,6 +2560,55 @@ }, "components": { "schemas": { + "ApplicationFinishedDto": { + "type": "object", + "properties": { + "licenseId": { + "type": "integer", + "description": "New license id", + "format": "int32", + "nullable": true + }, + "result": { + "type": "integer", + "description": "Result", + "format": "int32" + }, + "errorCode": { + "type": "string", + "description": "Error code if any", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Dto for application finished" + }, + "ApplicationForCategoryDto": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "Category applied for", + "nullable": true + }, + "result": { + "type": "boolean", + "description": "Can person apply for full license" + }, + "errorCode": { + "type": "string", + "description": "Error code if can not apply", + "nullable": true + }, + "customMessage": { + "type": "string", + "description": "Custom message", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Data transfer object for category application" + }, "CategoryDto": { "type": "object", "properties": { @@ -2893,20 +2728,12 @@ "DriverLicenseDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, + "id": { "type": "integer", "description": "Id", "format": "int32" }, "temporaryLicense": { "type": "boolean", "description": "Is this license marked as temporary" }, - "name": { - "type": "string", - "description": "Name", - "nullable": true - }, + "name": { "type": "string", "description": "Name", "nullable": true }, "socialSecurityNumber": { "type": "string", "description": "Persond id number", @@ -2945,17 +2772,13 @@ }, "categories": { "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDto" - }, + "items": { "$ref": "#/components/schemas/CategoryDto" }, "description": "Category list", "nullable": true }, "comments": { "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseCommentsDto" - }, + "items": { "$ref": "#/components/schemas/LicenseCommentsDto" }, "description": "Remark list", "nullable": true }, @@ -2971,15 +2794,9 @@ "format": "int32", "nullable": true }, - "photo": { - "$ref": "#/components/schemas/ImageDto" - }, - "signature": { - "$ref": "#/components/schemas/ImageDto" - }, - "deprivation": { - "$ref": "#/components/schemas/DeprivationDto" - } + "photo": { "$ref": "#/components/schemas/ImageDto" }, + "signature": { "$ref": "#/components/schemas/ImageDto" }, + "deprivation": { "$ref": "#/components/schemas/DeprivationDto" } }, "additionalProperties": false, "description": "Licence entity" @@ -2987,16 +2804,8 @@ "DriverLicenseWithoutImagesDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, - "name": { - "type": "string", - "description": "Name", - "nullable": true - }, + "id": { "type": "integer", "description": "Id", "format": "int32" }, + "name": { "type": "string", "description": "Name", "nullable": true }, "socialSecurityNumber": { "type": "string", "description": "Persond id number", @@ -3035,9 +2844,7 @@ }, "categories": { "type": "array", - "items": { - "$ref": "#/components/schemas/CategoryDto" - }, + "items": { "$ref": "#/components/schemas/CategoryDto" }, "description": "Category list", "nullable": true }, @@ -3048,15 +2855,11 @@ }, "comments": { "type": "array", - "items": { - "$ref": "#/components/schemas/LicenseCommentsDto" - }, + "items": { "$ref": "#/components/schemas/LicenseCommentsDto" }, "description": "Remark list", "nullable": true }, - "deprivation": { - "$ref": "#/components/schemas/DeprivationDto" - } + "deprivation": { "$ref": "#/components/schemas/DeprivationDto" } }, "additionalProperties": false, "description": "Licence entity" @@ -3327,19 +3130,60 @@ "additionalProperties": false, "description": "Entity for picture" }, - "InstructorDto": { + "ImageFromThjodskraDto": { "type": "object", "properties": { - "ssn": { + "content": { "type": "string", - "description": "Public identity number", + "description": "Image content", + "nullable": true + }, + "contentLength": { + "type": "integer", + "description": "Content length", + "format": "int32" + }, + "contentDocumentType": { + "type": "string", + "description": "Content document type", "nullable": true }, - "name": { + "created": { + "type": "string", + "description": "Created", + "format": "date-time" + }, + "biometricId": { + "type": "string", + "description": "BiometricId", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Image with info from thjodskra" + }, + "ImagesFromThjodskraDto": { + "type": "object", + "properties": { + "images": { + "type": "array", + "items": { "$ref": "#/components/schemas/ImageFromThjodskraDto" }, + "description": "Array of all images from thjodskra", + "nullable": true + } + }, + "additionalProperties": false, + "description": "All images from thjodskra dto" + }, + "InstructorDto": { + "type": "object", + "properties": { + "ssn": { "type": "string", - "description": "Name", + "description": "Public identity number", "nullable": true }, + "name": { "type": "string", "description": "Name", "nullable": true }, "driverLicenseId": { "type": "integer", "description": "Númer ökuskírteinis ökukennara", @@ -3554,6 +3398,23 @@ "additionalProperties": false, "description": "Data transfer object for penalty points" }, + "PostApplicationForBEModel": { + "type": "object", + "properties": { + "userId": { + "type": "string", + "description": "UserId", + "nullable": true + }, + "districtId": { + "type": "integer", + "description": "Ordering district", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "Post application for BE category" + }, "PostNewCollaborative": { "type": "object", "properties": { @@ -3638,6 +3499,11 @@ "type": "string", "description": "Address to send license to", "nullable": true + }, + "healtCertificate": { + "type": "string", + "description": "Healt certificate", + "nullable": true } }, "additionalProperties": false, @@ -3684,6 +3550,11 @@ "description": "Person social security number", "format": "date-time", "nullable": true + }, + "healtCertificate": { + "type": "string", + "description": "Healt certificate", + "nullable": true } }, "additionalProperties": false, @@ -3856,10 +3727,7 @@ "description": "The instructor", "nullable": true }, - "isOk": { - "type": "boolean", - "description": "Is the record OK" - }, + "isOk": { "type": "boolean", "description": "Is the record OK" }, "errorCode": { "type": "string", "description": "Error code, if any", @@ -3872,27 +3740,11 @@ "ProblemDetails": { "type": "object", "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - } + "type": { "type": "string", "nullable": true }, + "title": { "type": "string", "nullable": true }, + "status": { "type": "integer", "format": "int32", "nullable": true }, + "detail": { "type": "string", "nullable": true }, + "instance": { "type": "string", "nullable": true } }, "additionalProperties": false }, @@ -3921,16 +3773,8 @@ "TegSviptingaDto": { "type": "object", "properties": { - "id": { - "type": "integer", - "description": "Id", - "format": "int32" - }, - "heiti": { - "type": "string", - "description": "Name", - "nullable": true - } + "id": { "type": "integer", "description": "Id", "format": "int32" }, + "heiti": { "type": "string", "description": "Name", "nullable": true } }, "additionalProperties": false, "description": "Dto for Tegund sviptinga" diff --git a/libs/clients/driving-license/src/v5/index.ts b/libs/clients/driving-license/src/v5/index.ts index fa1d4a30636d..638b01fe3530 100644 --- a/libs/clients/driving-license/src/v5/index.ts +++ b/libs/clients/driving-license/src/v5/index.ts @@ -3,6 +3,7 @@ import { OkuskirteiniApi, Configuration, CodetablesApi, + ApplicationApi, } from '../../gen/fetch/v5' export const DRIVING_LICENSE_API_VERSION_V5 = '5.0' @@ -11,3 +12,4 @@ export const DRIVING_LICENSE_API_USER_ID = 'SYS1' export class ConfigV5 extends Configuration {} export class ApiV5 extends OkuskirteiniApi {} export class CodeTableV5 extends CodetablesApi {} +export class ApplicationApiV5 extends ApplicationApi {} diff --git a/libs/clients/work-machines/src/lib/workMachines.service.ts b/libs/clients/work-machines/src/lib/workMachines.service.ts index 67f20b17540b..f9b48ebb9874 100644 --- a/libs/clients/work-machines/src/lib/workMachines.service.ts +++ b/libs/clients/work-machines/src/lib/workMachines.service.ts @@ -117,7 +117,7 @@ export class WorkMachinesClientService { regNumber: machine?.registrationNumber || '', status: machine?.status || '', paymentRequiredForOwnerChange: - machine?.paymentRequiredForOwnerChange || false, + machine?.paymentRequiredForOwnerChange ?? true, } }) || [], totalCount: result?.pagination?.totalCount || 0, @@ -155,6 +155,8 @@ export class WorkMachinesClientService { supervisorName: result?.supervisorName || '', status: result?.status || '', disabled: !result?.links?.some((link) => link?.rel === rel), + paymentRequiredForOwnerChange: + result?.paymentRequiredForOwnerChange ?? true, } } diff --git a/libs/clients/work-machines/src/lib/workMachines.types.ts b/libs/clients/work-machines/src/lib/workMachines.types.ts index 691064c9d760..24beb6e9b7c9 100644 --- a/libs/clients/work-machines/src/lib/workMachines.types.ts +++ b/libs/clients/work-machines/src/lib/workMachines.types.ts @@ -5,7 +5,7 @@ export type ChangeMachineOwner = { delegateNationalId: string sellerNationalId: string dateOfOwnerChange: Date - paymentId: string + paymentId: string | null phoneNumber: string email: string } diff --git a/libs/feature-flags/src/lib/features.ts b/libs/feature-flags/src/lib/features.ts index 4eb238297074..c26fc272d6ab 100644 --- a/libs/feature-flags/src/lib/features.ts +++ b/libs/feature-flags/src/lib/features.ts @@ -19,7 +19,6 @@ export enum Features { signatureListCreation = 'isSignatureListCreationEnabled', citizenship = 'isCitizenshipEnabled', energyFunds = 'isEnergyFundsEnabled', - carRecyclingApplication = 'isCarRecyclingApplicationEnabled', complaintsToAlthingiOmbudsman = 'isComplaintToAlthingiOmbudsmanEnabled', healthcareLicenseCertificate = 'isHealthcareLicenseCertificateEnabled', transferOfMachineOwnership = 'isTransferOfMachineOwnershipEnabled', diff --git a/libs/financial-aid/shared/src/lib/interfaces.ts b/libs/financial-aid/shared/src/lib/interfaces.ts index adbc31d3463c..30ebb999d2c5 100644 --- a/libs/financial-aid/shared/src/lib/interfaces.ts +++ b/libs/financial-aid/shared/src/lib/interfaces.ts @@ -268,6 +268,7 @@ export interface CreateApplication { homeCircumstancesCustom?: string studentCustom?: string formComment?: string + childrenComment?: string state?: ApplicationState files: CreateApplicationFile[] amount?: number diff --git a/libs/infra-tracing/src/lib/datadog-tracer.ts b/libs/infra-tracing/src/lib/datadog-tracer.ts index bb8258308c25..e2b5516df49f 100644 --- a/libs/infra-tracing/src/lib/datadog-tracer.ts +++ b/libs/infra-tracing/src/lib/datadog-tracer.ts @@ -33,6 +33,7 @@ if (process.env.NODE_ENV !== 'development') { }, }, }) + tracer.use('http', { client: { hooks: { diff --git a/libs/island-ui/core/src/lib/IconRC/icons/HomeWithCar.tsx b/libs/island-ui/core/src/lib/IconRC/icons/HomeWithCar.tsx index 907bcf35e684..cf2775fd3440 100644 --- a/libs/island-ui/core/src/lib/IconRC/icons/HomeWithCar.tsx +++ b/libs/island-ui/core/src/lib/IconRC/icons/HomeWithCar.tsx @@ -16,19 +16,19 @@ const SvgHome = ({ {title ? {title} : null} @@ -39,7 +39,7 @@ const SvgHomeOutline = ({ id="ebYEDB473Vf7" d="M7.75,25v-11.0625" fill="none" - stroke="#0044b3" + stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" @@ -48,7 +48,7 @@ const SvgHomeOutline = ({ id="ebYEDB473Vf8" d="M5.5,16l9.9895-9.56253c.2344-.2475.7824-.25031,1.021,0L23,12.927" fill="none" - stroke="#0044b3" + stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" @@ -57,7 +57,7 @@ const SvgHomeOutline = ({ id="ebYEDB473Vf9" d="M9.25,12.3906L9.25,7h2.25v3.2344" fill="none" - stroke="#0044b3" + stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" @@ -67,7 +67,7 @@ const SvgHomeOutline = ({ id="ebYEDB473Vf10" d="M10.8937,6.76582c-2.72886-1.29005,1.9066-3.22779-.6517-4.9842" fill="none" - stroke="#0044b3" + stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" diff --git a/libs/judicial-system/audit-trail/src/lib/auditTrail.service.ts b/libs/judicial-system/audit-trail/src/lib/auditTrail.service.ts index b66b063dd8e1..cfe3b161dd05 100644 --- a/libs/judicial-system/audit-trail/src/lib/auditTrail.service.ts +++ b/libs/judicial-system/audit-trail/src/lib/auditTrail.service.ts @@ -13,6 +13,7 @@ import { auditTrailModuleConfig } from './auditTrail.config' export enum AuditedAction { LOGIN = 'LOGIN', GET_CASES = 'GET_CASES', + GET_INDICTMENTS = 'GET_INDICTMENTS', GET_CASE = 'GET_CASE', CREATE_CASE = 'CREATE_CASE', UPDATE_CASE = 'UPDATE_CASE', diff --git a/libs/portals/admin/regulations-admin/src/components/EditBasics.tsx b/libs/portals/admin/regulations-admin/src/components/EditBasics.tsx index 8bc30fce7289..e380ffb3c4bb 100644 --- a/libs/portals/admin/regulations-admin/src/components/EditBasics.tsx +++ b/libs/portals/admin/regulations-admin/src/components/EditBasics.tsx @@ -117,6 +117,7 @@ export const EditBasics = () => { const additions = formatAmendingBodyWithArticlePrefix(draft.impacts) setEditorKey(Date.now().toString()) + updateState('title', formatAmendingRegTitle(draft)) const additionString = additions.join('') as HTMLText updateState('text', additionString) setHasUpdated(true) diff --git a/libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts b/libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts index 2b8f6f413dc9..e1e7f2b5ad2c 100644 --- a/libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts +++ b/libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts @@ -74,33 +74,29 @@ export const formatAmendingRegBody = ( let paragraph = 0 const groupedArticles = groupElementsByArticleTitleFromDiv(diffDiv) - groupedArticles.forEach((group) => { - // Er allt inni í sub array 'deletion'? + groupedArticles.forEach((group, i) => { + // Get grouped article index to get name of previous grein for addition text. let articleTitle = '' const testGroup: { arr: HTMLText[] + original?: HTMLText[] title: string isDeletion?: boolean + isAddition?: boolean } = { arr: [], + original: [], title: '', isDeletion: undefined, + isAddition: undefined, } - group.forEach((element) => { - const { - newText, - oldText, - isDeleted, - isAddition, - liHtml, - newTextElement, - } = getDeletionOrAddition(element) + const regNameDisplay = + regName && regName !== 'self' + ? `reglugerðar nr. ${regName}` + : 'reglugerðarinnar' - const regNameDisplay = - regName && regName !== 'self' - ? `reglugerðar nr. ${regName}` - : 'reglugerðarinnar' + group.forEach((element) => { let pushHtml = '' as HTMLText let isParagraph = false @@ -112,7 +108,6 @@ export const formatAmendingRegBody = ( testGroup.title = articleTitle isArticleTitle = true paragraph = 0 // Reset paragraph count for the new article - // } else if (element.tagName.toLowerCase() === 'p') { } else if (element.nodeName.toLowerCase() === 'p') { paragraph++ isParagraph = true @@ -133,10 +128,27 @@ export const formatAmendingRegBody = ( (element.textContent || '').toLowerCase(), ) + const elementType = + isLetterList || isNumberList + ? 'lidur' + : isArticleTitle + ? 'greinTitle' + : undefined + + const { + newText, + oldText, + isDeleted, + isAddition, + liHtml, + newTextElement, + } = getDeletionOrAddition(element, elementType) + if (hasDeletion || hasInsert || isGildistokuGrein) { if (isGildistokuGrein) { pushHtml = `

${oldText}

` as HTMLText } else if (isDeleted) { + testGroup.isAddition = false // If deletion has never been false, everything is deleted, so it will stay true. if (testGroup.isDeletion !== false) { testGroup.isDeletion = true @@ -161,8 +173,13 @@ export const formatAmendingRegBody = ( } } else if (isAddition) { testGroup.isDeletion = false + // If addition has never been false, everything is addition, so it will stay true. + if (testGroup.isAddition !== false) { + testGroup.isAddition = true + } if (isParagraph) { // Paragraph was added + testGroup.original?.push(`

${newText}

` as HTMLText) pushHtml = paragraph > 1 ? (`

Á eftir ${ @@ -171,6 +188,7 @@ export const formatAmendingRegBody = ( : (`

1. mgr. ${articleTitle} ${regNameDisplay} orðast svo:

${newText}

` as HTMLText) } else if (isArticleTitle) { // Title was added + testGroup.original?.push(`

${newText}

` as HTMLText) pushHtml = `

Fyrirsögn ${articleTitle} ${regNameDisplay} orðast svo:

${newText}

` as HTMLText } else if (isLetterList || isNumberList) { @@ -187,16 +205,20 @@ export const formatAmendingRegBody = ( ? `
  1. ${liCleanArray.join('
  2. ')}
    1. ` : `

      ${newText}

      ` + testGroup.original?.push(newLiTextBody as HTMLText) pushHtml = `

      ${ isLetterList ? 'Stafliðum' : 'Töluliðum' } eftir ${paragraph}. mgr. ${articleTitle} ${regNameDisplay} er bætt við:

      ${newLiTextBody}` as HTMLText } else { // We don't know what you added, but there was an addition, and here's the additionlog: + testGroup.original?.push(`

      ${newText}

      ` as HTMLText) pushHtml = `

      Eftirfarandi texta ${regNameDisplay} var bætt við:

      ${newText}

      ` as HTMLText } } else { + // Change detected. Not additon, not deletion. testGroup.isDeletion = false + testGroup.isAddition = false if (isArticleTitle) { // Title was changed pushHtml = @@ -219,13 +241,30 @@ export const formatAmendingRegBody = ( } testGroup.arr.push(pushHtml) } else { + // Change detected. Not additon, not deletion. testGroup.isDeletion = false + testGroup.isAddition = false } }) if (testGroup.isDeletion === true) { const articleTitleNumber = testGroup.title additionArray.push([ - `

      ${articleTitleNumber} fellur brott

      ` as HTMLText, + `

      ${articleTitleNumber} ${regNameDisplay} fellur brott

      ` as HTMLText, + ]) + } else if (testGroup.isAddition === true) { + let prevArticleTitle = '' + const prevArticle = groupedArticles?.[i - 1] + if (prevArticle.length > 0) { + prevArticleTitle = prevArticle[0]?.innerText + } + const articleTitleNumber = testGroup.title + const originalTextArray = testGroup.original?.length + ? flatten(testGroup.original) + : [] + additionArray.push([ + `

      Á eftir ${prevArticleTitle} ${regNameDisplay} kemur ný grein, ${articleTitleNumber}, ásamt fyrirsögn, svohljóðandi: ${ + originalTextArray ? testGroup.original?.join('') : '' + }` as HTMLText, ]) } else { additionArray.push(testGroup.arr) diff --git a/libs/service-portal/education/src/screens/DrivingLessonsBook/DrivingLessonsBook.tsx b/libs/service-portal/education/src/screens/DrivingLessonsBook/DrivingLessonsBook.tsx index 0c26876718fd..0a6a258ba475 100644 --- a/libs/service-portal/education/src/screens/DrivingLessonsBook/DrivingLessonsBook.tsx +++ b/libs/service-portal/education/src/screens/DrivingLessonsBook/DrivingLessonsBook.tsx @@ -16,7 +16,6 @@ import { m, formatDate, IntroHeader, - EmptyState, FootNote, LinkResolver, SAMGONGUSTOFA_SLUG, @@ -29,6 +28,7 @@ import { import PhysicalLessons from '../../components/DrivingLessonsTables/PhysicalLessons' import DrivingLessonsSchools from '../../components/DrivingLessonsTables/DrivingLessonsSchools' import Exams from '../../components/DrivingLessonsTables/Exams' +import { Problem } from '@island.is/react-spa/shared' export const GET_STUDENT_BOOK = gql` query GetUserDrivingLessonsBook { @@ -104,6 +104,21 @@ const DrivingLessonsBook = () => { )} + {!loading && !error && !book?.createdOn && ( + + + + + + )} {book?.createdOn && !loading && ( <> @@ -198,26 +213,25 @@ const DrivingLessonsBook = () => { data={book?.testResults} /> )} + )} {!loading && !error && !book?.createdOn && ( - - - - - - - + + )} - ) } diff --git a/libs/service-portal/health/src/screens/HealthOverview/HealthOverview.tsx b/libs/service-portal/health/src/screens/HealthOverview/HealthOverview.tsx index 2ff1b071ee22..07d96a889632 100644 --- a/libs/service-portal/health/src/screens/HealthOverview/HealthOverview.tsx +++ b/libs/service-portal/health/src/screens/HealthOverview/HealthOverview.tsx @@ -92,31 +92,6 @@ export const HealthOverview = () => { serviceProviderSlug={SJUKRATRYGGINGAR_SLUG} serviceProviderTooltip={formatMessage(messages.healthTooltip)} /> - - - - - - - - - {error ? ( @@ -135,13 +110,40 @@ export const HealthOverview = () => { /> ) : ( + + + + + + + + + =1.0.0 <1.9.0": + version: 1.8.0 + resolution: "@opentelemetry/api@npm:1.8.0" + checksum: 0e32079975f05bee6de2ad8ade097f0afdc63f462c76550150fce2444c73ab92aaf851ac85e638b6e3b269da6640ac7e63f33913a0fd7df9f9beec2e100759df languageName: node linkType: hard @@ -20282,6 +20282,15 @@ __metadata: languageName: node linkType: hard +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" + peerDependencies: + acorn: ^8 + checksum: 1c0c49b6a244503964ae46ae850baccf306e84caf99bc2010ed6103c69a423987b07b520a6c619f075d215388bd4923eccac995886a54309eda049ab78a4be95 + languageName: node + linkType: hard + "acorn-jsx@npm:^5.3.1": version: 5.3.1 resolution: "acorn-jsx@npm:5.3.1" @@ -23023,18 +23032,19 @@ __metadata: languageName: node linkType: hard -"bull@npm:4.12.8": - version: 4.12.8 - resolution: "bull@npm:4.12.8" +"bull@npm:4.10.4": + version: 4.10.4 + resolution: "bull@npm:4.10.4" dependencies: cron-parser: ^4.2.1 + debuglog: ^1.0.0 get-port: ^5.1.1 - ioredis: ^5.3.2 + ioredis: ^5.0.0 lodash: ^4.17.21 - msgpackr: ^1.10.1 - semver: ^7.5.2 + msgpackr: ^1.5.2 + semver: ^7.3.2 uuid: ^8.3.0 - checksum: ae979ce1e9d15e0aac62eda41091f5047b624e2abd3166feed19fe7b357dabbdb1f2c61be6f396f3a80e814275ec68bcebdebbc50805140fd05ec058b70c54de + checksum: 84d0066cc695f9a185e315b792e1eac326ebd2dd89a2d309b41e25b237451c550baa7dce48cb7a7571062253fed5cab82c02ef74f345b0494f80cc8aaccec6d6 languageName: node linkType: hard @@ -23168,30 +23178,27 @@ __metadata: languageName: node linkType: hard -"cache-manager-ioredis-yet@npm:2.0.4": - version: 2.0.4 - resolution: "cache-manager-ioredis-yet@npm:2.0.4" +"cache-manager-ioredis-yet@npm:1.1.0": + version: 1.1.0 + resolution: "cache-manager-ioredis-yet@npm:1.1.0" dependencies: - cache-manager: "*" - ioredis: ^5.4.1 - telejson: ^7.2.0 - checksum: 4c009883ec60f28339e21c934b778f7b0b354aaccc306832b2b5ee441fa3a503bebf1d5c77c4955bba097a80c6532955218b3723aeda00cabf55675b5317b47b + cache-manager: ^5.1.0 + ioredis: ^5.2.3 + checksum: bc6679e0f7275f99ffaddb03178b6fc88d2c02695c49829c14f858060a31280c39b04b3530541b5f1d66f68619d5710cee927643b8a1e738af8bfcbef080edc5 languageName: node linkType: hard -"cache-manager@npm:*": - version: 5.5.2 - resolution: "cache-manager@npm:5.5.2" +"cache-manager-ioredis-yet@patch:cache-manager-ioredis-yet@npm%3A1.1.0#./.yarn/patches/cache-manager-ioredis-yet-npm-1.1.0-da7d1a9865.patch::locator=island.is%40workspace%3A.": + version: 1.1.0 + resolution: "cache-manager-ioredis-yet@patch:cache-manager-ioredis-yet@npm%3A1.1.0#./.yarn/patches/cache-manager-ioredis-yet-npm-1.1.0-da7d1a9865.patch::version=1.1.0&hash=5e3e7d&locator=island.is%40workspace%3A." dependencies: - eventemitter3: ^5.0.1 - lodash.clonedeep: ^4.5.0 - lru-cache: ^10.2.2 - promise-coalesce: ^1.1.2 - checksum: d30648aff3649d8a8582736684720870ab4442837197bcb3268cc8c06c6ae8be863ba0005d3e000b9fef382dee2e4a6b23c7b9333033bca39b5b2b02a1a3b86e + cache-manager: ^5.1.0 + ioredis: ^5.2.3 + checksum: 80b199d2ba7f8d8bca47aee267bde3a466401392eeb5103dcb1d9cbfb13567b92da0ec919c7bc84cd7a8d09a59d2de159ede6c6ad38501cdab5ad2ea5aca349a languageName: node linkType: hard -"cache-manager@npm:5.2.3": +"cache-manager@npm:5.2.3, cache-manager@npm:^5.1.0": version: 5.2.3 resolution: "cache-manager@npm:5.2.3" dependencies: @@ -26181,22 +26188,22 @@ __metadata: languageName: node linkType: hard -"dd-trace@npm:5.10.0": - version: 5.10.0 - resolution: "dd-trace@npm:5.10.0" +"dd-trace@npm:5.14.1": + version: 5.14.1 + resolution: "dd-trace@npm:5.14.1" dependencies: "@datadog/native-appsec": 7.1.1 - "@datadog/native-iast-rewriter": 2.3.0 - "@datadog/native-iast-taint-tracking": 1.7.0 + "@datadog/native-iast-rewriter": 2.3.1 + "@datadog/native-iast-taint-tracking": 2.1.0 "@datadog/native-metrics": ^2.0.0 - "@datadog/pprof": 5.2.0 + "@datadog/pprof": 5.3.0 "@datadog/sketches-js": ^2.1.0 - "@opentelemetry/api": ^1.0.0 + "@opentelemetry/api": ">=1.0.0 <1.9.0" "@opentelemetry/core": ^1.14.0 crypto-randomuuid: ^1.0.0 dc-polyfill: ^0.1.4 ignore: ^5.2.4 - import-in-the-middle: ^1.7.3 + import-in-the-middle: ^1.7.4 int64-buffer: ^0.1.9 ipaddr.js: ^2.1.0 istanbul-lib-coverage: 3.2.0 @@ -26217,26 +26224,26 @@ __metadata: semver: ^7.5.4 shell-quote: ^1.8.1 tlhunter-sorted-set: ^0.1.0 - checksum: d852dac7d7c458724475d34a001906574967731d7f13ee8cc8de01b0c2eea0ff485abb059f16357f0f0c5ce074be9a96bb49da34b968f45c3e862ef7f4ac752e + checksum: 3598d46511068fe32a1901a429946a55a8932c90c1fcd92f07a152fd066867e4cbb6505b04118fcbd26460ccc966cc5a322e9f03b886d10ea9bcc373fd81ffde languageName: node linkType: hard -"dd-trace@patch:dd-trace@npm%3A5.10.0#./.yarn/patches/dd-trace-npm-5.10.0-184ed36e96.patch::locator=island.is%40workspace%3A.": - version: 5.10.0 - resolution: "dd-trace@patch:dd-trace@npm%3A5.10.0#./.yarn/patches/dd-trace-npm-5.10.0-184ed36e96.patch::version=5.10.0&hash=5c9466&locator=island.is%40workspace%3A." +"dd-trace@patch:dd-trace@npm%3A5.14.1#./.yarn/patches/dd-trace-npm-5.14.1-8d45ad14d6.patch::locator=island.is%40workspace%3A.": + version: 5.14.1 + resolution: "dd-trace@patch:dd-trace@npm%3A5.14.1#./.yarn/patches/dd-trace-npm-5.14.1-8d45ad14d6.patch::version=5.14.1&hash=5c9466&locator=island.is%40workspace%3A." dependencies: "@datadog/native-appsec": 7.1.1 - "@datadog/native-iast-rewriter": 2.3.0 - "@datadog/native-iast-taint-tracking": 1.7.0 + "@datadog/native-iast-rewriter": 2.3.1 + "@datadog/native-iast-taint-tracking": 2.1.0 "@datadog/native-metrics": ^2.0.0 - "@datadog/pprof": 5.2.0 + "@datadog/pprof": 5.3.0 "@datadog/sketches-js": ^2.1.0 - "@opentelemetry/api": ^1.0.0 + "@opentelemetry/api": ">=1.0.0 <1.9.0" "@opentelemetry/core": ^1.14.0 crypto-randomuuid: ^1.0.0 dc-polyfill: ^0.1.4 ignore: ^5.2.4 - import-in-the-middle: ^1.7.3 + import-in-the-middle: ^1.7.4 int64-buffer: ^0.1.9 ipaddr.js: ^2.1.0 istanbul-lib-coverage: 3.2.0 @@ -26257,7 +26264,7 @@ __metadata: semver: ^7.5.4 shell-quote: ^1.8.1 tlhunter-sorted-set: ^0.1.0 - checksum: fdb45715b6b850e00ea222e23d57cd834c17c4eaf278fa10cc852b13102944217b40cce68f0d406fd42d8242bb2e7fdaae481f8732de7b0665a79c4dbab66ee3 + checksum: 9e62f644cfdac8aaca2679f100eb2ae0bd923212efb4b11b9125ac47a4e167025d5f4db3e16c02573162ae882c8869811274e3ccd3f7c85f1bb468ec242007d7 languageName: node linkType: hard @@ -26310,7 +26317,7 @@ __metadata: languageName: node linkType: hard -"debuglog@npm:^1.0.1": +"debuglog@npm:^1.0.0, debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" checksum: 970679f2eb7a73867e04d45b52583e7ec6dee1f33c058e9147702e72a665a9647f9c3d6e7c2f66f6bf18510b23eb5ded1b617e48ac1db23603809c5ddbbb9763 @@ -29075,13 +29082,6 @@ __metadata: languageName: node linkType: hard -"eventemitter3@npm:^5.0.1": - version: 5.0.1 - resolution: "eventemitter3@npm:5.0.1" - checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8 - languageName: node - linkType: hard - "events@npm:1.1.1": version: 1.1.1 resolution: "events@npm:1.1.1" @@ -32802,15 +32802,15 @@ __metadata: languageName: node linkType: hard -"import-in-the-middle@npm:^1.7.3": - version: 1.7.3 - resolution: "import-in-the-middle@npm:1.7.3" +"import-in-the-middle@npm:^1.7.4": + version: 1.7.4 + resolution: "import-in-the-middle@npm:1.7.4" dependencies: acorn: ^8.8.2 - acorn-import-assertions: ^1.9.0 + acorn-import-attributes: ^1.9.5 cjs-module-lexer: ^1.2.2 module-details-from-path: ^1.0.3 - checksum: ea4415ad6861bef79b815810518cb0bdb0b0a2c6d5c49205732e0e724e842f87794612b0a75f1e312dfaad6cc3e2fb855c9832ba6594c1f534679063cca0e73c + checksum: 4aec486db2e12526f2df13774100dfbc043303cd6dd7c8f0a4e40012da93bb6ba21a671e8aa4c35743af68d5f2d00fc0ffb438a685450890f5853805afdafc91 languageName: node linkType: hard @@ -33163,9 +33163,9 @@ __metadata: languageName: node linkType: hard -"ioredis@npm:5.4.1, ioredis@npm:^5.3.2, ioredis@npm:^5.4.1": - version: 5.4.1 - resolution: "ioredis@npm:5.4.1" +"ioredis@npm:5.3.2, ioredis@npm:^5.0.0, ioredis@npm:^5.2.3, ioredis@npm:^5.3.2": + version: 5.3.2 + resolution: "ioredis@npm:5.3.2" dependencies: "@ioredis/commands": ^1.1.1 cluster-key-slot: ^1.1.0 @@ -33176,7 +33176,7 @@ __metadata: redis-errors: ^1.2.0 redis-parser: ^3.0.0 standard-as-callback: ^2.1.0 - checksum: 92210294f75800febe7544c27b07e4892480172363b11971aa575be5b68f023bfed4bc858abc9792230c153aa80409047a358f174062c14d17536aa4499fe10b + checksum: 9a23559133e862a768778301efb68ae8c2af3c33562174b54a4c2d6574b976e85c75a4c34857991af733e35c48faf4c356e7daa8fb0a3543d85ff1768c8754bc languageName: node linkType: hard @@ -34179,7 +34179,7 @@ __metadata: "@graphql-codegen/typescript-resolvers": 2.7.3 "@hookform/error-message": 2.0.1 "@island.is/regulations-tools": 0.8.1 - "@keyv/redis": 2.8.5 + "@keyv/redis": 2.6.1 "@livechat/widget-core": 1.3.2 "@nestjs/apollo": 10.1.0 "@nestjs/axios": 2.0.0 @@ -34306,9 +34306,9 @@ __metadata: babel-plugin-transform-imports: 2.0.0 beygla: 1.4.0 bottleneck: 2.19.5 - bull: 4.12.8 + bull: 4.10.4 cache-manager: 5.2.3 - cache-manager-ioredis-yet: 2.0.4 + cache-manager-ioredis-yet: 1.1.0 chalk: 4.1.2 class-transformer: 0.5.1 class-validator: 0.14.0 @@ -34335,7 +34335,7 @@ __metadata: dataloader: 2.1.0 date-fns: 2.28.0 datebook: 7.0.8 - dd-trace: 5.10.0 + dd-trace: 5.14.1 deepmerge: 4.2.2 dotenv: 16.3.1 downshift: 5.4.3 @@ -34380,7 +34380,7 @@ __metadata: inspectpack: 4.7.1 intl: 1.2.5 intl-locales-supported: 1.8.12 - ioredis: 5.4.1 + ioredis: 5.3.2 ip3country: 5.0.0 is-circular: 1.0.2 is-url: 1.2.4 @@ -37495,13 +37495,6 @@ __metadata: languageName: node linkType: hard -"lru-cache@npm:^10.2.2": - version: 10.2.2 - resolution: "lru-cache@npm:10.2.2" - checksum: 98e8fc93691c546f719a76103ef2bee5a3ac823955c755a47641ec41f8c7fafa1baeaba466937cc1cbfa9cfd47e03536d10e2db3158a64ad91ff3a58a32c893e - languageName: node - linkType: hard - "lru-cache@npm:^4.1.5": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -39919,15 +39912,15 @@ __metadata: languageName: node linkType: hard -"msgpackr@npm:^1.10.1": - version: 1.10.2 - resolution: "msgpackr@npm:1.10.2" +"msgpackr@npm:^1.5.2": + version: 1.10.1 + resolution: "msgpackr@npm:1.10.1" dependencies: msgpackr-extract: ^3.0.2 dependenciesMeta: msgpackr-extract: optional: true - checksum: f7d9aae68196b3612e522a81c939b226045d115e97233541bf8475d170ca686f814bfdb6255865912d052f87f37466dbadf09ca17541b315f03d9ad9f6b439ef + checksum: e422d18b01051598b23701eebeb4b9e2c686b9c7826b20f564724837ba2b5cd4af74c91a549eaeaf8186645cc95e8196274a4a19442aa3286ac611b98069c194 languageName: node linkType: hard @@ -43371,13 +43364,6 @@ __metadata: languageName: node linkType: hard -"promise-coalesce@npm:^1.1.2": - version: 1.1.2 - resolution: "promise-coalesce@npm:1.1.2" - checksum: 6f951b5db40ca78d09ad0f72adea0a2e9c5bdb0fc5b3ef218c611e2191c6ce2e9f752f815630fd07875dd1c9f04cc7327d6bada04b662dce986ce86ab88c2d5e - languageName: node - linkType: hard - "promise-inflight@npm:^1.0.1": version: 1.0.1 resolution: "promise-inflight@npm:1.0.1" @@ -47067,15 +47053,6 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.2": - version: 7.6.2 - resolution: "semver@npm:7.6.2" - bin: - semver: bin/semver.js - checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d - languageName: node - linkType: hard - "semver@npm:~5.3.0": version: 5.3.0 resolution: "semver@npm:5.3.0"