diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 05c63d563..f10dee61a 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -83,6 +83,10 @@ const $props = defineProps({ default: '', description: 'It is used for redirect on click "save and continue"', }, + reload: { + type: Boolean, + default: false, + }, }); const emit = defineEmits(['onFetch', 'onDataSaved']); const modelValue = computed( @@ -201,6 +205,7 @@ async function save() { if ($props.urlCreate) notify('globals.dataCreated', 'positive'); updateAndEmit('onDataSaved', formData.value, response?.data); + if ($props.reload) await arrayData.fetch({}); } catch (err) { console.error(err); notify('errors.writeRequest', 'negative'); diff --git a/src/pages/Claim/Card/ClaimBasicData.vue b/src/pages/Claim/Card/ClaimBasicData.vue index 50c9502d2..977a4dc5b 100644 --- a/src/pages/Claim/Card/ClaimBasicData.vue +++ b/src/pages/Claim/Card/ClaimBasicData.vue @@ -17,26 +17,6 @@ const { t } = useI18n(); const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); -const claimFilter = { - fields: [ - 'id', - 'clientFk', - 'created', - 'workerFk', - 'claimStateFk', - 'packages', - 'pickup', - ], - include: [ - { - relation: 'client', - scope: { - fields: ['name'], - }, - }, - ], -}; - const claimStates = ref([]); const claimStatesCopy = ref([]); const optionsList = ref([]); @@ -87,11 +67,10 @@ const statesFilter = { />