feat(self-service): resume an existing registration after refresh (refs #111)

Frontend half of S-26. registration-page asks the BFF for the caller's current open
registration on init (regenerated api-client → getSelfServiceRegistrations) and
restores the submitted view — reference + the documenten/withdraw actions — instead
of dropping back to the blank form after a refresh; 204 (none) shows the form as
before. Component test covers resume-on-load; a Playwright e2e submits, reloads, and
asserts the reference + actions persist.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-07-22 17:33:28 +02:00
co-authored by Claude Opus 4.8
parent 24927b1e80
commit c25ec24c73
4 changed files with 108 additions and 3 deletions
@@ -24,6 +24,11 @@ import {
Observable
} from 'rxjs';
export interface CurrentRegistration {
registrationId: string;
status: string;
}
export interface DecideRequest {
besluit: string;
}
@@ -200,6 +205,37 @@ export class BffApiV1Service {
);
}
getSelfServiceRegistrations<TData = CurrentRegistration | void>( options?: HttpClientBodyOptions): Observable<TData>;
getSelfServiceRegistrations<TData = CurrentRegistration | void>( options?: HttpClientEventOptions): Observable<HttpEvent<TData>>;
getSelfServiceRegistrations<TData = CurrentRegistration | void>( options?: HttpClientResponseOptions): Observable<AngularHttpResponse<TData>>;
getSelfServiceRegistrations<TData = CurrentRegistration | void>(
options?: HttpClientObserveOptions): Observable<TData | HttpEvent<TData> | AngularHttpResponse<TData>> {
if (options?.observe === 'events') {
return this.http.get<TData>(
`/self-service/registrations`,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'events',
}
);
}
if (options?.observe === 'response') {
return this.http.get<TData>(
`/self-service/registrations`,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'response',
}
);
}
return this.http.get<TData>(
`/self-service/registrations`,{
...(options as Omit<NonNullable<typeof options>, 'observe'>),
observe: 'body',
}
);
}
postSelfServiceRegistrationsIdWithdraw<TData = void>(id: string, options?: HttpClientBodyOptions): Observable<TData>;
postSelfServiceRegistrationsIdWithdraw<TData = void>(id: string, options?: HttpClientEventOptions): Observable<HttpEvent<TData>>;
postSelfServiceRegistrationsIdWithdraw<TData = void>(id: string, options?: HttpClientResponseOptions): Observable<AngularHttpResponse<TData>>;