case 4237

This commit is contained in:
2022-11-09 23:22:54 +00:00
parent 6a997ffc48
commit 5e3a5f952b
3 changed files with 107 additions and 3 deletions

View File

@@ -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",