Registratie: answer-driven required document uploads
Categories stay server-owned (ADR-0001); the FE sends its answers to /uploads/categories and re-fetches reactively when they change: - Diplomabewijs required only for a handmatig diploma (DUO is verified digitally; nothing required before a diploma is chosen). - Bewijs Nederlandse taalvaardigheid required only when the applicant answers "ja" to the nl-taalvaardigheid (B2) policy question. CategoriesFor(wizardId, diplomaHerkomst, taalvaardigheid) decides; Find uses the maximal set so uploads still validate. CategoriesLoaded drops orphaned uploads when a category disappears. Also: show the foreground-only upload banner only when there is at least one category. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -448,14 +448,24 @@ export class ApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param diplomaHerkomst (optional)
|
||||
* @param taalvaardigheid (optional)
|
||||
* @return OK
|
||||
*/
|
||||
categories(wizardId: string): Promise<UploadCategoriesDto> {
|
||||
categories(wizardId: string, diplomaHerkomst?: string | undefined, taalvaardigheid?: string | undefined): Promise<UploadCategoriesDto> {
|
||||
let url_ = this.baseUrl + "/api/v1/uploads/categories?";
|
||||
if (wizardId === undefined || wizardId === null)
|
||||
throw new globalThis.Error("The parameter 'wizardId' must be defined and cannot be null.");
|
||||
else
|
||||
url_ += "wizardId=" + encodeURIComponent("" + wizardId) + "&";
|
||||
if (diplomaHerkomst === null)
|
||||
throw new globalThis.Error("The parameter 'diplomaHerkomst' cannot be null.");
|
||||
else if (diplomaHerkomst !== undefined)
|
||||
url_ += "diplomaHerkomst=" + encodeURIComponent("" + diplomaHerkomst) + "&";
|
||||
if (taalvaardigheid === null)
|
||||
throw new globalThis.Error("The parameter 'taalvaardigheid' cannot be null.");
|
||||
else if (taalvaardigheid !== undefined)
|
||||
url_ += "taalvaardigheid=" + encodeURIComponent("" + taalvaardigheid) + "&";
|
||||
url_ = url_.replace(/[?&]$/, "");
|
||||
|
||||
let options_: RequestInit = {
|
||||
|
||||
Reference in New Issue
Block a user