Skip to content

Commit dbbd3cd

Browse files
✨ [#341] feat: allow editing omschrijving in resultaatype modal
1 parent 415f7a3 commit dbbd3cd

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

frontend/src/components/archiveform/ArchiveForm.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ export type ArchiveFormProps = {
3737

3838
/** Gets called when the form is submitted. */
3939
onSubmit: (data: {
40+
omschrijving: string;
4041
resultaattypeomschrijving: ArchiveFormData["resultaattypeomschrijving"];
4142
selectielijstklasse: ArchiveFormData["selectielijstklasse"];
4243
brondatumArchiefprocedure: BrondatumFieldValues;
4344
}) => void;
4445
};
4546

4647
export type ArchiveFormData = BrondatumFieldValues & {
48+
omschrijving: string;
4749
resultaattypeomschrijving: string;
4850
selectielijstklasse: string;
4951
};
@@ -71,6 +73,7 @@ export function ArchiveForm({
7173

7274
/** Form field values. */
7375
const [formState, setFormState] = useState<ArchiveFormData>({
76+
omschrijving: resultaatType.omschrijving,
7477
resultaattypeomschrijving:
7578
resultaatType.resultaattypeomschrijving ||
7679
resultaattypeomschrijvingOptions?.[0].value?.toString() ||
@@ -133,6 +136,12 @@ export function ArchiveForm({
133136
: [];
134137

135138
return [
139+
{
140+
label: "Omschrijving",
141+
name: "omschrijving",
142+
type: "text",
143+
value: formState?.omschrijving,
144+
},
136145
{
137146
label: "Resultaattypeomschrijving",
138147
name: "resultaattypeomschrijving",
@@ -182,6 +191,7 @@ export function ArchiveForm({
182191
validateOnChange
183192
onSubmit={(_, data) =>
184193
onSubmit({
194+
omschrijving: data.omschrijving,
185195
resultaattypeomschrijving: data.resultaattypeomschrijving,
186196
selectielijstklasse: data.selectielijstklasse,
187197
brondatumArchiefprocedure: {

frontend/src/pages/zaaktype/components/zaaktypetabs/ZaaktypeDataGridTab.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export function ZaaktypeDataGridTab({
187187
}
188188
selectielijstklasseOptions={selectielijstklasseOptions}
189189
onSubmit={({
190+
omschrijving,
190191
resultaattypeomschrijving,
191192
selectielijstklasse,
192193
brondatumArchiefprocedure,
@@ -207,6 +208,7 @@ export function ZaaktypeDataGridTab({
207208
// Resolve with provided additions.
208209
resolve({
209210
...resultaatType,
211+
omschrijving,
210212
resultaattypeomschrijving,
211213
omschrijvingGeneriek: resultaattypeomschrijvingOption.label,
212214
selectielijstklasse,

0 commit comments

Comments
 (0)