From 8e12d0a2581374712929bc22427ce57a776af7be Mon Sep 17 00:00:00 2001 From: Thijn Date: Thu, 5 Dec 2024 16:11:28 +0100 Subject: [PATCH 1/4] finished adding bericht to zaak --- package-lock.json | 3 +- src/entities/zaak/zaak.mock.ts | 1 + src/entities/zaak/zaak.ts | 3 + src/entities/zaak/zaak.types.ts | 1 + src/modals/Modals.vue | 8 +- src/modals/zaken/AddBerichtToZaak.vue | 144 ++++++++++++++++++++++++++ src/store/modules/zaken.ts | 6 +- src/views/berichten/ZaakBerichten.vue | 62 +++++------ src/views/zaken/ZaakDetails.vue | 23 ++-- 9 files changed, 201 insertions(+), 50 deletions(-) create mode 100644 src/modals/zaken/AddBerichtToZaak.vue diff --git a/package-lock.json b/package-lock.json index 91c1b3d..7ac9a80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15265,8 +15265,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", diff --git a/src/entities/zaak/zaak.mock.ts b/src/entities/zaak/zaak.mock.ts index 8e5197d..9f21229 100644 --- a/src/entities/zaak/zaak.mock.ts +++ b/src/entities/zaak/zaak.mock.ts @@ -26,6 +26,7 @@ export const mockZaakData = (): TZaak[] => [ selectielijstklasse: 'http://example.com', hoofdzaak: 'http://example.com', klant: '15551d6f-44e3-43f3-a9d2-59e583c91eb0', + berichten: [], }, ] diff --git a/src/entities/zaak/zaak.ts b/src/entities/zaak/zaak.ts index 57a1515..9bb02e5 100644 --- a/src/entities/zaak/zaak.ts +++ b/src/entities/zaak/zaak.ts @@ -26,6 +26,7 @@ export class Zaak implements TZaak { public selectielijstklasse: string public hoofdzaak: string public klant: string + public berichten: string[] constructor(source: TZaak) { this.id = source.id || '' @@ -51,6 +52,7 @@ export class Zaak implements TZaak { this.selectielijstklasse = source.selectielijstklasse || '' this.hoofdzaak = source.hoofdzaak || '' this.klant = source.klant || '' + this.berichten = source.berichten || [] } public validate(): SafeParseReturnType { @@ -78,6 +80,7 @@ export class Zaak implements TZaak { selectielijstklasse: z.string(), hoofdzaak: z.string(), klant: z.string(), + berichten: z.array(z.string()), }) return schema.safeParse(this) diff --git a/src/entities/zaak/zaak.types.ts b/src/entities/zaak/zaak.types.ts index 791fd4a..98e27f3 100644 --- a/src/entities/zaak/zaak.types.ts +++ b/src/entities/zaak/zaak.types.ts @@ -24,4 +24,5 @@ export type TZaak = { selectielijstklasse: string; hoofdzaak: string; klant: string; + berichten: string[]; } diff --git a/src/modals/Modals.vue b/src/modals/Modals.vue index 7cbe23d..d9a2f78 100644 --- a/src/modals/Modals.vue +++ b/src/modals/Modals.vue @@ -5,8 +5,12 @@ import { navigationStore } from '../store/store.js'