This commit is contained in:
@@ -1095,13 +1095,24 @@ export default {
|
||||
return null;
|
||||
},
|
||||
async updatePartCost(item) {
|
||||
let vm = this;
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
"Update part cost from received cost?"
|
||||
);
|
||||
if (dialogResult == false) {
|
||||
return;
|
||||
}
|
||||
console.log("STUB: UPDATE PART COST", item);
|
||||
//send request
|
||||
let res = await window.$gz.api.put(
|
||||
`part/part-cost/${item.partId}`,
|
||||
item.receivedCost
|
||||
);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
window.$gz.eventBus.$emit("notify-success", vm.$ay.t("JobCompleted"));
|
||||
}
|
||||
},
|
||||
canSave: function() {
|
||||
return this.formState.valid && this.formState.dirty;
|
||||
@@ -1525,6 +1536,7 @@ async function fetchTranslatedText(vm) {
|
||||
"PurchaseOrderItemSerialNumbers",
|
||||
"ReceiveAll",
|
||||
"Receive",
|
||||
"JobCompleted",
|
||||
"PurchaseOrderCustom1",
|
||||
"PurchaseOrderCustom2",
|
||||
"PurchaseOrderCustom3",
|
||||
|
||||
Reference in New Issue
Block a user