This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
export default {
|
||||
async created() {
|
||||
await window.$gz.enums.fetchEnumList("DaysOfWeek");
|
||||
this.daysOfWeek = window.$gz.enums.getSelectionList("DaysOfWeek");
|
||||
await window.$gz.enums.fetchEnumList("AyaDaysOfWeek");
|
||||
this.daysOfWeek = window.$gz.enums.getSelectionList("AyaDaysOfWeek");
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -266,7 +266,6 @@ export default {
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
items: [],
|
||||
states: [],
|
||||
isDirty: true,
|
||||
isLockedAtServer: false,
|
||||
alertViz: null
|
||||
@@ -800,7 +799,7 @@ async function saveHeader(vm) {
|
||||
//the purpose of this is to remove the child collections so only the header itself is submitted
|
||||
//this was the cleanest way I could find to accomplish this
|
||||
//https://stackoverflow.com/a/58206483/8939
|
||||
const { items: removedKey1, states: removedKey2, ...headerOnly } = vm.obj;
|
||||
const { items: removedKey1, ...headerOnly } = vm.obj;
|
||||
|
||||
//remove *Viz keys so they don't generate traffic
|
||||
headerOnly.alertViz = undefined;
|
||||
@@ -829,7 +828,7 @@ async function saveHeader(vm) {
|
||||
vm.obj.id = res.data.id;
|
||||
vm.obj.serial = res.data.serial;
|
||||
//walk all unsaved direct children and set the id so they can save
|
||||
vm.obj.states.forEach(z => (z.pmId = vm.obj.id));
|
||||
|
||||
vm.obj.items.forEach(z => (z.pmId = vm.obj.id));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user