This commit is contained in:
2021-04-29 19:05:27 +00:00
parent aa147212f4
commit 27b5416d4e
2 changed files with 20 additions and 2 deletions

View File

@@ -302,8 +302,6 @@ todo: cypress testing for load testing etc
install standalone cypress and go it without vue stuff
todo: workorder status should survive a erase and should have stock values to include one for accounting (was the "Printed" case about accountant forgetting to print but expanding into a full accounting needs to do their thing status)
todo: can I turn control labels into hyperlinks for getting to feeder records? If not then need to find a way to accomplish it
e.g. can workorder status title be changed to a hyper link to status list

View File

@@ -77,6 +77,8 @@
item-value="id"
dense
:label="$ay.t('NewStatus')"
:prepend-icon="editStateIcon()"
@click:prepend="handleEditStateClick()"
>
<template v-slot:item="data">
<v-list-item-avatar>
@@ -231,6 +233,24 @@ export default {
}
return "$ayiHistory";
},
editStateIcon: function() {
//assuming if have rights to at least view wo have rights to at least view states
if (this.value != null) {
return "$ayiEdit";
}
return "$ayiPlus";
},
handleEditStateClick: function() {
let idToOpen = 0;
if (this.selectedStatus != null) {
console.log("selectedStatus is", this.selectedStatus);
idToOpen = this.selectedStatus;
}
window.$gz.eventBus.$emit("openobject", {
type: window.$gz.type.WorkOrderStatus,
id: idToOpen
});
},
save() {
this.addState();
this.openDialog = false;