-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(driving-license): hotfix/jurisdictionid back in dl (#15940)
* fix(driving-license): digital license, no pickup (#15881) * fix(driving-license): digital license, no pickup * chore: nx format:write update dirty files --------- Co-authored-by: andes-it <builders@andes.is> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> * fix(driving-license): adding back JurisdictionApi check (#15938) * fix(driving-license): adding back JurisdictionApi check * chore: nx format:write update dirty files --------- Co-authored-by: andes-it <builders@andes.is> --------- Co-authored-by: andes-it <builders@andes.is> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
690fb3e
commit 38154ed
Showing
6 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
libs/application/templates/driving-license/src/forms/draft/subSectionDelivery.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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}`, | ||
})) | ||
}, | ||
}), | ||
], | ||
}), | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters