Skip to content

Commit

Permalink
finished taak type
Browse files Browse the repository at this point in the history
  • Loading branch information
RalkeyOfficial committed Dec 18, 2024
1 parent 6436d3b commit 0d8e17c
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/modals/taken/EditTaak.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ import { taakStore, navigationStore, klantStore, medewerkerStore, contactMomentS
label="Titel"
maxlength="255" />

<NcTextField
:disabled="loading"
:value.sync="taakItem.type"
label="Type"
maxlength="255" />
<NcSelect v-bind="taakType"
v-model="taakType.value"
input-label="Type"
:clearable="false"
:loading="klantenLoading"
:disabled="loading" />

<div>
<p>Deadline</p>
Expand Down Expand Up @@ -338,6 +339,12 @@ export default {
},
],
},
taakType: {
options: [
{ id: 'terugbel', label: 'Terugbel verzoek' },
],
value: { id: 'terugbel', label: 'Terugbel verzoek' },
},
viewContactMomentIsView: false,
viewContactMomentId: null,
isContactMomentFormOpen: false,
Expand Down Expand Up @@ -388,6 +395,8 @@ export default {
if (this.clientType === 'both') {
this.useMedewerkerInsteadOfKlant = !!taakEntity?.medewerker
}
this.taakType.value = this.taakType.options.find(type => type.id === taakEntity.type || 'terugbel')
}
if (this.clientType !== 'medewerker') this.fetchKlanten(taakEntity?.klant) // will either pass a id or undefined
Expand Down Expand Up @@ -538,6 +547,7 @@ export default {
taakStore.saveTaak({
...this.taakItem,
type: this.taakType.value.id,
klant: klantId || null,
medewerker: medewerkerId || null,
status: this.taakItem.status === 'gesloten' ? 'gesloten' : 'open',
Expand Down

0 comments on commit 0d8e17c

Please sign in to comment.