Fix Mijn aanvragen: instant cancel + one Concept per type (resume)
Two dashboard bugs from the just-built feature. 1. Cancel didn't reflect until a browser refresh. ApplicationsStore now OWNS the list in a writable RemoteData signal instead of projecting a resource() through fromResource; cancel removes the row synchronously (guaranteed disappear, no dependence on CD timing / HTTP cache / the reloading gap), then confirms the DELETE (rollback on failure, no resync). Adapter gains list(); applicationsResource() removed. Shared fromResource/remote-data.ts deliberately untouched. 2. Duplicate / inconsistent Concepts per type. createDraftSync.resume() now: a ?aanvraag link wins; else it resumes THIS type's existing Concept (loads its draft); else fresh. ensureId is gated behind resume so a fast typist can't create a duplicate before the lookup lands. restart()/reset() deletes the current Concept (submitted → 409, kept) so there's at most one active Concept per type. A non-Concept id can't reopen as an editable draft. Backend unchanged. Gates green: lint, vitest 128, build, check:tokens, backend dotnet 56. Wiring is not unit-covered — needs live verification (see plan). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -375,7 +375,7 @@ export class RegistratieWizardComponent {
|
||||
/** Reset the wizard to a fresh start. Reload the BRP lookup so the address
|
||||
re-prefills, keeping the form and the "vooraf ingevuld" note consistent. */
|
||||
restart() {
|
||||
this.draftSync.reset(); // detach from the old Concept; next progress creates a new one
|
||||
this.draftSync.reset(); // discard the current Concept; a fresh one starts on next progress
|
||||
this.dispatch({ tag: 'Seed', state: initial });
|
||||
this.adresRes.reload();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user