case 4237
This commit is contained in:
@@ -1207,6 +1207,19 @@ async function clickHandler(menuItem) {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "newwo":
|
||||
m.vm.$router.push({
|
||||
name: "workorder-edit",
|
||||
params: {
|
||||
recordid: 0,
|
||||
customerId: m.vm.obj.customerId,
|
||||
add: {
|
||||
type: m.vm.$ay.ayt().WorkOrderItemUnit,
|
||||
unitId: m.vm.obj.id
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
@@ -1293,6 +1306,18 @@ function generateMenu(vm) {
|
||||
|
||||
menuOptions.menuItems.push({ divider: true, inset: false });
|
||||
|
||||
if (
|
||||
vm.$route.params.recordid != 0 &&
|
||||
vm.obj.customerId != 0 &&
|
||||
window.$gz.role.canChange(window.$gz.type.WorkOrder)
|
||||
) {
|
||||
menuOptions.menuItems.push({
|
||||
title: "NewWorkOrder",
|
||||
icon: "$ayiTools",
|
||||
key: FORM_KEY + ":newwo",
|
||||
vm: vm
|
||||
});
|
||||
}
|
||||
menuOptions.menuItems.push({
|
||||
title: "UnitModels",
|
||||
icon: "$ayiDiceD20",
|
||||
|
||||
Reference in New Issue
Block a user