-
-
+
-
- Bewerken
+
+
+
+
+ Bekijken
+
- Verwijderen
+
+
+
+ Verwijderen van zaak
-
+
Geen rollen gevonden.
-
rol.zaak === this.zaakId)
+ },
+ },
watch: {
zaakId(newVal) {
- this.fetchData(newVal)
+ this.fetchData()
},
},
mounted() {
- this.fetchData(this.zaakId)
+ this.fetchData()
},
methods: {
editRol(rol) {
rolStore.setRolItem(rol)
navigationStore.setModal('editRol')
},
- fetchData(zaakId) {
+ fetchData() {
this.loading = true
- fetch(
- `/index.php/apps/zaakafhandelapp/api/zrc/rollen?zaak.id=${zaakId}`,
- {
- method: 'GET',
- },
- )
- .then((response) => {
- response.json().then((data) => {
- this.rollenList = data.results
- })
- this.loading = false
- })
- .catch((err) => {
- console.error(err)
+
+ rolStore.refreshRollenList()
+ .finally(() => {
this.loading = false
})
},
toggleRol(rol) {
- // TODO: toggle rol
+ if (rolStore.rolItem?.id === rol.id) {
+ rolStore.setRolItem(null)
+ } else {
+ rolStore.setRolItem(rol)
+ }
},
clearText() {
this.search = ''
diff --git a/src/views/zaken/ZaakDetails.vue b/src/views/zaken/ZaakDetails.vue
index 50fc0c0..48703ca 100644
--- a/src/views/zaken/ZaakDetails.vue
+++ b/src/views/zaken/ZaakDetails.vue
@@ -28,7 +28,7 @@ import { navigationStore, zaakStore } from '../../store/store.js'
Document toevoegen
-
+