diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts index e9653b885..9c07a9167 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/app-routing.module.ts @@ -5,6 +5,10 @@ import { LandingComponent } from './landing.component'; import { AccessDeniedComponent } from './shared/components/access-denied.component'; const routes: Routes = [ + { + path: '', + component: LandingComponent, + }, { path: AppRoutes.PERSONAL_LICENCE_APPLICATION, loadChildren: () => @@ -51,7 +55,8 @@ const routes: Routes = [ }, { path: '**', - component: LandingComponent, + redirectTo: AppRoutes.path(AppRoutes.LANDING), + pathMatch: 'full', }, ]; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/common-application.service.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/common-application.service.ts index 26209ff1f..bf3fa6005 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/common-application.service.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/common-application.service.ts @@ -719,6 +719,8 @@ export class CommonApplicationService { getApplicationIsInProgress(appls: Array): boolean { return !!appls.find( (item: MainApplicationResponse) => + (item.applicationPortalStatusCode === ApplicationPortalStatusCode.Draft && + item.applicationTypeCode != ApplicationTypeCode.New) || item.applicationPortalStatusCode === ApplicationPortalStatusCode.AwaitingPayment || item.applicationPortalStatusCode === ApplicationPortalStatusCode.AwaitingThirdParty || item.applicationPortalStatusCode === ApplicationPortalStatusCode.InProgress || @@ -992,7 +994,9 @@ export class CommonApplicationService { if (matchingLicence) { // expiry dates of both licences must match to be simultaneous - licence.isSimultaneousFlow = matchingLicence.linkedSoleProprietorExpiryDate === licence.expiryDate; + licence.isSimultaneousFlow = + !!matchingLicence.linkedSoleProprietorLicenceId && + matchingLicence.linkedSoleProprietorExpiryDate === licence.expiryDate; if (licence.hasSecurityGuardCategory) { licence.dogAuthorization = matchingLicence.useDogs ?? false; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/worker-application.service.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/worker-application.service.ts index b9eae0d60..f9a3d1ed5 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/worker-application.service.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/core/services/worker-application.service.ts @@ -162,7 +162,7 @@ export class WorkerApplicationService extends WorkerApplicationHelper { // if the sole proprietor flag is 'No', then set the bizTypeCode. This is not user selected. const soleProprietorData = { isSoleProprietor: isSoleProprietorYesNo, - bizTypeCode: BizTypeCode.None, + bizTypeCode: null, }; this.workerModelFormGroup.patchValue( @@ -1477,34 +1477,33 @@ export class WorkerApplicationService extends WorkerApplicationHelper { const serviceTypeData = { serviceTypeCode: workerLicenceAppl.serviceTypeCode }; const applicationTypeData = { applicationTypeCode: workerLicenceAppl.applicationTypeCode }; - const bizTypeCode = workerLicenceAppl.bizTypeCode ?? BizTypeCode.None; + let bizTypeCode = workerLicenceAppl.bizTypeCode ?? BizTypeCode.None; - const originalLicenceData = this.originalLicenceFormGroup.value; - originalLicenceData.originalBizTypeCode = bizTypeCode; - - let isSoleProprietor = !!associatedLicence?.linkedSoleProprietorLicenceId; - if (!isSoleProprietor) { - isSoleProprietor = this.commonApplicationService.isBusinessLicenceSoleProprietor(bizTypeCode); - } - - const soleProprietorData = { - isSoleProprietor: this.utilService.booleanToBooleanType(isSoleProprietor), - bizTypeCode, - }; + let soleProprietorData = {}; - let isSoleProprietorSimultaneousFlow: boolean | null = null; - if (associatedLicence) { - isSoleProprietorSimultaneousFlow = !!associatedLicence.linkedSoleProprietorLicenceId; + // Check if in a simultaneous flow + const isSoleProprietorSimultaneousFlow = this.isSimultaneousFlow(bizTypeCode, associatedLicence); + if (isSoleProprietorSimultaneousFlow) { + soleProprietorData = { + isSoleProprietor: BooleanTypeCode.Yes, + bizTypeCode, + }; } else { - isSoleProprietorSimultaneousFlow = isSoleProprietor; + // Check not a simultaneous flow, clear out any bad data + bizTypeCode = BizTypeCode.None; + soleProprietorData = { + isSoleProprietor: BooleanTypeCode.No, + bizTypeCode: null, + }; } + const originalLicenceData = this.originalLicenceFormGroup.value; + originalLicenceData.originalBizTypeCode = bizTypeCode; + console.debug('[applyLicenceIntoModel] applyLicenceIntoModel'); console.debug('[applyLicenceIntoModel] workerLicenceAppl', workerLicenceAppl); console.debug('[applyLicenceIntoModel] associatedLicence', associatedLicence); console.debug('[applyLicenceIntoModel] associatedExpiredLicence', associatedExpiredLicence); - console.debug('[applyLicenceIntoModel] isSoleProprietor', isSoleProprietor); - console.debug('[applyLicenceIntoModel] isSoleProprietorSimultaneousFlow', isSoleProprietorSimultaneousFlow); console.debug('[applyLicenceIntoModel] soleProprietorData', soleProprietorData); const hasExpiredLicence = workerLicenceAppl.hasExpiredLicence ?? false; @@ -1901,7 +1900,7 @@ export class WorkerApplicationService extends WorkerApplicationHelper { licenceAppId: workerLicenceAppl.licenceAppId, latestApplicationId: workerLicenceAppl.licenceAppId, caseNumber: workerLicenceAppl.caseNumber, - soleProprietorBizAppId: workerLicenceAppl.soleProprietorBizAppId, + soleProprietorBizAppId: isSoleProprietorSimultaneousFlow ? workerLicenceAppl.soleProprietorBizAppId : null, isSoleProprietorSimultaneousFlow, serviceTypeData, applicationTypeData, @@ -2046,15 +2045,29 @@ export class WorkerApplicationService extends WorkerApplicationHelper { ): Observable { const applicationTypeData = { applicationTypeCode: ApplicationTypeCode.Renewal }; - // Remove data that should be re-prompted for - const soleProprietorData = { - isSoleProprietor: null, - bizTypeCode: resp.soleProprietorData.bizTypeCode, - }; const licenceTermData = { - licenceTermCode: null, + licenceTermCode: null, // Remove data that should be re-prompted for }; + // Check if in a simultaneous flow + const isSoleProprietorSimultaneousFlow = this.isSimultaneousFlow( + resp.soleProprietorData.bizTypeCode, + associatedLicence + ); + + let soleProprietorData = {}; + if (isSoleProprietorSimultaneousFlow) { + soleProprietorData = { + isSoleProprietor: null, // Remove data that should be re-prompted for + bizTypeCode: resp.soleProprietorData.bizTypeCode, + }; + } else { + soleProprietorData = { + isSoleProprietor: null, // Remove data that should be re-prompted for + bizTypeCode: null, + }; + } + const [ categoryArmouredCarGuardFormGroup, categoryBodyArmourSalesFormGroup, @@ -2141,6 +2154,13 @@ export class WorkerApplicationService extends WorkerApplicationHelper { }; } + // If not a simultaneous flow, clear out any bad data + if (!isSoleProprietorSimultaneousFlow) { + originalLicenceData.originalBizTypeCode = BizTypeCode.None; + originalLicenceData.linkedSoleProprietorExpiryDate = null; + originalLicenceData.linkedSoleProprietorLicenceId = null; + } + this.workerModelFormGroup.patchValue( { licenceAppId: null, @@ -2199,6 +2219,30 @@ export class WorkerApplicationService extends WorkerApplicationHelper { const originalLicenceData = resp.originalLicenceData; originalLicenceData.originalLicenceTermCode = resp.licenceTermData.licenceTermCode; + // Check if in a simultaneous flow + const isSoleProprietorSimultaneousFlow = this.isSimultaneousFlow( + resp.soleProprietorData.bizTypeCode, + associatedLicence + ); + + let soleProprietorData = {}; + if (isSoleProprietorSimultaneousFlow) { + soleProprietorData = { + isSoleProprietor: BooleanTypeCode.Yes, + bizTypeCode: resp.soleProprietorData.bizTypeCode, + }; + } else { + // If not a simultaneous flow, clear out any bad data + originalLicenceData.originalBizTypeCode = BizTypeCode.None; + originalLicenceData.linkedSoleProprietorExpiryDate = null; + originalLicenceData.linkedSoleProprietorLicenceId = null; + + soleProprietorData = { + isSoleProprietor: BooleanTypeCode.No, + bizTypeCode: null, + }; + } + const mentalHealthConditionsData = { isTreatedForMHC: null, attachments: [], @@ -2264,6 +2308,7 @@ export class WorkerApplicationService extends WorkerApplicationHelper { categorySecurityAlarmResponseFormGroup, categorySecurityAlarmSalesFormGroup, categorySecurityConsultantFormGroup, + soleProprietorData, }, { emitEvent: false, @@ -2345,4 +2390,20 @@ export class WorkerApplicationService extends WorkerApplicationHelper { console.debug('[applyReplacementDataUpdatesToModel] licenceModel', this.workerModelFormGroup.value); return of(this.workerModelFormGroup.value); } + + private isSimultaneousFlow( + bizTypeCode: BizTypeCode | undefined, + associatedLicence: MainLicenceResponse | LicenceResponse | undefined + ): boolean { + if (!bizTypeCode && !associatedLicence) return false; + + if (!associatedLicence) { + return this.commonApplicationService.isBusinessLicenceSoleProprietor(bizTypeCode!); + } + + return ( + !!associatedLicence?.linkedSoleProprietorLicenceId && + associatedLicence.linkedSoleProprietorExpiryDate === associatedLicence.expiryDate + ); + } } diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/business-licence-application-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/business-licence-application-routing.module.ts index 2c68e728a..115a93d0a 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/business-licence-application-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/business-licence-application/business-licence-application-routing.module.ts @@ -98,7 +98,7 @@ const routes: Routes = [ component: BusinessFirstTimeUserTermsOfUseComponent, }, { - path: '', + path: '**', redirectTo: BusinessLicenceApplicationRoutes.path(), pathMatch: 'full', }, diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/components/step-controlling-member-summary-review.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/components/step-controlling-member-summary-review.component.ts index 5b678cc33..1c339cddc 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/components/step-controlling-member-summary-review.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/components/step-controlling-member-summary-review.component.ts @@ -5,8 +5,8 @@ import { ControllingMemberCrcService } from '@app/core/services/controlling-memb import { UtilService } from '@app/core/services/util.service'; @Component({ - selector: 'app-step-controlling-member-summary-review', - template: ` + selector: 'app-step-controlling-member-summary-review', + template: `
@@ -20,8 +20,8 @@ import { UtilService } from '@app/core/services/util.service'; mat-mini-fab color="primary" class="go-to-step-button" - matTooltip="Go to Step 3" - aria-label="Go to Step 3" + matTooltip="Go to Step 1" + aria-label="Go to Step 1" (click)="$event.stopPropagation(); onEditStep(0)" > edit @@ -115,8 +115,8 @@ import { UtilService } from '@app/core/services/util.service'; mat-mini-fab color="primary" class="go-to-step-button" - matTooltip="Go to Step 3" - aria-label="Go to Step 3" + matTooltip="Go to Step 2" + aria-label="Go to Step 2" (click)="$event.stopPropagation(); onEditStep(1)" > edit @@ -181,7 +181,7 @@ import { UtilService } from '@app/core/services/util.service';
- +
BC Driver's Licence
@@ -204,8 +204,8 @@ import { UtilService } from '@app/core/services/util.service'; mat-mini-fab color="primary" class="go-to-step-button" - matTooltip="Go to Step 2" - aria-label="Go to Step 2" + matTooltip="Go to Step 3" + aria-label="Go to Step 3" (click)="$event.stopPropagation(); onEditStep(2)" > edit @@ -296,8 +296,8 @@ import { UtilService } from '@app/core/services/util.service';
`, - styles: [ - ` + styles: [ + ` .mat-expansion-panel { border-radius: 0; } @@ -334,8 +334,8 @@ import { UtilService } from '@app/core/services/util.service'; height: 35px; } `, - ], - standalone: false + ], + standalone: false, }) export class StepControllingMemberSummaryReviewComponent implements OnInit { controllingMemberModelData: any = {}; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/controlling-member-crc-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/controlling-member-crc-routing.module.ts index 515871d00..a158addf8 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/controlling-member-crc-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/controlling-member-crc/controlling-member-crc-routing.module.ts @@ -32,6 +32,11 @@ const routes: Routes = [ path: ControllingMemberCrcRoutes.CONTROLLING_MEMBER_UPDATE, component: ControllingMemberWizardUpdateComponent, }, + { + path: '**', + redirectTo: ControllingMemberCrcRoutes.CONTROLLING_MEMBER_INVITATION, + pathMatch: 'full', + }, ]; @NgModule({ diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts index af1d1cfc9..ec2dff0e1 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/metal-dealers-and-recyclers/metal-dealers-and-recyclers-routing.module.ts @@ -26,7 +26,7 @@ const routes: Routes = [ ], }, { - path: '', + path: '**', redirectTo: MetalDealersAndRecyclersRoutes.pathMetalDealersAndRecyclers(), pathMatch: 'full', }, diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/anonymous/permit-wizard-step-components/step-permit-summary-anonymous.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/anonymous/permit-wizard-step-components/step-permit-summary-anonymous.component.ts index cf7159f31..a43d73855 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/anonymous/permit-wizard-step-components/step-permit-summary-anonymous.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/anonymous/permit-wizard-step-components/step-permit-summary-anonymous.component.ts @@ -5,8 +5,8 @@ import { CommonApplicationService } from '@app/core/services/common-application. import { PermitApplicationService } from '@app/core/services/permit-application.service'; @Component({ - selector: 'app-step-permit-summary-anonymous', - template: ` + selector: 'app-step-permit-summary-anonymous', + template: `
@@ -251,7 +251,7 @@ import { PermitApplicationService } from '@app/core/services/permit-application.
-
+
BC Driver's Licence
{{ bcDriversLicenceNumber | default }}
@@ -333,8 +333,8 @@ import { PermitApplicationService } from '@app/core/services/permit-application.
`, - styles: [ - ` + styles: [ + ` .mat-expansion-panel { border-radius: 0; } @@ -369,8 +369,8 @@ import { PermitApplicationService } from '@app/core/services/permit-application. height: 35px; } `, - ], - standalone: false + ], + standalone: false, }) export class StepPermitSummaryAnonymousComponent implements OnInit { permitModelData: any = {}; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-return-from-bl-sole-proprietor.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-return-from-bl-sole-proprietor.component.ts deleted file mode 100644 index 900823a31..000000000 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-return-from-bl-sole-proprietor.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-licence-return-from-bl-sole-proprietor', - template: '', - styles: [], - standalone: false -}) -export class LicenceReturnFromBlSoleProprietorComponent {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/permit-wizard-step-components/step-permit-summary-authenticated.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/permit-wizard-step-components/step-permit-summary-authenticated.component.ts index 2aa88ebff..86f39daf5 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/permit-wizard-step-components/step-permit-summary-authenticated.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/permit-wizard-step-components/step-permit-summary-authenticated.component.ts @@ -5,8 +5,8 @@ import { CommonApplicationService } from '@app/core/services/common-application. import { PermitApplicationService } from '@app/core/services/permit-application.service'; @Component({ - selector: 'app-step-permit-summary-authenticated', - template: ` + selector: 'app-step-permit-summary-authenticated', + template: `
@@ -184,7 +184,7 @@ import { PermitApplicationService } from '@app/core/services/permit-application.
-
+
BC Driver's Licence
{{ bcDriversLicenceNumber | default }}
@@ -196,8 +196,8 @@ import { PermitApplicationService } from '@app/core/services/permit-application.
`, - styles: [ - ` + styles: [ + ` .mat-expansion-panel { border-radius: 0; } @@ -232,8 +232,8 @@ import { PermitApplicationService } from '@app/core/services/permit-application. height: 35px; } `, - ], - standalone: false + ], + standalone: false, }) export class StepPermitSummaryAuthenticatedComponent implements OnInit { permitModelData: any = {}; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-return-from-bl-sole-proprietor.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-return-from-bl-sole-proprietor.component.ts new file mode 100644 index 000000000..e76ad0e5c --- /dev/null +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-return-from-bl-sole-proprietor.component.ts @@ -0,0 +1,9 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-worker-licence-return-from-bl-sole-proprietor', + template: '', + styles: [], + standalone: false +}) +export class WorkerLicenceReturnFromBlSoleProprietorComponent {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-wizard-step-components/step-worker-licence-summary-review-authenticated.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-wizard-step-components/step-worker-licence-summary-review-authenticated.component.ts index fafd0ae15..b9f1ef465 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-wizard-step-components/step-worker-licence-summary-review-authenticated.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-wizard-step-components/step-worker-licence-summary-review-authenticated.component.ts @@ -12,8 +12,8 @@ import { CommonApplicationService } from '@app/core/services/common-application. import { WorkerApplicationService } from '@app/core/services/worker-application.service'; @Component({ - selector: 'app-step-worker-licence-summary-review-authenticated', - template: ` + selector: 'app-step-worker-licence-summary-review-authenticated', + template: `
@@ -102,8 +102,8 @@ import { WorkerApplicationService } from '@app/core/services/worker-application. mat-mini-fab color="primary" class="go-to-step-button" - matTooltip="Go to Step 3" - aria-label="Go to Step 3" + matTooltip="Go to Step 2" + aria-label="Go to Step 2" (click)="$event.stopPropagation(); onEditStep(1)" > edit @@ -142,8 +142,8 @@ import { WorkerApplicationService } from '@app/core/services/worker-application.
`, - styles: [ - ` + styles: [ + ` .mat-expansion-panel { border-radius: 0; } @@ -178,8 +178,8 @@ import { WorkerApplicationService } from '@app/core/services/worker-application. height: 35px; } `, - ], - standalone: false + ], + standalone: false, }) export class StepWorkerLicenceSummaryReviewAuthenticatedComponent implements OnInit { licenceModelData: any = {}; diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-access-code-authorized.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-access-code-authorized.component.ts similarity index 100% rename from src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-access-code-authorized.component.ts rename to src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-access-code-authorized.component.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-application-base-authenticated.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-application-base-authenticated.component.ts similarity index 100% rename from src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-application-base-authenticated.component.ts rename to src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-application-base-authenticated.component.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-first-time-user-selection.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-first-time-user-selection.component.ts similarity index 100% rename from src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-first-time-user-selection.component.ts rename to src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-first-time-user-selection.component.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-first-time-user-terms-of-use.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-first-time-user-terms-of-use.component.ts similarity index 100% rename from src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-first-time-user-terms-of-use.component.ts rename to src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-first-time-user-terms-of-use.component.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-user-applications.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-user-applications.component.ts similarity index 100% rename from src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/licence-user-applications.component.ts rename to src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/licence-user-applications.component.ts diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/worker-summary-bc-drivers-licence.component.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/worker-summary-bc-drivers-licence.component.ts index 764a604e2..c69b0b0e1 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/worker-summary-bc-drivers-licence.component.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/shared/worker-summary-bc-drivers-licence.component.ts @@ -2,17 +2,17 @@ import { Component, Input } from '@angular/core'; import { WorkerApplicationService } from '@app/core/services/worker-application.service'; @Component({ - selector: 'app-worker-summary-bc-drivers-licence', - template: ` -
+ selector: 'app-worker-summary-bc-drivers-licence', + template: ` +
BC Driver's Licence
{{ bcDriversLicenceNumber | default }}
`, - styles: [], - standalone: false + styles: [], + standalone: false, }) export class WorkerSummaryBcDriversLicenceComponent { constructor(private workerApplicationService: WorkerApplicationService) {} diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routes.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routes.ts index 134bd20b4..6afc4747e 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routes.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routes.ts @@ -1,9 +1,10 @@ +import { AppRoutes } from '@app/app-routes'; + export class PersonalLicenceApplicationRoutes { public static readonly LICENCE_APPLICATION = 'personal-licence'; // AUTHENTICATED public static readonly LICENCE_BASE = 'application'; - public static readonly LICENCE_USER_APPLICATIONS_AUTHENTICATED = 'user-applications'; public static readonly LICENCE_RETURN_FROM_BL_SOLE_PROPRIETOR = 'return-user-applications'; public static readonly LICENCE_RETURN_FROM_BL_SOLE_PROPRIETOR_ANONYMOUS = 'return-user-applications-anonymous'; @@ -55,6 +56,10 @@ export class PersonalLicenceApplicationRoutes { public static readonly MODULE_PATH = PersonalLicenceApplicationRoutes.LICENCE_APPLICATION; + public static defaultLanding(): string { + return AppRoutes.path(AppRoutes.LANDING); + } + public static path(route: string | null = null): string { return route ? `/${PersonalLicenceApplicationRoutes.MODULE_PATH}/${route}` @@ -62,7 +67,7 @@ export class PersonalLicenceApplicationRoutes { } public static pathUserApplications(): string { - return `/${PersonalLicenceApplicationRoutes.MODULE_PATH}/${PersonalLicenceApplicationRoutes.LICENCE_BASE}/${PersonalLicenceApplicationRoutes.LICENCE_USER_APPLICATIONS_AUTHENTICATED}`; + return `/${PersonalLicenceApplicationRoutes.MODULE_PATH}/${PersonalLicenceApplicationRoutes.LICENCE_BASE}`; } public static pathReturnFromBusinessLicenceSoleProprietor(): string { diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routing.module.ts index d30ad8156..82e24652e 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application-routing.module.ts @@ -13,12 +13,7 @@ import { WorkerLicenceWizardAnonymousReplacementComponent } from './components/a import { WorkerLicenceWizardAnonymousUpdateComponent } from './components/anonymous/worker-licence-wizard-anonymous-update.component'; import { StepWorkerLicenceAccessCodeComponent } from './components/anonymous/worker-licence-wizard-step-components/step-worker-licence-access-code.component'; import { StepWorkerLicenceApplicationTypeAnonymousComponent } from './components/anonymous/worker-licence-wizard-step-components/step-worker-licence-application-type-anonymous.component'; -import { LicenceAccessCodeAuthorizedComponent } from './components/authenticated/licence-access-code-authorized.component'; -import { LicenceApplicationBaseAuthenticatedComponent } from './components/authenticated/licence-application-base-authenticated.component'; -import { LicenceFirstTimeUserSelectionComponent } from './components/authenticated/licence-first-time-user-selection.component'; -import { LicenceFirstTimeUserTermsOfUseComponent } from './components/authenticated/licence-first-time-user-terms-of-use.component'; -import { LicenceReturnFromBlSoleProprietorComponent } from './components/authenticated/licence-return-from-bl-sole-proprietor.component'; -import { LicenceUserApplicationsComponent } from './components/authenticated/licence-user-applications.component'; +import { WorkerLicenceReturnFromBlSoleProprietorComponent } from './components/authenticated/worker-licence-return-from-bl-sole-proprietor.component'; import { PermitWizardAuthenticatedNewComponent } from './components/authenticated/permit-wizard-authenticated-new.component'; import { PermitWizardAuthenticatedRenewalComponent } from './components/authenticated/permit-wizard-authenticated-renewal.component'; import { PermitWizardAuthenticatedUpdateComponent } from './components/authenticated/permit-wizard-authenticated-update.component'; @@ -30,6 +25,10 @@ import { WorkerLicenceWizardAuthenticatedRenewalComponent } from './components/a import { WorkerLicenceWizardAuthenticatedReplacementComponent } from './components/authenticated/worker-licence-wizard-authenticated-replacement.component'; import { WorkerLicenceWizardAuthenticatedUpdateComponent } from './components/authenticated/worker-licence-wizard-authenticated-update.component'; import { StepWorkerLicenceUpdateTermsAuthenticatedComponent } from './components/authenticated/worker-licence-wizard-step-components/step-worker-licence-update-terms-authenticated.component'; +import { LicenceAccessCodeAuthorizedComponent } from './components/shared/licence-access-code-authorized.component'; +import { LicenceApplicationBaseAuthenticatedComponent } from './components/shared/licence-application-base-authenticated.component'; +import { LicenceFirstTimeUserSelectionComponent } from './components/shared/licence-first-time-user-selection.component'; +import { LicenceFirstTimeUserTermsOfUseComponent } from './components/shared/licence-first-time-user-terms-of-use.component'; import { LicencePaymentCancelAnonymousComponent } from './components/shared/licence-payment-cancel-anonymous.component'; import { LicencePaymentCancelComponent } from './components/shared/licence-payment-cancel.component'; import { LicencePaymentErrorAnonymousComponent } from './components/shared/licence-payment-error-anonymous.component'; @@ -39,6 +38,7 @@ import { LicencePaymentFailComponent } from './components/shared/licence-payment import { LicencePaymentSuccessAnonymousComponent } from './components/shared/licence-payment-success-anonymous.component'; import { LicencePaymentSuccessComponent } from './components/shared/licence-payment-success.component'; import { LicenceUpdateReceivedSuccessComponent } from './components/shared/licence-update-received-success.component'; +import { LicenceUserApplicationsComponent } from './components/shared/licence-user-applications.component'; import { PermitUpdateReceivedSuccessComponent } from './components/shared/permit-update-received-success.component'; import { StepWorkerLicenceUserProfileComponent } from './components/shared/worker-licence-wizard-step-components/step-worker-licence-user-profile.component'; import { PersonalLicenceApplicationRoutes } from './personal-licence-application-routes'; @@ -61,7 +61,7 @@ const routes: Routes = [ }, { path: PersonalLicenceApplicationRoutes.LICENCE_RETURN_FROM_BL_SOLE_PROPRIETOR_ANONYMOUS, - component: LicenceReturnFromBlSoleProprietorComponent, + component: WorkerLicenceReturnFromBlSoleProprietorComponent, }, { path: PersonalLicenceApplicationRoutes.WORKER_LICENCE_NEW_ANONYMOUS, @@ -79,6 +79,11 @@ const routes: Routes = [ path: PersonalLicenceApplicationRoutes.WORKER_LICENCE_UPDATE_ANONYMOUS, component: WorkerLicenceWizardAnonymousUpdateComponent, }, + { + path: '**', + redirectTo: PersonalLicenceApplicationRoutes.defaultLanding(), + pathMatch: 'full', + }, ], }, { @@ -108,6 +113,11 @@ const routes: Routes = [ path: PersonalLicenceApplicationRoutes.PERMIT_UPDATE_ANONYMOUS, component: PermitWizardAnonymousUpdateComponent, }, + { + path: '**', + redirectTo: PersonalLicenceApplicationRoutes.defaultLanding(), + pathMatch: 'full', + }, ], }, { @@ -117,6 +127,10 @@ const routes: Routes = [ path: PersonalLicenceApplicationRoutes.LICENCE_BASE, component: LicenceApplicationBaseAuthenticatedComponent, children: [ + { + path: '', + component: LicenceUserApplicationsComponent, + }, { path: PersonalLicenceApplicationRoutes.LICENCE_FIRST_TIME_USER_TERMS, component: LicenceFirstTimeUserTermsOfUseComponent, @@ -129,13 +143,9 @@ const routes: Routes = [ path: PersonalLicenceApplicationRoutes.LICENCE_LINK, component: LicenceAccessCodeAuthorizedComponent, }, - { - path: PersonalLicenceApplicationRoutes.LICENCE_USER_APPLICATIONS_AUTHENTICATED, - component: LicenceUserApplicationsComponent, - }, { path: PersonalLicenceApplicationRoutes.LICENCE_RETURN_FROM_BL_SOLE_PROPRIETOR, - component: LicenceReturnFromBlSoleProprietorComponent, + component: WorkerLicenceReturnFromBlSoleProprietorComponent, }, { path: PersonalLicenceApplicationRoutes.LICENCE_LOGIN_USER_PROFILE, @@ -199,7 +209,7 @@ const routes: Routes = [ { path: `${PersonalLicenceApplicationRoutes.PAYMENT_CANCEL}/:id`, component: LicencePaymentCancelComponent }, { path: PersonalLicenceApplicationRoutes.PAYMENT_ERROR, component: LicencePaymentErrorComponent }, { - path: '', + path: '**', redirectTo: PersonalLicenceApplicationRoutes.pathUserApplications(), pathMatch: 'full', }, @@ -223,6 +233,11 @@ const routes: Routes = [ component: LicenceUpdateReceivedSuccessComponent, }, { path: PersonalLicenceApplicationRoutes.PERMIT_UPDATE_SUCCESS, component: PermitUpdateReceivedSuccessComponent }, + { + path: '**', + redirectTo: PersonalLicenceApplicationRoutes.defaultLanding(), + pathMatch: 'full', + }, ]; @NgModule({ diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application.module.ts index 6dbc1e7e6..db476d8f1 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/personal-licence-application.module.ts @@ -45,12 +45,7 @@ import { StepWorkerLicencePersonalInformationAnonymousComponent } from './compon import { StepWorkerLicenceSummaryReviewAnonymousComponent } from './components/anonymous/worker-licence-wizard-step-components/step-worker-licence-summary-review-anonymous.component'; import { StepsWorkerLicenceIdentificationAnonymousComponent } from './components/anonymous/worker-licence-wizard-step-components/steps-worker-licence-identification-anonymous.component'; import { StepsWorkerLicenceReviewAnonymousComponent } from './components/anonymous/worker-licence-wizard-step-components/steps-worker-licence-review-anonymous.component'; -import { LicenceAccessCodeAuthorizedComponent } from './components/authenticated/licence-access-code-authorized.component'; -import { LicenceApplicationBaseAuthenticatedComponent } from './components/authenticated/licence-application-base-authenticated.component'; -import { LicenceFirstTimeUserSelectionComponent } from './components/authenticated/licence-first-time-user-selection.component'; -import { LicenceFirstTimeUserTermsOfUseComponent } from './components/authenticated/licence-first-time-user-terms-of-use.component'; -import { LicenceReturnFromBlSoleProprietorComponent } from './components/authenticated/licence-return-from-bl-sole-proprietor.component'; -import { LicenceUserApplicationsComponent } from './components/authenticated/licence-user-applications.component'; +import { WorkerLicenceReturnFromBlSoleProprietorComponent } from './components/authenticated/worker-licence-return-from-bl-sole-proprietor.component'; import { PermitWizardAuthenticatedNewComponent } from './components/authenticated/permit-wizard-authenticated-new.component'; import { PermitWizardAuthenticatedRenewalComponent } from './components/authenticated/permit-wizard-authenticated-renewal.component'; import { PermitWizardAuthenticatedUpdateComponent } from './components/authenticated/permit-wizard-authenticated-update.component'; @@ -88,7 +83,11 @@ import { CommonCriminalHistoryComponent } from './components/shared/common-step- import { CommonPhotographOfYourselfComponent } from './components/shared/common-step-components/common-photograph-of-yourself.component'; import { CommonSwlPermitTermsUpdateReplaceComponent } from './components/shared/common-step-components/common-swl-permit-terms-update-replace.component'; import { CommonSwlPermitTermsComponent } from './components/shared/common-step-components/common-swl-permit-terms.component'; +import { LicenceAccessCodeAuthorizedComponent } from './components/shared/licence-access-code-authorized.component'; import { LicenceActiveSwlPermitLicencesComponent } from './components/shared/licence-active-swl-permit-licences.component'; +import { LicenceApplicationBaseAuthenticatedComponent } from './components/shared/licence-application-base-authenticated.component'; +import { LicenceFirstTimeUserSelectionComponent } from './components/shared/licence-first-time-user-selection.component'; +import { LicenceFirstTimeUserTermsOfUseComponent } from './components/shared/licence-first-time-user-terms-of-use.component'; import { LicencePaymentCancelAnonymousComponent } from './components/shared/licence-payment-cancel-anonymous.component'; import { LicencePaymentCancelComponent } from './components/shared/licence-payment-cancel.component'; import { LicencePaymentErrorAnonymousComponent } from './components/shared/licence-payment-error-anonymous.component'; @@ -98,6 +97,7 @@ import { LicencePaymentFailComponent } from './components/shared/licence-payment import { LicencePaymentSuccessAnonymousComponent } from './components/shared/licence-payment-success-anonymous.component'; import { LicencePaymentSuccessComponent } from './components/shared/licence-payment-success.component'; import { LicenceUpdateReceivedSuccessComponent } from './components/shared/licence-update-received-success.component'; +import { LicenceUserApplicationsComponent } from './components/shared/licence-user-applications.component'; import { PermitSummaryCharacteristicsComponent } from './components/shared/permit-summary-characteristics.component'; import { PermitSummaryEmployerInformationComponent } from './components/shared/permit-summary-employer-information.component'; import { PermitSummaryPurposeComponent } from './components/shared/permit-summary-purpose.component'; @@ -159,7 +159,7 @@ import { LicenceApplicationRoutingModule } from './personal-licence-application- @NgModule({ declarations: [ - LicenceReturnFromBlSoleProprietorComponent, + WorkerLicenceReturnFromBlSoleProprietorComponent, PermitSummaryCharacteristicsComponent, PermitSummaryPurposeComponent, PermitSummaryRationaleComponent, diff --git a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/security-licence-status-verification/security-licence-status-verification-routing.module.ts b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/security-licence-status-verification/security-licence-status-verification-routing.module.ts index 90eedd30a..45b44391e 100644 --- a/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/security-licence-status-verification/security-licence-status-verification-routing.module.ts +++ b/src/Spd.Presentation.Licensing/ClientApp/src/app/modules/security-licence-status-verification/security-licence-status-verification-routing.module.ts @@ -26,7 +26,7 @@ const routes: Routes = [ ], }, { - path: '', + path: '**', redirectTo: SecurityLicenceStatusVerificationRoutes.path(), pathMatch: 'full', },