From e21aabb7da9e1993c51723615919cc63cbd6590e Mon Sep 17 00:00:00 2001 From: Thijn Date: Fri, 6 Dec 2024 16:17:20 +0100 Subject: [PATCH 1/7] finished adding rol to zaak --- src/entities/rol/rol.types.ts | 2 +- src/modals/Modals.vue | 3 + src/modals/zaken/AddRolToZaak.vue | 149 ++++++++++++++++++++++++++++++ src/views/rollen/ZaakRollen.vue | 61 ++++++------ src/views/zaken/ZaakDetails.vue | 2 +- 5 files changed, 189 insertions(+), 28 deletions(-) create mode 100644 src/modals/zaken/AddRolToZaak.vue diff --git a/src/entities/rol/rol.types.ts b/src/entities/rol/rol.types.ts index e0fbff9..c1b7920 100644 --- a/src/entities/rol/rol.types.ts +++ b/src/entities/rol/rol.types.ts @@ -4,7 +4,7 @@ export type TRol = { omschrijving: string; omschrijvingGeneriek: string; url: string; - zaak: string; + zaak: string; // zaak id betrokkene: string; betrokkeneType: string; afwijkendeNaamBetrokkene: string; diff --git a/src/modals/Modals.vue b/src/modals/Modals.vue index f83fda0..b7c4943 100644 --- a/src/modals/Modals.vue +++ b/src/modals/Modals.vue @@ -11,6 +11,7 @@ import { navigationStore } from '../store/store.js' + @@ -43,6 +44,7 @@ import DeleteContactMoment from './contactMomenten/DeleteContactMoment.vue' import EditMedewerker from './medewerkers/EditMedewerker.vue' import AddBerichtToZaak from './zaken/AddBerichtToZaak.vue' import AddTaakToZaak from './zaken/AddTaakToZaak.vue' +import AddRolToZaak from './zaken/AddRolToZaak.vue' export default { name: 'Modals', @@ -63,6 +65,7 @@ export default { EditMedewerker, AddBerichtToZaak, AddTaakToZaak, + AddRolToZaak, }, } diff --git a/src/modals/zaken/AddRolToZaak.vue b/src/modals/zaken/AddRolToZaak.vue new file mode 100644 index 0000000..b62c9e7 --- /dev/null +++ b/src/modals/zaken/AddRolToZaak.vue @@ -0,0 +1,149 @@ + + + + + + + diff --git a/src/views/rollen/ZaakRollen.vue b/src/views/rollen/ZaakRollen.vue index fc400fe..1807174 100644 --- a/src/views/rollen/ZaakRollen.vue +++ b/src/views/rollen/ZaakRollen.vue @@ -4,8 +4,8 @@ import { navigationStore, rolStore } from '../../store/store.js' Document toevoegen - + From 8b1b1354162c2ea01d5eea4eaa78fe4092abc184 Mon Sep 17 00:00:00 2001 From: Thijn Date: Tue, 10 Dec 2024 16:48:36 +0100 Subject: [PATCH 2/7] added more fields to medewerker --- src/entities/medewerkers/medewerkers.mock.ts | 1 + src/entities/medewerkers/medewerkers.ts | 4 +- src/entities/medewerkers/medewerkers.types.ts | 1 + src/modals/medewerkers/EditMedewerker.vue | 43 +++++-------------- 4 files changed, 15 insertions(+), 34 deletions(-) diff --git a/src/entities/medewerkers/medewerkers.mock.ts b/src/entities/medewerkers/medewerkers.mock.ts index 5fd76c5..6c45360 100644 --- a/src/entities/medewerkers/medewerkers.mock.ts +++ b/src/entities/medewerkers/medewerkers.mock.ts @@ -8,6 +8,7 @@ export const mockMedewerkerData = (): TMedewerker[] => [ tussenvoegsel: 'de', achternaam: 'Doe', email: 'john.doe@example.com', + telefoonnummer: '0612345678', }, ] diff --git a/src/entities/medewerkers/medewerkers.ts b/src/entities/medewerkers/medewerkers.ts index 0f5eb9f..302c6aa 100644 --- a/src/entities/medewerkers/medewerkers.ts +++ b/src/entities/medewerkers/medewerkers.ts @@ -8,6 +8,7 @@ export class Medewerker implements TMedewerker { public tussenvoegsel: string public achternaam: string public email: string + public telefoonnummer: string constructor(source: TMedewerker) { this.id = source.id || '' @@ -15,7 +16,7 @@ export class Medewerker implements TMedewerker { this.tussenvoegsel = source.tussenvoegsel || '' this.achternaam = source.achternaam || '' this.email = source.email || '' - + this.telefoonnummer = source.telefoonnummer || '' } public validate(): SafeParseReturnType { @@ -25,6 +26,7 @@ export class Medewerker implements TMedewerker { tussenvoegsel: z.string(), achternaam: z.string(), email: z.string().email(), + telefoonnummer: z.string().min(1), }) return schema.safeParse(this) diff --git a/src/entities/medewerkers/medewerkers.types.ts b/src/entities/medewerkers/medewerkers.types.ts index 7a50331..3face2b 100644 --- a/src/entities/medewerkers/medewerkers.types.ts +++ b/src/entities/medewerkers/medewerkers.types.ts @@ -4,4 +4,5 @@ export type TMedewerker = { tussenvoegsel: string; achternaam: string; email: string; + telefoonnummer: string; } diff --git a/src/modals/medewerkers/EditMedewerker.vue b/src/modals/medewerkers/EditMedewerker.vue index a9db1da..563f726 100644 --- a/src/modals/medewerkers/EditMedewerker.vue +++ b/src/modals/medewerkers/EditMedewerker.vue @@ -3,8 +3,7 @@ import { medewerkerStore, navigationStore } from '../../store/store.js' Ververs - + @@ -46,7 +46,7 @@ import { navigationStore, contactMomentStore, klantStore } from '../../store/sto {{ new Date(contactMoment.startDate).toLocaleString() }} Zaak starten + + + Sluit Contactmoment + Date: Wed, 11 Dec 2024 15:10:23 +0100 Subject: [PATCH 6/7] show days until end of task --- src/modals/taken/EditTaak.vue | 2 +- src/views/taken/TakenList.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modals/taken/EditTaak.vue b/src/modals/taken/EditTaak.vue index bc0df2d..96858b0 100644 --- a/src/modals/taken/EditTaak.vue +++ b/src/modals/taken/EditTaak.vue @@ -437,7 +437,7 @@ export default { medewerker: medewerkerId || null, status: this.taakItem.status === 'gesloten' ? 'gesloten' : 'open', deadline: this.taakItem.deadline ? this.taakItem.deadline.toISOString() : null, - }, { doNotRefresh: true }) + }) .then(({ response }) => { this.success = response.ok setTimeout(this.closeModal, 2000) diff --git a/src/views/taken/TakenList.vue b/src/views/taken/TakenList.vue index 3d48e61..d6ff3e7 100644 --- a/src/views/taken/TakenList.vue +++ b/src/views/taken/TakenList.vue @@ -37,7 +37,7 @@ import { navigationStore, taakStore } from '../../store/store.js' :force-display-actions="true" :active="taakStore.taakItem?.id === taak?.id" :details="taak.status" - :counter-number="taak.deadline ? new Date(taak.deadline).toLocaleDateString() : 'no deadline'" + :counter-number="taak.deadline ? `${Math.ceil((new Date(taak.deadline) - new Date()) / (1000 * 60 * 60 * 24))} dagen` : 'no deadline'" @click="taakStore.setTaakItem(taak)">