This commit is contained in:
2021-05-12 22:30:00 +00:00
parent ee1f203aa7
commit 9a07a03579
2 changed files with 15 additions and 5 deletions

View File

@@ -79,13 +79,22 @@ export default {
methods: {
initAndOpen() {
this.contractIdAtStart = this.value.contractId;
this.contractNameAtStart = this.value.contractViz;
this.openDialog = true;
//if form is dirty don't open, must save first
//Give a prompt for htat and exit, don't call save here because it might result in error
if (this.pvm.formState.dirty) {
window.$gz.eventBus.$emit(
"notify-info",
this.$ay.t("SaveRecordToProceed")
);
return;
} else {
this.contractIdAtStart = this.value.contractId;
this.contractNameAtStart = this.value.contractViz;
this.openDialog = true;
}
},
contractChange(newName) {
this.value.contractViz = newName;
// this.pvm.formState.dirty = true;
},
form() {
return window.$gz.form;

View File

@@ -1357,7 +1357,8 @@ async function fetchTranslatedText(vm) {
"WorkOrderItemLaborManualDiscountPct",
"WorkOrderItemLaborBasePrice",
"WorkOrderItemLaborPrice",
"WorkOrderItemLaborServiceStartDate"
"WorkOrderItemLaborServiceStartDate",
"SaveRecordToProceed"
]);
}