From 27ea27971c4bebf8d819b6057a1fc82dfeeb1646 Mon Sep 17 00:00:00 2001 From: Thijn Date: Wed, 23 Oct 2024 11:45:45 +0200 Subject: [PATCH 1/6] WIP audit trail tabs --- src/views/taken/TaakDetails.vue | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/views/taken/TaakDetails.vue b/src/views/taken/TaakDetails.vue index e34e778..8cfb598 100644 --- a/src/views/taken/TaakDetails.vue +++ b/src/views/taken/TaakDetails.vue @@ -35,6 +35,43 @@ import { navigationStore, taakStore } from '../../store/store.js' {{ taakStore.taakItem.onderwerp }} + +
+ + +
+ + + + + +
+ + + +
+
+
From 2c2cc09f890b04a2a52607e2217fd386fe9736af Mon Sep 17 00:00:00 2001 From: Thijn Date: Wed, 23 Oct 2024 12:00:11 +0200 Subject: [PATCH 2/6] WIP - added taak audit trails --- src/views/taken/TaakDetails.vue | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/views/taken/TaakDetails.vue b/src/views/taken/TaakDetails.vue index 8cfb598..92645ea 100644 --- a/src/views/taken/TaakDetails.vue +++ b/src/views/taken/TaakDetails.vue @@ -94,6 +94,35 @@ export default { DotsHorizontal, TrashCanOutline, }, + data() { + return { + currentActiveTaak: null, + auditTrails: [], + } + }, + mounted() { + if (taakStore.taakItem?.id) { + this.currentActiveTaak = taakStore.taakItem + this.fetchAuditTrails(taakStore.taakItem.id) + } + }, + updated() { + if (taakStore.taakItem?.id && JSON.stringify(this.currentActiveTaak) !== JSON.stringify(taakStore.taakItem)) { + this.currentActiveTaak = taakStore.taakItem + this.fetchAuditTrails(taakStore.taakItem.id) + } + }, + methods: { + fetchAuditTrails(id) { + fetch(`/index.php/apps/zaakafhandelapp/api/taken/${id}/audit_trail`) + .then(response => response.json()) + .then(data => { + if (Array.isArray(data)) { + this.auditTrails = data + } + }) + }, + }, } From e4b456f6ff61ad7cd1273677689df2e8b3273736 Mon Sep 17 00:00:00 2001 From: Thijn Date: Wed, 23 Oct 2024 12:11:27 +0200 Subject: [PATCH 3/6] finished taak audit trail --- src/views/taken/TaakDetails.vue | 7 ++++--- src/views/taken/TakenList.vue | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/views/taken/TaakDetails.vue b/src/views/taken/TaakDetails.vue index 92645ea..04b3bb6 100644 --- a/src/views/taken/TaakDetails.vue +++ b/src/views/taken/TaakDetails.vue @@ -55,7 +55,7 @@ import { navigationStore, taakStore } from '../../store/store.js' {{ auditTrail.userName }}