diff --git a/libs/application/templates/driving-license/src/dataProviders/index.ts b/libs/application/templates/driving-license/src/dataProviders/index.ts index c6d5f3243fa1..fe90c3829b53 100644 --- a/libs/application/templates/driving-license/src/dataProviders/index.ts +++ b/libs/application/templates/driving-license/src/dataProviders/index.ts @@ -9,7 +9,6 @@ export { UserProfileApi, CurrentLicenseApi, DrivingAssessmentApi, - JurisdictionApi, QualityPhotoApi, ExistingApplicationApi, } from '@island.is/application/types' diff --git a/libs/application/templates/driving-license/src/forms/draft/draft.ts b/libs/application/templates/driving-license/src/forms/draft/draft.ts index d120dd2231c3..3757e636945a 100644 --- a/libs/application/templates/driving-license/src/forms/draft/draft.ts +++ b/libs/application/templates/driving-license/src/forms/draft/draft.ts @@ -6,7 +6,6 @@ import { subSectionTempInfo } from './subSectionTempInfo' import { subSectionOtherCountry } from './subSectionOtherCountry' import { subSectionOtherCountryDirections } from './subSectionOtherCountryDirections' import { subSectionQualityPhoto } from './subSectionQualityPhoto' -import { subSectionDelivery } from './subSectionDelivery' import { subSectionHealthDeclaration } from './subSectionHealthDeclaration' import { subSectionSummary } from './subSectionSummary' import { subSectionPhone } from './subSectionPhone' @@ -33,7 +32,6 @@ export const draft: Form = buildForm({ subSectionOtherCountry, subSectionOtherCountryDirections, subSectionQualityPhoto, - subSectionDelivery, subSectionHealthDeclaration, subSectionSummary, ], diff --git a/libs/application/templates/driving-license/src/forms/draft/subSectionDelivery.ts b/libs/application/templates/driving-license/src/forms/draft/subSectionDelivery.ts deleted file mode 100644 index a6295a5344c5..000000000000 --- a/libs/application/templates/driving-license/src/forms/draft/subSectionDelivery.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { - buildDescriptionField, - buildMultiField, - buildSelectField, - buildSubSection, -} from '@island.is/application/core' -import { m } from '../../lib/messages' -import { - chooseDistrictCommissionerDescription, - hasNoDrivingLicenseInOtherCountry, -} from '../../lib/utils' - -import { Jurisdiction } from '@island.is/clients/driving-license' - -export const subSectionDelivery = buildSubSection({ - id: 'user', - title: m.informationSectionTitle, - condition: hasNoDrivingLicenseInOtherCountry, - children: [ - buildMultiField({ - id: 'info', - title: m.pickupLocationTitle, - space: 1, - children: [ - buildDescriptionField({ - id: 'afhending', - title: m.districtCommisionerTitle, - titleVariant: 'h4', - description: chooseDistrictCommissionerDescription, - }), - buildSelectField({ - id: 'jurisdiction', - title: m.districtCommisionerPickup, - disabled: false, - required: true, - options: ({ - externalData: { - jurisdictions: { data }, - }, - }) => { - return (data as Jurisdiction[]).map(({ id, name, zip }) => ({ - value: `${id}`, - label: name, - tooltip: `Póstnúmer ${zip}`, - })) - }, - }), - ], - }), - ], -}) diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts b/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts index a003e2366867..404cabe3d5fe 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/getForm.ts @@ -7,6 +7,7 @@ import { sectionExternalData } from './sectionExternalData' import { sectionApplicationFor } from './sectionApplicationFor' import { sectionRequirements } from './sectionRequirements' import { sectionExistingApplication } from './sectionExistingApplication' +import { sectionDigitalLicenseInfo } from './sectionDigitalLicenseInfo' export const getForm = ({ allowFakeData = false, @@ -29,6 +30,7 @@ export const getForm = ({ sectionExternalData, sectionExistingApplication, ...(allowPickLicense ? [sectionApplicationFor(allowBELicense)] : []), + sectionDigitalLicenseInfo, sectionRequirements, ], }), @@ -43,7 +45,7 @@ export const getForm = ({ children: [], }), buildSection({ - id: 'confim', + id: 'confirm', title: m.applicationDone, children: [], }), diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionDigitalLicenseInfo.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionDigitalLicenseInfo.ts new file mode 100644 index 000000000000..279e17edd222 --- /dev/null +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionDigitalLicenseInfo.ts @@ -0,0 +1,30 @@ +import { + buildAlertMessageField, + buildMultiField, + buildSubSection, +} from '@island.is/application/core' +import { m } from '../../lib/messages' +import { B_TEMP } from '../../lib/constants' + +export const sectionDigitalLicenseInfo = buildSubSection({ + id: 'digitalLicenseInfo', + title: m.digitalLicenseInfoTitle, + children: [ + buildMultiField({ + id: 'info', + title: m.digitalLicenseInfoTitle, + description: m.digitalLicenseInfoDescription, + children: [ + buildAlertMessageField({ + id: 'digitalLicenseInfo', + title: m.digitalLicenseInfoAlertTitle, + message: ({ answers }) => + answers.applicationFor === B_TEMP + ? m.digitalLicenseInfoAlertMessageBTemp + : m.digitalLicenseInfoAlertMessageBFull, + alertType: 'info', + }), + ], + }), + ], +}) diff --git a/libs/application/templates/driving-license/src/forms/prerequisites/sectionExternalData.ts b/libs/application/templates/driving-license/src/forms/prerequisites/sectionExternalData.ts index b920cf6deeca..5a8c4a131fdf 100644 --- a/libs/application/templates/driving-license/src/forms/prerequisites/sectionExternalData.ts +++ b/libs/application/templates/driving-license/src/forms/prerequisites/sectionExternalData.ts @@ -10,7 +10,6 @@ import { UserProfileApi, CurrentLicenseApi, DrivingAssessmentApi, - JurisdictionApi, QualityPhotoApi, ExistingApplicationApi, } from '@island.is/application/types' @@ -57,10 +56,6 @@ export const sectionExternalData = buildSubSection({ provider: DrivingAssessmentApi, title: '', }), - buildDataProviderItem({ - provider: JurisdictionApi, - title: '', - }), buildDataProviderItem({ provider: SyslumadurPaymentCatalogApi, title: '', diff --git a/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts b/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts index 210c180849c8..43d724e7f327 100644 --- a/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts +++ b/libs/application/templates/driving-license/src/lib/drivingLicenseTemplate.ts @@ -11,7 +11,6 @@ import { ApplicationStateSchema, DefaultEvents, defineTemplateApi, - JurisdictionApi, CurrentLicenseApi, DrivingAssessmentApi, NationalRegistryUserApi, @@ -133,7 +132,6 @@ const template: ApplicationTemplate< }, }), DrivingAssessmentApi, - JurisdictionApi, QualityPhotoApi, ExistingApplicationApi.configure({ params: { diff --git a/libs/application/templates/driving-license/src/lib/messages.ts b/libs/application/templates/driving-license/src/lib/messages.ts index 9ae2238b273b..8aabdf363f80 100644 --- a/libs/application/templates/driving-license/src/lib/messages.ts +++ b/libs/application/templates/driving-license/src/lib/messages.ts @@ -105,11 +105,6 @@ export const m = defineMessages({ defaultMessage: 'Sýslumannsembætti', description: 'Information', }, - pickupLocationTitle: { - id: 'dl.application:pickuplocation', - defaultMessage: 'Afhendingarstaður', - description: 'location for pickup', - }, informationApplicant: { id: 'dl.application:information.applicant', defaultMessage: 'Umsækjandi', @@ -432,6 +427,33 @@ export const m = defineMessages({ description: 'Your application for a full driving license has been received. Before a full driving license can be applied for, you must bring the following to the district commissioner.', }, + digitalLicenseInfoTitle: { + id: 'dl.application:digitalLicenseInfoTitle', + defaultMessage: 'Stafrænt ökuskírteini', + description: 'Digital driving license', + }, + digitalLicenseInfoDescription: { + id: 'dl.application:digitalLicenseInfoDescription', + defaultMessage: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + description: 'Digital driving license', + }, + digitalLicenseInfoAlertTitle: { + id: 'dl.application:digitalLicenseInfoAlertTitle', + defaultMessage: 'Athugið', + description: 'Digital driving license', + }, + digitalLicenseInfoAlertMessageBTemp: { + id: 'dl.application:digitalLicenseInfoAlertMessageBTemp#markdown', + defaultMessage: + 'Þú ert að sækja um bráðabirgðaökuskírteini. Ökuskírteini þitt verður einungis gefið út sem stafrænt ökuskírteini og verður aðgengilegt fyrir þig um leið og öll skilyrði fyrir bráðabirgðaökuskírteini eru uppfyllt.', + description: 'Digital driving license', + }, + digitalLicenseInfoAlertMessageBFull: { + id: 'dl.application:digitalLicenseInfoAlertMessageBFull#markdown', + defaultMessage: + 'Þú ert að sækja um fullnaðarökuskírteini. Ökuskírteini þitt verður núna einungis gefið út sem stafrænt ökuskírteini og verður aðgengilegt fyrir þig þegar þú hefur lokið þessari pöntun um fullnaðarökuskírteini. Fullnaðarökuskírteini þitt verður framleitt í plasti í byrjun febrúar 2025 og sent til þín með Póstinum, á skráð lögheimili þitt um leið og plastökuskírteinið er tilbúið.', + description: 'Digital driving license', + }, congratulationsTempHelpText: { id: 'dl.application:congratulationsTempHelpText', defaultMessage: @@ -559,11 +581,6 @@ export const m = defineMessages({ defaultMessage: 'Sýslumannsembætti', description: 'Title for district commissioner', }, - districtCommisionerPickup: { - id: 'dl.application:districtCommisionerPickup', - defaultMessage: 'Afhending', - description: 'Pickup for district commissioner', - }, chooseDistrictCommisionerForFullLicense: { id: 'dl.application:chooseDistrictCommisionerForFullLicense', defaultMessage: