0
0
Fork 0

Correcciones comentarios pr

This commit is contained in:
carlosfonseca 2024-02-02 08:21:23 -05:00
parent 9c351b6494
commit b06e5b9252
12 changed files with 208 additions and 255 deletions

View File

@ -22,12 +22,12 @@ const state = useState();
const user = state.getUser(); const user = state.getUser();
const clientRisks = ref(null); const clientRisks = ref(null);
const clientRisksRef = ref(null);
const companiesOptions = ref([]); const companiesOptions = ref([]);
const companyId = ref(null); const companyId = ref(null);
const rows = ref(null);
const workerId = ref(0);
const receiptsRef = ref(null); const receiptsRef = ref(null);
const clientRisksRef = ref(null); const rows = ref([]);
const workerId = ref(null);
const filterCompanies = { order: ['code'] }; const filterCompanies = { order: ['code'] };
const params = { const params = {
@ -44,44 +44,42 @@ const tableColumnComponents = {
payed: { payed: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
created: { created: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
userName: { userName: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => { event: ({ row }) => (workerId.value = row.clientFk),
workerId.value = prop.row.clientFk;
},
}, },
description: { description: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
bankFk: { bankFk: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
debit: { debit: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
credit: { credit: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
balance: { balance: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
isConciliate: { isConciliate: {
component: QCheckbox, component: QCheckbox,
@ -89,7 +87,7 @@ const tableColumnComponents = {
disable: true, disable: true,
'model-value': Boolean(prop.value), 'model-value': Boolean(prop.value),
}), }),
event: () => {}, event: () => (workerId.value = null),
}, },
}; };

View File

@ -88,6 +88,7 @@ const updateData = () => {
:class="{ :class="{
'customer-card': true, 'customer-card': true,
'q-mb-md': index < rows.length - 1, 'q-mb-md': index < rows.length - 1,
'is-active': !item.finished,
}" }"
> >
<QCardSection class="flex q-py-none"> <QCardSection class="flex q-py-none">
@ -192,12 +193,14 @@ const updateData = () => {
} }
.customer-card { .customer-card {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-light-gray);
background-color: var(--vn-light-gray);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.is-active {
background-color: var(--vn-light-gray);
}
</style> </style>
<i18n> <i18n>

View File

@ -1,27 +1,23 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar'; import { date, QBtn } from 'quasar';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore();
const arrayData = ref(null); const workerId = ref(null);
const workerId = ref(0); const rows = ref([]);
const rows = computed(() => arrayData.value.store.data);
onBeforeMount(async () => { const filter = {
const filter = {
include: [ include: [
{ {
relation: 'worker', relation: 'worker',
@ -34,32 +30,23 @@ onBeforeMount(async () => {
where: { clientFk: `${route.params.id}` }, where: { clientFk: `${route.params.id}` },
order: ['created DESC'], order: ['created DESC'],
limit: 20, limit: 20,
}; };
arrayData.value = useArrayData('CustomerCreditsCard', {
url: 'ClientCredits',
filter,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
const tableColumnComponents = { const tableColumnComponents = {
created: { created: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
employee: { employee: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => { event: ({ row }) => (workerId.value = row.clientFk),
selectWorkerId(prop.row.clientFk);
},
}, },
amount: { amount: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
}; };
@ -86,16 +73,19 @@ const columns = computed(() => [
}, },
]); ]);
const selectWorkerId = (id) => {
workerId.value = id;
};
const toCustomerCreditCreate = () => { const toCustomerCreditCreate = () => {
router.push({ name: 'CustomerCreditCreate' }); router.push({ name: 'CustomerCreditCreate' });
}; };
</script> </script>
<template> <template>
<FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="ClientCredits"
/>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"

View File

@ -1,28 +1,24 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar'; import { date, QBtn } from 'quasar';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore();
const arrayData = ref(null); const rows = ref([]);
const totalAmount = ref(0); const totalAmount = ref(0);
const workerId = ref(0); const workerId = ref(null);
const rows = computed(() => arrayData.value.store.data);
onBeforeMount(async () => { const filter = {
const filter = {
include: [ include: [
{ {
relation: 'greugeType', relation: 'greugeType',
@ -42,46 +38,33 @@ onBeforeMount(async () => {
clientFk: `${route.params.id}`, clientFk: `${route.params.id}`,
}, },
limit: 20, limit: 20,
}; };
arrayData.value = useArrayData('CustomerGreugesCard', {
url: 'greuges',
filter,
});
await arrayData.value.fetch({ append: false });
totalAmount.value = arrayData.value.store.data.reduce((accumulator, currentValue) => {
return accumulator + currentValue.amount;
}, 0);
stateStore.rightDrawer = true;
});
const tableColumnComponents = { const tableColumnComponents = {
date: { date: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
createdBy: { createdBy: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => { event: ({ row }) => (workerId.value = row.clientFk),
selectWorkerId(prop.row.clientFk);
},
}, },
comment: { comment: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
type: { type: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
amount: { amount: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
}; };
@ -120,8 +103,11 @@ const columns = computed(() => [
}, },
]); ]);
const selectWorkerId = (id) => { const setRows = (data) => {
workerId.value = id; rows.value = data;
totalAmount.value = data.reduce((accumulator, currentValue) => {
return accumulator + currentValue.amount;
}, 0);
}; };
const toCustomerGreugeCreate = () => { const toCustomerGreugeCreate = () => {
@ -130,6 +116,8 @@ const toCustomerGreugeCreate = () => {
</script> </script>
<template> <template>
<FetchData :filter="filter" @on-fetch="setRows" auto-load url="greuges" />
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QCard class="full-width" v-if="totalAmount"> <QCard class="full-width" v-if="totalAmount">
<h6 class="flex justify-end q-my-lg q-pr-lg"> <h6 class="flex justify-end q-my-lg q-pr-lg">

View File

@ -1,39 +1,24 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar'; import { date, QBtn } from 'quasar';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import FetchData from 'components/FetchData.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore(); const rows = ref([]);
const arrayData = ref(null); const filter = {
const workerId = ref(0);
const rows = computed(() => arrayData.value.store.data);
onBeforeMount(async () => {
const filter = {
where: { clientFk: `${route.params.id}` }, where: { clientFk: `${route.params.id}` },
order: ['started DESC'], order: ['started DESC'],
limit: 20, limit: 20,
}; };
arrayData.value = useArrayData('CustomerRecoveriesCard', {
url: 'Recoveries',
filter,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
const tableColumnComponents = { const tableColumnComponents = {
since: { since: {
@ -94,6 +79,13 @@ const toCustomerRecoverieCreate = () => {
</script> </script>
<template> <template>
<FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="Recoveries"
/>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"
@ -113,7 +105,6 @@ const toCustomerRecoverieCreate = () => {
@click="tableColumnComponents[props.col.name].event(props)" @click="tableColumnComponents[props.col.name].event(props)"
> >
{{ props.value }} {{ props.value }}
<WorkerDescriptorProxy :id="workerId" />
</component> </component>
</QTr> </QTr>
</QTd> </QTd>

View File

@ -1,26 +1,21 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import { date, QBtn } from 'quasar'; import { date, QBtn } from 'quasar';
import { useArrayData } from 'composables/useArrayData'; import FetchData from 'components/FetchData.vue';
import { useStateStore } from 'stores/useStateStore';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore();
const arrayData = ref(null); const workerId = ref(null);
const workerId = ref(0); const rows = ref([]);
const rows = computed(() => arrayData.value.store.data);
onBeforeMount(async () => { const filter = {
const filter = {
include: [ include: [
{ relation: 'type', scope: { fields: ['code', 'description'] } }, { relation: 'type', scope: { fields: ['code', 'description'] } },
{ relation: 'user', scope: { fields: ['id', 'name'] } }, { relation: 'user', scope: { fields: ['id', 'name'] } },
@ -29,38 +24,28 @@ onBeforeMount(async () => {
where: { clientFk: route.params.id }, where: { clientFk: route.params.id },
order: ['created DESC'], order: ['created DESC'],
limit: 20, limit: 20,
}; };
arrayData.value = useArrayData('CustomerSamplesCard', {
url: 'ClientSamples',
filter,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
const tableColumnComponents = { const tableColumnComponents = {
sent: { sent: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
description: { description: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
worker: { worker: {
component: QBtn, component: QBtn,
props: () => ({ flat: true, color: 'blue' }), props: () => ({ flat: true, color: 'blue' }),
event: (prop) => { event: ({ row }) => (workerId.value = row.clientFk),
selectWorkerId(prop.row.clientFk);
},
}, },
company: { company: {
component: 'span', component: 'span',
props: () => {}, props: () => {},
event: () => {}, event: () => (workerId.value = null),
}, },
}; };
@ -92,16 +77,19 @@ const columns = computed(() => [
}, },
]); ]);
const selectWorkerId = (id) => {
workerId.value = id;
};
const toCustomerSamplesCreate = () => { const toCustomerSamplesCreate = () => {
router.push({ name: 'CustomerSamplesCreate' }); router.push({ name: 'CustomerSamplesCreate' });
}; };
</script> </script>
<template> <template>
<FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="ClientSamples"
/>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"

View File

@ -1,13 +1,12 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { QBtn, QCheckbox, useQuasar } from 'quasar'; import { QBtn, QCheckbox, useQuasar } from 'quasar';
import { toCurrency, toDate } from 'filters/index'; import { toCurrency, toDate } from 'filters/index';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
import FetchData from 'components/FetchData.vue';
import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue'; import CustomerNotificationsFilter from './CustomerDefaulterFilter.vue';
import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue'; import CustomerBalanceDueTotal from './CustomerBalanceDueTotal.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
@ -15,16 +14,13 @@ import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.v
import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue'; import CustomerDefaulterAddObservation from './CustomerDefaulterAddObservation.vue';
const { t } = useI18n(); const { t } = useI18n();
const stateStore = useStateStore();
const quasar = useQuasar(); const quasar = useQuasar();
const arrayData = ref(null);
const balanceDueTotal = ref(0); const balanceDueTotal = ref(0);
const customerId = ref(0); const customerId = ref(0);
const selected = ref([]); const selected = ref([]);
const workerId = ref(0); const workerId = ref(0);
const rows = ref([]);
const rows = computed(() => arrayData.value.store.data);
const tableColumnComponents = { const tableColumnComponents = {
client: { client: {
@ -155,23 +151,11 @@ const columns = computed(() => [
}, },
]); ]);
onBeforeMount(() => { const setRows = (data) => {
getArrayData(); rows.value = data;
}); balanceDueTotal.value = data.reduce((accumulator, currentValue) => {
const getArrayData = async () => {
arrayData.value = useArrayData('CustomerDefaulter', {
url: 'Defaulters/filter',
limit: 0,
});
await arrayData.value.fetch({ append: false });
balanceDueTotal.value = arrayData.value.store.data.reduce(
(accumulator, currentValue) => {
return accumulator + (currentValue['amount'] || 0); return accumulator + (currentValue['amount'] || 0);
}, }, 0);
0
);
stateStore.rightDrawer = true;
}; };
const selectCustomerId = (id) => { const selectCustomerId = (id) => {
@ -195,12 +179,19 @@ const viewAddObservation = (rowsSelected) => {
}; };
const refreshData = () => { const refreshData = () => {
getArrayData(); setRows();
}; };
</script> </script>
<template> <template>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above> <FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="Defaulters/filter"
/>
<QDrawer side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8"> <QScrollArea class="fit text-grey-8">
<CustomerNotificationsFilter data-key="CustomerDefaulter" /> <CustomerNotificationsFilter data-key="CustomerDefaulter" />
</QScrollArea> </QScrollArea>

View File

@ -1,33 +1,29 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount, onMounted } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { QBtn, QIcon } from 'quasar'; import { QBtn, QIcon } from 'quasar';
import { useStateStore } from 'stores/useStateStore';
import { dashIfEmpty, toDate } from 'src/filters';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import CustomerExtendedListActions from './CustomerExtendedListActions.vue'; import CustomerExtendedListActions from './CustomerExtendedListActions.vue';
import CustomerExtendedListFilter from './CustomerExtendedListFilter.vue'; import CustomerExtendedListFilter from './CustomerExtendedListFilter.vue';
import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue'; import TableVisibleColumns from 'src/components/common/TableVisibleColumns.vue';
import { useArrayData } from 'composables/useArrayData';
import { useStateStore } from 'stores/useStateStore';
import { dashIfEmpty, toDate } from 'src/filters';
const { t } = useI18n(); const { t } = useI18n();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore(); const stateStore = useStateStore();
const arrayData = ref(null); const allColumnNames = ref([]);
const rows = ref([]);
onBeforeMount(async () => { const selectedCustomerId = ref(0);
arrayData.value = useArrayData('CustomerExtendedList', { const selectedSalesPersonId = ref(0);
url: 'Clients/extendedListFilter', const visibleColumns = ref([]);
limit: 0,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
onMounted(() => { onMounted(() => {
const filteredColumns = columns.value.filter( const filteredColumns = columns.value.filter(
@ -36,13 +32,6 @@ onMounted(() => {
allColumnNames.value = filteredColumns.map((col) => col.name); allColumnNames.value = filteredColumns.map((col) => col.name);
}); });
const rows = computed(() => arrayData.value.store.data);
const selectedCustomerId = ref(0);
const selectedSalesPersonId = ref(0);
const allColumnNames = ref([]);
const visibleColumns = ref([]);
const tableColumnComponents = { const tableColumnComponents = {
customerStatus: { customerStatus: {
component: QIcon, component: QIcon,
@ -490,6 +479,13 @@ const selectSalesPersonId = (id) => {
</script> </script>
<template> <template>
<FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="Clients/extendedListFilter"
/>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above> <QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8"> <QScrollArea class="fit text-grey-8">
<CustomerExtendedListFilter <CustomerExtendedListFilter

View File

@ -1,32 +1,17 @@
<script setup> <script setup>
import { ref, computed, onBeforeMount } from 'vue'; import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { QBtn } from 'quasar'; import { QBtn } from 'quasar';
import { useArrayData } from 'composables/useArrayData'; import FetchData from 'components/FetchData.vue';
import { useStateStore } from 'stores/useStateStore';
import CustomerNotificationsFilter from './CustomerNotificationsFilter.vue'; import CustomerNotificationsFilter from './CustomerNotificationsFilter.vue';
import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
const { t } = useI18n(); const { t } = useI18n();
const stateStore = useStateStore();
const arrayData = ref(null);
onBeforeMount(async () => {
arrayData.value = useArrayData('CustomerNotifications', {
url: 'Clients',
limit: 0,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
const rows = computed(() => arrayData.value.store.data);
const rows = ref([]);
const selected = ref([]); const selected = ref([]);
const selectedCustomerId = ref(0); const selectedCustomerId = ref(0);
@ -97,7 +82,14 @@ const selectCustomerId = (id) => {
</script> </script>
<template> <template>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above> <FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="Clients"
/>
<QDrawer side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8"> <QScrollArea class="fit text-grey-8">
<CustomerNotificationsFilter data-key="CustomerNotifications" /> <CustomerNotificationsFilter data-key="CustomerNotifications" />
</QScrollArea> </QScrollArea>

View File

@ -1,35 +1,25 @@
<script setup> <script setup>
import { computed, onBeforeMount, ref } from 'vue'; import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { date } from 'quasar'; import { date } from 'quasar';
import { useArrayData } from 'src/composables/useArrayData';
import { toCurrency } from 'src/filters'; import { toCurrency } from 'src/filters';
import { useStateStore } from 'src/stores/useStateStore';
import FetchData from 'components/FetchData.vue';
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const stateStore = useStateStore();
const arrayData = ref(null); const rows = ref([]);
const rows = computed(() => arrayData.value.store.data);
onBeforeMount(async () => { const filter = {
const filter = {
where: { where: {
creditClassificationFk: `${route.params.creditId}`, creditClassificationFk: `${route.params.creditId}`,
}, },
limit: 20, limit: 20,
}; };
arrayData.value = useArrayData('CustomerCreditsContractsInsuranceCard', {
url: 'CreditInsurances',
filter,
});
await arrayData.value.fetch({ append: false });
stateStore.rightDrawer = true;
});
const tableColumnComponents = { const tableColumnComponents = {
created: { created: {
@ -74,6 +64,13 @@ const columns = computed(() => [
</script> </script>
<template> <template>
<FetchData
:filter="filter"
@on-fetch="(data) => (rows = data)"
auto-load
url="CreditInsurances"
/>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"

View File

@ -227,14 +227,6 @@ const onDataSaved = async ({
</FormModel> </FormModel>
</template> </template>
<style lang="scss" scoped>
.add-icon {
cursor: pointer;
background-color: $primary;
border-radius: 50px;
}
</style>
<i18n> <i18n>
es: es:
Sample: Plantilla Sample: Plantilla

View File

@ -561,6 +561,33 @@ export default {
'src/pages/Customer/Card/CustomerFileManagement.vue' 'src/pages/Customer/Card/CustomerFileManagement.vue'
), ),
}, },
{
path: 'file-management',
name: 'CustomerFileManagementCard',
redirect: { name: 'CustomerFileManagement' },
children: [
{
path: '',
name: 'CustomerFileManagement',
meta: {
title: 'fileManagement',
icon: 'paid',
},
component: () =>
import(
'src/pages/Customer/Card/CustomerFileManagement.vue'
),
},
{
path: 'create',
name: 'CustomerFileManagementCreate',
component: () =>
import(
'src/pages/Customer/components/CustomerFileManagementCreate.vue'
),
},
],
},
{ {
path: 'unpaid', path: 'unpaid',
name: 'CustomerUnpaid', name: 'CustomerUnpaid',