This commit is contained in:
2021-09-19 23:03:59 +00:00
parent 29f9b9862b
commit a7a6293015

View File

@@ -140,13 +140,10 @@ export default {
setDirty = true;
} else {
//sometimes we're here with some data to fill in (e.g. schedule creates new wo itemscheduled user, if so there will be a add property on the params)
console.log(
"svc-workorder::created new, no obj, params are:",
this.$route.params
);
if (this.$route.params.add) {
//todo: REFACTOR this is a temporary abomination, new items should be standardized somewhere else in one location
//ideally a central place for creating new workorder related objects
const n = this.$route.params.add;
switch (n.type) {
case this.$ay.ayt().WorkOrderItemScheduledUser:
@@ -199,7 +196,14 @@ export default {
break;
default:
console.log("UNKNOWN TYPE", n.type);
if (window.$gz.dev) {
throw new Error(
`svc-workorder:created - new from Add - type '${n.type}' not recognized`
);
}
console.error(
`svc-workorder:created - new from Add - type '${n.type}' not recognized`
);
break;
}
}