This commit is contained in:
@@ -438,6 +438,7 @@ export default {
|
|||||||
if (this.$route.params.obj) {
|
if (this.$route.params.obj) {
|
||||||
//yes, no need to fetch it
|
//yes, no need to fetch it
|
||||||
this.obj = this.$route.params.obj;
|
this.obj = this.$route.params.obj;
|
||||||
|
this.optionsObj = this.$route.params.optionsObj;
|
||||||
vm.formState.loading = false; //here we handle it immediately
|
vm.formState.loading = false; //here we handle it immediately
|
||||||
} else {
|
} else {
|
||||||
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
||||||
@@ -721,6 +722,7 @@ export default {
|
|||||||
if (res.data.id) {
|
if (res.data.id) {
|
||||||
//POST - whole new object returned
|
//POST - whole new object returned
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
|
await vm.getUserOptionsDataFromApi();
|
||||||
//Change URL to new record
|
//Change URL to new record
|
||||||
//NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
|
//NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
|
||||||
|
|
||||||
@@ -728,7 +730,8 @@ export default {
|
|||||||
name: "adm-user",
|
name: "adm-user",
|
||||||
params: {
|
params: {
|
||||||
recordid: res.data.id,
|
recordid: res.data.id,
|
||||||
obj: res.data //Pass data object to new form
|
obj: res.data,
|
||||||
|
optionsObj: vm.optionsObj
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -726,12 +726,12 @@ export default {
|
|||||||
await vm.getUserOptionsDataFromApi();
|
await vm.getUserOptionsDataFromApi();
|
||||||
//Change URL to new record
|
//Change URL to new record
|
||||||
//NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
|
//NOTE: will not cause a page re-render, almost nothing does unless forced with a KEY property or using router.GO()
|
||||||
//this.optionsObj = this.$route.params.optionsObj;
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "cust-user",
|
name: "cust-user",
|
||||||
params: {
|
params: {
|
||||||
recordid: res.data.id,
|
recordid: res.data.id,
|
||||||
obj: res.data, //Pass data object to new form
|
obj: res.data,
|
||||||
optionsObj: vm.optionsObj
|
optionsObj: vm.optionsObj
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user