Skip to content

Commit

Permalink
WIP - added taak audit trails
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudo-Thijn committed Oct 23, 2024
1 parent 27ea279 commit 2c2cc09
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/views/taken/TaakDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})
},
},
}
</script>
Expand Down

0 comments on commit 2c2cc09

Please sign in to comment.