This commit is contained in:
@@ -1095,13 +1095,24 @@ export default {
|
|||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
async updatePartCost(item) {
|
async updatePartCost(item) {
|
||||||
|
let vm = this;
|
||||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||||
"Update part cost from received cost?"
|
"Update part cost from received cost?"
|
||||||
);
|
);
|
||||||
if (dialogResult == false) {
|
if (dialogResult == false) {
|
||||||
return;
|
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() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
@@ -1525,6 +1536,7 @@ async function fetchTranslatedText(vm) {
|
|||||||
"PurchaseOrderItemSerialNumbers",
|
"PurchaseOrderItemSerialNumbers",
|
||||||
"ReceiveAll",
|
"ReceiveAll",
|
||||||
"Receive",
|
"Receive",
|
||||||
|
"JobCompleted",
|
||||||
"PurchaseOrderCustom1",
|
"PurchaseOrderCustom1",
|
||||||
"PurchaseOrderCustom2",
|
"PurchaseOrderCustom2",
|
||||||
"PurchaseOrderCustom3",
|
"PurchaseOrderCustom3",
|
||||||
|
|||||||
Reference in New Issue
Block a user