Fix login output name collision and herregistratie demo eligibility
Walking through the running app surfaced two issues: - login-form's `submit` output collided with the native DOM `submit` event bubbling to <app-login-form>, so login() also fired with an Event (not the BSN string) — "bsn.trim is not a function". Renamed the output to `submitted` (matching the other forms). - The static mock herregistratie deadline (2027-09-01) sat outside the 12-month eligibility window, so the wizard was correctly hidden. Moved it to 2027-03-01 so "verloopt binnenkort" is true and the flow is demoable. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,5 +4,5 @@
|
|||||||
"beroep": "Arts",
|
"beroep": "Arts",
|
||||||
"registratiedatum": "2012-09-01",
|
"registratiedatum": "2012-09-01",
|
||||||
"geboortedatum": "1985-03-14",
|
"geboortedatum": "1985-03-14",
|
||||||
"status": { "tag": "Geregistreerd", "herregistratieDatum": "2027-09-01" }
|
"status": { "tag": "Geregistreerd", "herregistratieDatum": "2027-03-01" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import { ButtonComponent } from '@shared/ui/button/button.component';
|
|||||||
selector: 'app-login-form',
|
selector: 'app-login-form',
|
||||||
imports: [FormsModule, FormFieldComponent, TextInputComponent, ButtonComponent],
|
imports: [FormsModule, FormFieldComponent, TextInputComponent, ButtonComponent],
|
||||||
template: `
|
template: `
|
||||||
<form (ngSubmit)="submit.emit(bsn)">
|
<form (ngSubmit)="submitted.emit(bsn)">
|
||||||
<app-form-field label="BSN" fieldId="bsn" description="9 cijfers (demo: vul iets in)">
|
<app-form-field label="BSN" fieldId="bsn" description="9 cijfers (demo: vul iets in)">
|
||||||
<app-text-input inputId="bsn" [(ngModel)]="bsn" name="bsn" placeholder="123456789" />
|
<app-text-input inputId="bsn" [(ngModel)]="bsn" name="bsn" placeholder="123456789" />
|
||||||
</app-form-field>
|
</app-form-field>
|
||||||
@@ -27,5 +27,5 @@ import { ButtonComponent } from '@shared/ui/button/button.component';
|
|||||||
export class LoginFormComponent {
|
export class LoginFormComponent {
|
||||||
bsn = '';
|
bsn = '';
|
||||||
password = '';
|
password = '';
|
||||||
submit = output<string>();
|
submitted = output<string>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { SessionStore } from '@auth/application/session.store';
|
|||||||
<app-page-shell heading="Inloggen" width="narrow"
|
<app-page-shell heading="Inloggen" width="narrow"
|
||||||
intro="Log in op uw persoonlijke BIG-register omgeving.">
|
intro="Log in op uw persoonlijke BIG-register omgeving.">
|
||||||
@if (error()) { <app-alert type="error">{{ error() }}</app-alert> }
|
@if (error()) { <app-alert type="error">{{ error() }}</app-alert> }
|
||||||
<app-login-form (submit)="login($event)" />
|
<app-login-form (submitted)="login($event)" />
|
||||||
</app-page-shell>
|
</app-page-shell>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user