case 1690
This commit is contained in:
@@ -69,11 +69,6 @@ function initNavPanel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//WORKORDERS subitem
|
//WORKORDERS subitem
|
||||||
console.log(
|
|
||||||
"Can open workorder role:",
|
|
||||||
window.$gz.role.canOpen(window.$gz.type.WorkOrder)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (window.$gz.store.state.customerRights.wo == true) {
|
if (window.$gz.store.state.customerRights.wo == true) {
|
||||||
sub.push({
|
sub.push({
|
||||||
title: "WorkOrderList",
|
title: "WorkOrderList",
|
||||||
|
|||||||
@@ -401,7 +401,25 @@ export default {
|
|||||||
showAddUnitDialog: function() {
|
showAddUnitDialog: function() {
|
||||||
this.addUnitDialog = true;
|
this.addUnitDialog = true;
|
||||||
},
|
},
|
||||||
addUnit: function() {},
|
async addUnit() {
|
||||||
|
const vm = this;
|
||||||
|
try {
|
||||||
|
const res = await window.$gz.api.upsert(
|
||||||
|
"unit/customerunit/",
|
||||||
|
vm.unitObj
|
||||||
|
);
|
||||||
|
if (res.error) {
|
||||||
|
window.$gz.errorHandler.handleFormError(res.error); //no vm passed here so that it displays as a dialog rather than in the form
|
||||||
|
} else {
|
||||||
|
if (res.data.id) {
|
||||||
|
//SUCCESS
|
||||||
|
this.addUnitDialog = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
window.$gz.errorHandler.handleFormError(ex); //no vm passed here so that it displays as a dialog rather than in the form
|
||||||
|
}
|
||||||
|
},
|
||||||
unitListVariant: function() {
|
unitListVariant: function() {
|
||||||
return `customerid: ${this.obj.customerId}`;
|
return `customerid: ${this.obj.customerId}`;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user