0
0
Fork 0

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:
Jon Elias 2024-09-19 10:45:31 +00:00
commit a012660518
2 changed files with 4 additions and 6 deletions

View File

@ -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 }">

View File

@ -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: {},
}"
>