forked from verdnatura/salix-front
Fix routes form update
This commit is contained in:
parent
4da74f8710
commit
53f69738a5
|
@ -18,8 +18,8 @@ const { t } = useI18n();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
const shelvingId = route.params?.id || null;
|
||||
const isNew = Boolean(!shelvingId);
|
||||
const shelvingId = ref(route.params?.id || null);
|
||||
const isNew = Boolean(!shelvingId.value);
|
||||
const defaultInitialData = {
|
||||
agencyModeFk: null,
|
||||
created: null,
|
||||
|
@ -111,7 +111,7 @@ const onSave = (data, response) => {
|
|||
auto-load
|
||||
/>
|
||||
<FormModel
|
||||
:url="isNew ? null : `Routes/${shelvingId}`"
|
||||
:url="isNew ? null : `Routes/${route.params?.id}`"
|
||||
:url-create="isNew ? 'Routes' : null"
|
||||
:observe-form-changes="!isNew"
|
||||
:filter="routeFilter"
|
||||
|
|
|
@ -14,7 +14,6 @@ import {ref} from "vue";
|
|||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const entityId = route.params?.id || null;
|
||||
|
||||
const supplierList = ref([]);
|
||||
const filter = { include: [{ relation: 'supplier' }] };
|
||||
|
@ -33,7 +32,7 @@ const onSave = (data, response) => {
|
|||
@on-fetch="(data) => (supplierList = data)"
|
||||
/>
|
||||
<FormModel
|
||||
:url="`Roadmaps/${entityId}`"
|
||||
:url="`Roadmaps/${route.params?.id}`"
|
||||
observe-form-changes
|
||||
:filter="filter"
|
||||
model="roadmap"
|
||||
|
|
Loading…
Reference in New Issue