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"
|
||||
model="WagonType"
|
||||
:form-initial-data="initialData"
|
||||
@on-data-saved="window.location.reload()"
|
||||
@on-data-saved="tableRef.reload()"
|
||||
auto-load
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
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 VnInput from 'src/components/common/VnInput.vue';
|
||||
|
||||
|
@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
|
|||
const store = arrayData.store;
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
||||
const tableRef = ref();
|
||||
const filter = {
|
||||
include: {
|
||||
relation: 'type',
|
||||
|
@ -107,9 +107,7 @@ async function remove(row) {
|
|||
:create="{
|
||||
urlCreate: 'Wagons',
|
||||
title: t('Create new wagon'),
|
||||
onDataSaved: () => {
|
||||
window.location.reload();
|
||||
},
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {},
|
||||
}"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue