From b04c074b7dd3868fdde012600297faed9d0ba1d3 Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Tue, 12 Nov 2024 08:31:12 +0100 Subject: [PATCH] :alien: [open-formulieren/open-forms#4606] Handle API serializer renames in backend The backend makes the API serializers more uniformly English in 3.0 --- src/context.ts | 4 ++-- src/registry/file/registration-tab.tsx | 4 ++-- src/tests/sharedUtils.tsx | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/context.ts b/src/context.ts index 1401c9c4..3d42eb93 100644 --- a/src/context.ts +++ b/src/context.ts @@ -24,9 +24,9 @@ export interface SelectOption { */ export interface DocumentTypeOption { backendLabel: string; - catalogusLabel: string; + catalogueLabel: string; url: string; - omschrijving: string; + description: string; } /* diff --git a/src/registry/file/registration-tab.tsx b/src/registry/file/registration-tab.tsx index 3f9e8f8c..aae4ce37 100644 --- a/src/registry/file/registration-tab.tsx +++ b/src/registry/file/registration-tab.tsx @@ -15,11 +15,11 @@ interface DocumentTypeOptionsGroup { const groupDocumentTypeOptions = (options: DocumentTypeOption[]): DocumentTypeOptionsGroup[] => { const optionsWithGroupLabel = options.map(item => { - const groupLabel = [item.backendLabel, item.catalogusLabel].filter(Boolean).join(' > '); + const groupLabel = [item.backendLabel, item.catalogueLabel].filter(Boolean).join(' > '); return { groupLabel, value: item.url, - label: item.omschrijving, + label: item.description, }; }); diff --git a/src/tests/sharedUtils.tsx b/src/tests/sharedUtils.tsx index ce79183a..05fb07b4 100644 --- a/src/tests/sharedUtils.tsx +++ b/src/tests/sharedUtils.tsx @@ -125,28 +125,28 @@ export const DEFAULT_FILE_TYPES: SelectOption[] = [ export const DEFAULT_DOCUMENT_TYPES: DocumentTypeOption[] = [ { backendLabel: '', - catalogusLabel: 'VTH (RSIN: 000000000)', + catalogueLabel: 'VTH (RSIN: 000000000)', url: 'https://example.com/iotype/123', - omschrijving: 'Vergunning', + description: 'Vergunning', }, { backendLabel: 'Open Zaak', - catalogusLabel: 'VTH (RSIN: 000000000)', + catalogueLabel: 'VTH (RSIN: 000000000)', url: 'https://example.com/iotype/456', - omschrijving: 'Vergunning', + description: 'Vergunning', }, { backendLabel: 'Open Zaak', - catalogusLabel: 'VTH (RSIN: 000000000)', + catalogueLabel: 'VTH (RSIN: 000000000)', url: 'https://example.com/iotype/789', - omschrijving: 'Ontheffing', + description: 'Ontheffing', }, { backendLabel: 'Open Zaak', - catalogusLabel: 'Test catalogus name', + catalogueLabel: 'Test catalogus name', url: 'https://example.com/iotype/abc', - omschrijving: 'Aanvraag', + description: 'Aanvraag', }, ];