Skip to content

Commit

Permalink
Updated widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Oct 23, 2024
1 parent 4d19ee3 commit c84628b
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 96 deletions.
4 changes: 2 additions & 2 deletions src/views/taken/TakenList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import { navigationStore, taakStore } from '../../store/store.js'
</NcActions>
</div>
<div v-if="taakStore.takenList">
<NcListItem v-for="(taak, i) in taakStore.takenList.results"
<NcListItem v-for="(taak, i) in taakStore.takenList"
:key="`${taak}${i}`"
:name="taak?.title"
:force-display-actions="true"
:active="taakStore.taakItem?.id === taak?.id"
:details="'1h'"
:counter-number="44"
@click="navigationStore.setTaakItem(taak)">
@click="taakStore.setTaakItem(taak)">
<template #icon>
<CalendarMonthOutline :class="taakStore.taakItem?.id === taak.id && 'selectedZaakIcon'"
disable-menu
Expand Down
83 changes: 20 additions & 63 deletions src/views/widgets/OpenZakenWidget.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup>
import { zaakStore } from '../../store/store.js'
</script>

<template>
<div class="openZakenContainer">
<div class="itemContainer">
Expand Down Expand Up @@ -41,69 +45,7 @@ export default {
data() {
return {
loading: false,
zaakItems: [
{
id: '1',
mainText: 'Klant kan niet meer inloggen',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '2',
mainText: 'Klant heeft meerdere meldingen gemaakt',
subText: 'Informatie verzoek',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '3',
mainText: 'Geluidsoverlast',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '4',
mainText: 'Klant kan niet meer inloggen',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '5',
mainText: 'Klant heeft meerdere meldingen gemaakt',
subText: 'Informatie verzoek',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '6',
mainText: 'Geluidsoverlast',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '7',
mainText: 'Klant kan niet meer inloggen',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '8',
mainText: 'Klant heeft meerdere meldingen gemaakt',
subText: 'Informatie verzoek',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '9',
mainText: 'Geluidsoverlast',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
],
zaakItems: [],
}
},
Expand All @@ -114,9 +56,24 @@ export default {
},
mounted() {
this.fetchZaakItems()
},
methods: {
fetchZaakItems() {
this.loading = true
zaakStore.refreshZakenList()
.then(() => {
this.zaakItems = zaakStore.zakenList.map(zaak => ({
id: zaak.id,
mainText: zaak.identificatie,
subText: zaak.zaaktype,
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
}))
this.loading = false
})
},
onShow() {
window.open('/apps/opencatalogi/catalogi', '_self')
},
Expand Down
30 changes: 21 additions & 9 deletions src/views/widgets/TakenWidget.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup>
import { taakStore } from '../../store/store.js'
</script>

<template>
<div class="takenContainer">
<div class="itemContainer">
Expand Down Expand Up @@ -42,27 +46,35 @@ export default {
data() {
return {
loading: false,
zaakItems: [
{
id: '1',
mainText: 'Terugbel verzoek brandkraan',
subText: 'brandkraan staat schuin',
avatarUrl: '/apps-extra/zaakafhandelapp/img/calendar-month-outline.svg',
},
],
taakItems: [],
}
},
computed: {
items() {
return this.zaakItems
return this.taakItems
},
},
mounted() {
this.fetchTaakItems()
},
methods: {
fetchTaakItems() {
this.loading = true
taakStore.refreshTakenList()
.then(() => {
this.taakItems = taakStore.takenList.map(taak => ({
id: taak.id,
mainText: taak.title,
subText: taak.type,
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
}))
this.loading = false
})
},
onShow() {
window.open('/apps/opencatalogi/catalogi', '_self')
},
Expand Down
42 changes: 20 additions & 22 deletions src/views/widgets/ZakenWidget.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup>
import { zaakStore } from '../../store/store.js'
</script>

<template>
<div class="zakenContainer">
<div class="itemContainer">
Expand Down Expand Up @@ -44,28 +48,7 @@ export default {
data() {
return {
loading: false,
zaakItems: [
{
id: '1',
mainText: 'Klant kan niet meer inloggen',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '2',
mainText: 'Klant heeft meerdere meldingen gemaakt',
subText: 'Informatie verzoek',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
{
id: '3',
mainText: 'Geluidsoverlast',
subText: 'Klacht',
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
},
],
zaakItems: [],
}
},
Expand All @@ -76,9 +59,24 @@ export default {
},
mounted() {
this.fetchZaakItems()
},
methods: {
fetchZaakItems() {
this.loading = true
zaakStore.refreshZakenList()
.then(() => {
this.zaakItems = zaakStore.zakenList.map(zaak => ({
id: zaak.id,
mainText: zaak.identificatie,
subText: zaak.zaaktype,
avatarUrl: '/apps-extra/zaakafhandelapp/img/briefcase-account-outline.svg',
}))
this.loading = false
})
},
onShow() {
window.open('/apps/opencatalogi/catalogi', '_self')
},
Expand Down

0 comments on commit c84628b

Please sign in to comment.