Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
albina committed Feb 5, 2025
1 parent fccd177 commit 1ef0519
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 109 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export { QualityPhoto } from './QualityPhoto/index'
export { QualitySignature } from './QualitySignature'
export { CurrentLicense } from './CurrentLicense'
export { PaymentCharge } from './PaymentCharge'
export { PaymentPending } from './PaymentPending'
export { SubmitAndDecline } from './SubmitAndDecline'

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { sectionInformation } from './applicationSections/sectionInformation'
import { sectionDelivery } from './applicationSections/sectionDelivery'
import { sectionOverview } from './applicationSections/sectionOverview'
import { sectionPayment } from './applicationSections/sectionPayment'
import { m } from '../lib/messages'
import { sectionFakeData } from './applicationSections/sectionFakeData'
import { sectionReasonForApplication } from './applicationSections/sectionReasonForApplication'
import { sectionDigitalLicenseInfo } from './applicationSections/sectionDigitalLicenseInfo'
Expand All @@ -20,13 +19,12 @@ export const getApplication = ({ allowFakeData = false }): Form => {
renderLastScreenBackButton: true,
children: [
buildSection({
id: 'externalData',
title: m.dataCollectionTitle,
children: [
...(allowFakeData ? [sectionFakeData] : []),
sectionDataProviders,
],
id: 'fakeData',
title: 'Gervigögn',
condition: () => allowFakeData,
children: [sectionFakeData],
}),
sectionDataProviders,
sectionReasonForApplication,
sectionInformation,
sectionSignatureAndPhoto,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
buildExternalDataProvider,
buildDataProviderItem,
buildSection,
} from '@island.is/application/core'
import { m } from '../../lib/messages'
import {
Expand All @@ -16,52 +17,58 @@ import {
SyslumadurPaymentCatalogApi,
} from '../../dataProviders'

export const sectionDataProviders = buildExternalDataProvider({
id: 'approveExternalData',
export const sectionDataProviders = buildSection({
id: 'externalData',
title: m.dataCollectionTitle,
subTitle: m.dataCollectionSubtitle,
description: m.dataCollectionDescription,
checkboxLabel: m.dataCollectionCheckboxLabel,
enableMockPayment: true,
dataProviders: [
buildDataProviderItem({
provider: NationalRegistryUserApi,
title: m.dataCollectionNationalRegistryTitle,
subTitle: m.dataCollectionNationalRegistrySubtitle,
}),
buildDataProviderItem({
provider: QualityPhotoApi,
title: m.dataCollectionQualityPhotoTitle,
subTitle: m.dataCollectionQualityPhotoSubtitle,
}),
buildDataProviderItem({
provider: QualitySignatureApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: DuplicateEligibilityApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: UserProfileApi,
title: m.dataCollectionUserProfileTitle,
subTitle: m.dataCollectionUserProfileSubtitle,
}),
buildDataProviderItem({
provider: JurisdictionApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: CurrentLicenseApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: SyslumadurPaymentCatalogApi,
title: '',
children: [
buildExternalDataProvider({
id: 'approveExternalData',
title: m.dataCollectionTitle,
subTitle: m.dataCollectionSubtitle,
description: m.dataCollectionDescription,
checkboxLabel: m.dataCollectionCheckboxLabel,
enableMockPayment: true,
dataProviders: [
buildDataProviderItem({
provider: NationalRegistryUserApi,
title: m.dataCollectionNationalRegistryTitle,
subTitle: m.dataCollectionNationalRegistrySubtitle,
}),
buildDataProviderItem({
provider: QualityPhotoApi,
title: m.dataCollectionQualityPhotoTitle,
subTitle: m.dataCollectionQualityPhotoSubtitle,
}),
buildDataProviderItem({
provider: QualitySignatureApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: DuplicateEligibilityApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: UserProfileApi,
title: m.dataCollectionUserProfileTitle,
subTitle: m.dataCollectionUserProfileSubtitle,
}),
buildDataProviderItem({
provider: JurisdictionApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: CurrentLicenseApi,
title: '',
subTitle: '',
}),
buildDataProviderItem({
provider: SyslumadurPaymentCatalogApi,
title: '',
}),
],
}),
],
})
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
buildDateField,
buildDescriptionField,
buildMultiField,
buildRadioField,
buildSubSection,
Expand All @@ -15,17 +14,8 @@ export const sectionFakeData = buildSubSection({
children: [
buildMultiField({
id: 'shouldFake',
title: 'Gervigögn',
children: [
buildDescriptionField({
id: 'gervigognDesc',
title: 'Viltu nota gervigögn?',
titleVariant: 'h5',
// Note: text is rendered by a markdown component.. and when
// it sees the indented spaces it seems to assume this is code
// and so it will wrap the text in a <code> block when the double
// spaces are not removed.
description: `
title: 'Viltu nota gervigögn?',
description: `
Ath. gervigögn eru eingöngu notuð í stað þess að sækja
forsendugögn í staging umhverfi (dev x-road) hjá RLS, auk þess
sem hægt er að senda inn umsóknina í "þykjó" - þeas. allt hagar sér
Expand All @@ -35,7 +25,7 @@ export const sectionFakeData = buildSubSection({
til að hægt sé að prófa ferlið án þess að vera með tilheyrandi
ökuréttindi í staging grunni RLS.
`.replace(/\s{1,}/g, ' '),
}),
children: [
buildRadioField({
id: 'fakeData.useFakeData',
title: '',
Expand Down

0 comments on commit 1ef0519

Please sign in to comment.