Skip to content
Snippets Groups Projects

Resolve "substitution planning "cancelled" checkbox does not have false as value when unchecked actively"

Files
2
@@ -65,7 +65,7 @@
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #cancelled.field="{ attrs, on }">
<v-checkbox v-bind="attrs" v-on="on" />
<v-checkbox :false-value="false" v-bind="attrs" v-on="on" />
</template>
<!-- eslint-disable-next-line vue/valid-v-slot -->
<template #comment.field="{ attrs, on }">
@@ -154,15 +154,19 @@ export default {
},
methods: {
transformCreateData(item) {
let { cancelled, ...createItem } = item;
return {
...item,
...createItem,
amends: this.selectedEvent.meta.id,
datetimeStart: this.selectedEvent.startDateTime.toUTC().toISO(),
datetimeEnd: this.selectedEvent.endDateTime.toUTC().toISO(),
// Normalize cancelled, v-checkbox returns null & does not
// honor false-value.
cancelled: cancelled ? true : false,
};
},
transformPatchData(item) {
let { id, __typename, cancelled, ...patchItem } = item;
let { __typename, cancelled, ...patchItem } = item;
return {
...patchItem,
// Normalize cancelled, v-checkbox returns null & does not
Loading