Skip to content

Commit 3884472

Browse files
👌 [#180] fix: remove broncatalogus and bronzaaktype instead of initializing with empty values when copying zaaktype
1 parent c29f4ed commit 3884472

File tree

1 file changed

+3
-35
lines changed

1 file changed

+3
-35
lines changed

frontend/src/pages/zaaktype/zaaktype.action.ts

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -132,41 +132,9 @@ export async function saveAsAction(actionFunctionArgs: ActionFunctionArgs) {
132132
const payload = data.payload as PublishZaaktypeVersionPayload;
133133
const uuid = getZaaktypeUUID(payload.zaaktype);
134134

135-
const zaaktype = {
136-
...payload.zaaktype,
137-
broncatalogus: payload.zaaktype.broncatalogus ?? {
138-
domein: "",
139-
rsin: "",
140-
url: "",
141-
contactpersoonBeheerTelefoonnummer: null,
142-
contactpersoonBeheerEmailadres: null,
143-
zaaktypen: null,
144-
besluittypen: null,
145-
informatieobjecttypen: null,
146-
naam: null,
147-
versie: null,
148-
begindatumVersie: null,
149-
},
150-
bronzaaktype: payload.zaaktype.bronzaaktype ?? {
151-
_expand: {},
152-
omschrijving: "",
153-
identificatie: "",
154-
omschrijvingGeneriek: null,
155-
toelichting: null,
156-
servicenorm: null,
157-
verlengingstermijn: null,
158-
trefwoorden: null,
159-
publicatietekst: null,
160-
verantwoordingsrelatie: null,
161-
selectielijstProcestype: null,
162-
broncatalogus: null,
163-
bronzaaktype: null,
164-
eindeGeldigheid: null,
165-
deelzaaktypen: null,
166-
},
167-
};
168-
169-
console.log(zaaktype);
135+
const zaaktype = payload.zaaktype;
136+
delete zaaktype.broncatalogus;
137+
delete zaaktype.bronzaaktype;
170138

171139
try {
172140
await _saveZaaktypeVersion(zaaktype as TargetType, payload.serviceSlug);

0 commit comments

Comments
 (0)