Skip to content

Commit

Permalink
fix(driving-license): digital license, no pickup (#15881)
Browse files Browse the repository at this point in the history
* fix(driving-license): digital license, no pickup

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 4, 2024
1 parent 0fa0872 commit 9279407
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export {
UserProfileApi,
CurrentLicenseApi,
DrivingAssessmentApi,
JurisdictionApi,
QualityPhotoApi,
ExistingApplicationApi,
} from '@island.is/application/types'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -33,7 +32,6 @@ export const draft: Form = buildForm({
subSectionOtherCountry,
subSectionOtherCountryDirections,
subSectionQualityPhoto,
subSectionDelivery,
subSectionHealthDeclaration,
subSectionSummary,
],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -29,6 +30,7 @@ export const getForm = ({
sectionExternalData,
sectionExistingApplication,
...(allowPickLicense ? [sectionApplicationFor(allowBELicense)] : []),
sectionDigitalLicenseInfo,
sectionRequirements,
],
}),
Expand All @@ -43,7 +45,7 @@ export const getForm = ({
children: [],
}),
buildSection({
id: 'confim',
id: 'confirm',
title: m.applicationDone,
children: [],
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
}),
],
}),
],
})
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
UserProfileApi,
CurrentLicenseApi,
DrivingAssessmentApi,
JurisdictionApi,
QualityPhotoApi,
ExistingApplicationApi,
} from '@island.is/application/types'
Expand Down Expand Up @@ -57,10 +56,6 @@ export const sectionExternalData = buildSubSection({
provider: DrivingAssessmentApi,
title: '',
}),
buildDataProviderItem({
provider: JurisdictionApi,
title: '',
}),
buildDataProviderItem({
provider: SyslumadurPaymentCatalogApi,
title: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
ApplicationStateSchema,
DefaultEvents,
defineTemplateApi,
JurisdictionApi,
CurrentLicenseApi,
DrivingAssessmentApi,
NationalRegistryUserApi,
Expand Down Expand Up @@ -133,7 +132,6 @@ const template: ApplicationTemplate<
},
}),
DrivingAssessmentApi,
JurisdictionApi,
QualityPhotoApi,
ExistingApplicationApi.configure({
params: {
Expand Down
37 changes: 27 additions & 10 deletions libs/application/templates/driving-license/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9279407

Please sign in to comment.