This commit is contained in:
@@ -140,13 +140,10 @@ export default {
|
|||||||
setDirty = true;
|
setDirty = true;
|
||||||
} else {
|
} 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)
|
//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) {
|
if (this.$route.params.add) {
|
||||||
//todo: REFACTOR this is a temporary abomination, new items should be standardized somewhere else in one location
|
//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;
|
const n = this.$route.params.add;
|
||||||
switch (n.type) {
|
switch (n.type) {
|
||||||
case this.$ay.ayt().WorkOrderItemScheduledUser:
|
case this.$ay.ayt().WorkOrderItemScheduledUser:
|
||||||
@@ -199,7 +196,14 @@ export default {
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user