0
0
Fork 0

fix: refs #7830 customer credit

This commit is contained in:
Pablo Natek 2024-08-13 18:13:46 +02:00
parent 49e9b23ccb
commit 40e46f5a72
4 changed files with 13 additions and 3 deletions

View File

@ -44,7 +44,7 @@ onMounted(async () => {
async function fetch(fetchFilter = {}) {
try {
const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys
const filter = { ...fetchFilter, ...$props.filter }; // eslint-disable-line vue/no-dupe-keys
if ($props.where && !fetchFilter.where) filter.where = $props.where;
if ($props.sortBy) filter.order = $props.sortBy;
if ($props.limit) filter.limit = $props.limit;

View File

@ -53,6 +53,8 @@ const openDialog = (item) => {
promise: updateData,
},
});
updateData();
showQPageSticky.value = true;
};
const openViewCredit = (credit) => {
@ -65,6 +67,7 @@ const openViewCredit = (credit) => {
};
const updateData = () => {
console.log('entrando');
vnPaginateRef.value?.fetch();
};
</script>

View File

@ -71,6 +71,10 @@ watch(
clientInformasRef.value?.fetch();
}
);
const onDataSaved = () => {
clientInformasRef.value?.fetch();
};
</script>
<template>
@ -86,6 +90,7 @@ watch(
:form-initial-data="{}"
:observe-form-changes="false"
:url-create="`Clients/${route.params.id}/setRating`"
@on-data-saved="onDataSaved"
>
<template #form="{ data }">
<VnRow>

View File

@ -1,5 +1,5 @@
<script setup>
import { reactive } from 'vue';
import { reactive, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router';
@ -10,10 +10,12 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
const { t } = useI18n();
const route = useRoute();
const routeId = computed(() => route.params.id);
const router = useRouter();
const initialData = reactive({
clientFK: Number(route.params.id),
started: Date.vnNew(),
clientFk: routeId.value,
});
const toCustomerCreditContracts = () => {