Skip to content

Commit

Permalink
Merge pull request #91 from ConductionNL/feature/PC108-88/zaak-afhand…
Browse files Browse the repository at this point in the history
…el-termijn

added deadline to zaak and show in zaak list
  • Loading branch information
RalkeyOfficial authored Dec 12, 2024
2 parents 5901d55 + 2469531 commit 7313caf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
25 changes: 12 additions & 13 deletions src/modals/zaken/ZaakForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ import { navigationStore, zaakStore, zaakTypeStore } from '../../store/store.js'
input-label="Archiefstatus"
:disabled="zaakLoading"
required />
<div>
<p>Uiterlijke Einddatum Afdoening</p>
<NcDateTimePicker
v-model="zaak.uiterlijkeEinddatumAfdoening"
:disabled="zaakLoading"
required />
</div>
<NcTextField :disabled="zaakLoading"
label="Registratiedatum"
maxlength="255"
Expand Down Expand Up @@ -90,6 +97,7 @@ import {
NcSelect,
NcTextArea,
NcLoadingIcon,
NcDateTimePicker,
} from '@nextcloud/vue'
// icons
Expand All @@ -107,6 +115,7 @@ export default {
NcButton,
NcSelect,
NcTextArea,
NcDateTimePicker,
},
props: {
dashboardWidget: {
Expand Down Expand Up @@ -136,6 +145,7 @@ export default {
verantwoordelijkeOrganisatie: '',
startdatum: '',
archiefstatus: '',
uiterlijkeEinddatumAfdoening: null,
},
loading: false,
success: null,
Expand Down Expand Up @@ -174,26 +184,14 @@ export default {
this.zaak = {
...this.zaak,
...zaakStore.zaakItem,
uiterlijkeEinddatumAfdoening: zaakStore.zaakItem.uiterlijkeEinddatumAfdoening ? new Date(zaakStore.zaakItem.uiterlijkeEinddatumAfdoening) : null,
}
}
},
methods: {
closeModal() {
navigationStore.setModal(null)
this?.dashboardWidget && this.$emit('close')
this.success = null
this.loading = false
this.zaak = {
identificatie: '',
omschrijving: '',
zaaktype: {},
registratiedatum: '',
toelichting: '',
bronorganisatie: '',
verantwoordelijkeOrganisatie: '',
startdatum: '',
archiefstatus: '',
}
},
fetchZaakType() {
this.zaakTypeLoading = true
Expand Down Expand Up @@ -239,6 +237,7 @@ export default {
...this.zaak,
archiefstatus: this.archiefstatus.value?.id || '',
zaaktype: this.zaakType.value?.id || '',
uiterlijkeEinddatumAfdoening: this.zaak.uiterlijkeEinddatumAfdoening ? new Date(this.zaak.uiterlijkeEinddatumAfdoening).toISOString() : null,
klant: this.klantId,
})
Expand Down
2 changes: 1 addition & 1 deletion src/views/zaken/ZakenList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import { navigationStore, zaakStore } from '../../store/store.js'
:force-display-actions="true"
:active="zaakStore.zaakItem?.id === zaak?.id"
:details="'1h'"
:counter-number="44"
:counter-number="zaak.uiterlijkeEinddatumAfdoening ? `${Math.ceil((new Date(zaak.uiterlijkeEinddatumAfdoening) - new Date()) / (1000 * 60 * 60 * 24))} dagen` : 'no deadline'"
@click="zaakStore.setZaakItem(zaak)">
<template #icon>
<BriefcaseAccountOutline :class="zaakStore.zaakItem?.id === zaak?.id && 'selectedZaakIcon'"
Expand Down

0 comments on commit 7313caf

Please sign in to comment.