This commit is contained in:
@@ -380,6 +380,12 @@ export default {
|
||||
return;
|
||||
}
|
||||
vm.obj.aType = vm.$route.params.reportDataOptions.AType;
|
||||
|
||||
//trigger rule breaking / validation
|
||||
this.$nextTick(() => {
|
||||
this.obj.name = null;
|
||||
this.fieldValueChanged(`name`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -753,6 +753,7 @@ const FORM_CUSTOM_TEMPLATE_KEY = "Customer"; //<-- Should always be CoreBizObjec
|
||||
export default {
|
||||
async created() {
|
||||
let vm = this;
|
||||
let completelyNew = false;
|
||||
//Prevent returning back to the /0 NEW route after having just created a new record and instead return to the original new source page
|
||||
// console.log("cust-customer created params: ", vm.$route.params);
|
||||
// if (
|
||||
@@ -791,6 +792,8 @@ export default {
|
||||
"Copy"
|
||||
)}`;
|
||||
setDirty = true;
|
||||
} else {
|
||||
completelyNew = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -805,6 +808,14 @@ export default {
|
||||
window.$gz.errorHandler.handleFormError(error, vm);
|
||||
} finally {
|
||||
vm.formState.ready = true;
|
||||
if (completelyNew) {
|
||||
//completely new record pre-break name rule so it shows as required
|
||||
//trigger rule breaking / validation
|
||||
this.$nextTick(() => {
|
||||
this.obj.name = null;
|
||||
this.fieldValueChanged(`name`);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async beforeRouteLeave(to, from, next) {
|
||||
@@ -834,7 +845,7 @@ export default {
|
||||
{
|
||||
id: 0,
|
||||
concurrency: 0,
|
||||
name: null,
|
||||
name: undefined,
|
||||
active: true,
|
||||
notes: null,
|
||||
wiki: null,
|
||||
|
||||
Reference in New Issue
Block a user