forked from verdnatura/salix-front
Merge pull request 'Fix: Wagon section reload' (!727) from FixWagonRedirect into dev
Reviewed-on: verdnatura/salix-front#727 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
a012660518
|
@ -103,7 +103,7 @@ async function remove(row) {
|
||||||
url-create="WagonTypes"
|
url-create="WagonTypes"
|
||||||
model="WagonType"
|
model="WagonType"
|
||||||
:form-initial-data="initialData"
|
:form-initial-data="initialData"
|
||||||
@on-data-saved="window.location.reload()"
|
@on-data-saved="tableRef.reload()"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const tableRef = ref();
|
||||||
const filter = {
|
const filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'type',
|
relation: 'type',
|
||||||
|
@ -107,9 +107,7 @@ async function remove(row) {
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Wagons',
|
urlCreate: 'Wagons',
|
||||||
title: t('Create new wagon'),
|
title: t('Create new wagon'),
|
||||||
onDataSaved: () => {
|
onDataSaved: () => tableRef.reload(),
|
||||||
window.location.reload();
|
|
||||||
},
|
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue