Skip to content

Commit 4cbeeb2

Browse files
[SPDBT-4188] swl auth renewal with missing isCanadianCitizen flag (#2713)
# Description This PR includes the following proposed change(s): - [SPDBT-4188] swl auth renewal with missing isCanadianCitizen flag. Revert the change which removed this code.
1 parent c956b5a commit 4cbeeb2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Spd.Presentation.Licensing/ClientApp/src/app/modules/personal-licence-application/components/authenticated/worker-licence-wizard-authenticated-renewal.component.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { StepsWorkerLicenceReviewAuthenticatedComponent } from './worker-licence
6969
<app-steps-worker-licence-identification-authenticated
7070
[isFormValid]="isFormValid"
7171
[applicationTypeCode]="applicationTypeCode"
72-
[showFullCitizenshipQuestion]="false"
72+
[showFullCitizenshipQuestion]="showFullCitizenshipQuestion"
7373
[showNonCanadianCitizenshipQuestion]="showNonCanadianCitizenshipQuestion"
7474
[showSaveAndExit]="false"
7575
(childNextStep)="onChildNextStep()"
@@ -86,7 +86,7 @@ import { StepsWorkerLicenceReviewAuthenticatedComponent } from './worker-licence
8686
>
8787
<app-steps-worker-licence-review-authenticated
8888
[applicationTypeCode]="applicationTypeCode"
89-
[showCitizenshipStep]="showNonCanadianCitizenshipQuestion"
89+
[showCitizenshipStep]="showFullCitizenshipQuestion || showNonCanadianCitizenshipQuestion"
9090
[isSoleProprietorSimultaneousFlow]="isSoleProprietorSimultaneousFlow"
9191
(previousStepperStep)="onPreviousStepperStep(stepper)"
9292
(nextSubmitStep)="onNextSoleProprietor()"
@@ -157,6 +157,7 @@ export class WorkerLicenceWizardAuthenticatedRenewalComponent extends BaseWizard
157157
applicationTypeCode!: ApplicationTypeCode;
158158
isFormValid = false;
159159
showStepDogsAndRestraints = false;
160+
showFullCitizenshipQuestion = false;
160161
showNonCanadianCitizenshipQuestion = false;
161162
showWorkerLicenceSoleProprietorStep = false;
162163
isSoleProprietor = false;
@@ -186,8 +187,11 @@ export class WorkerLicenceWizardAuthenticatedRenewalComponent extends BaseWizard
186187
.pipe(distinctUntilChanged())
187188
.subscribe(() => this.breakpointChanged());
188189

189-
// If not Canadian, ask for proof of ability to work.
190+
// In converted data, 'isCanadianCitizen' may be null so we need to handle that.
191+
// Renew will show full 'Is Canadian Citizen' question if this value is missing,
192+
// otherwise if not Canadian, ask for proof of ability to work.
190193
const citizenshipData = this.workerApplicationService.workerModelFormGroup.get('citizenshipData')?.value;
194+
this.showFullCitizenshipQuestion = citizenshipData.showFullCitizenshipQuestion;
191195
this.showNonCanadianCitizenshipQuestion = citizenshipData.showNonCanadianCitizenshipQuestion;
192196

193197
this.licenceModelChangedSubscription = this.workerApplicationService.workerModelValueChanges$.subscribe(

0 commit comments

Comments
 (0)