0
0
Fork 0
This commit is contained in:
William Buezas 2024-06-26 08:55:30 -03:00
parent 8ee4fa2e7d
commit ae73dd047f
3 changed files with 9 additions and 9 deletions

View File

@ -13,7 +13,6 @@ const route = useRoute();
const routeName = computed(() => route.name);
const searchBarDataKeys = {
TicketSummary: 'TicketSummary',
TicketNotes: 'TicketNotes',
TicketSale: 'TicketSale',
TicketPurchaseRequest: 'TicketPurchaseRequest',
};

View File

@ -71,7 +71,7 @@ const filter = {
const data = ref(useCardDescription());
const setData = (entity) =>
(data.value = useCardDescription(entity.client.name, entity.id));
(data.value = useCardDescription(entity.client?.name, entity.id));
</script>
<template>
@ -92,7 +92,7 @@ const setData = (entity) =>
<template #value>
<span class="link">
{{ entity.clientFk }}
<CustomerDescriptorProxy :id="entity.client.id" />
<CustomerDescriptorProxy :id="entity.client?.id" />
</span>
</template>
</VnLv>
@ -109,8 +109,8 @@ const setData = (entity) =>
<VnLv :label="t('ticket.summary.salesPerson')">
<template #value>
<VnUserLink
:name="entity.client.salesPersonUser?.name"
:worker-id="entity.client.salesPersonFk"
:name="entity.client?.salesPersonUser?.name"
:worker-id="entity.client?.salesPersonFk"
/>
</template>
</VnLv>

View File

@ -1,5 +1,5 @@
<script setup>
import { ref, watch, computed } from 'vue';
import { ref, watch, computed, reactive } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
@ -18,17 +18,18 @@ const observationTypes = ref([]);
const arrayData = useArrayData('TicketNotes');
const { store } = arrayData;
const crudModelFilter = computed(() => ({
const crudModelFilter = reactive({
where: { ticketFk: route.params.id },
fields: ['id', 'ticketFk', 'observationTypeFk', 'description'],
}));
});
const crudModelRequiredData = computed(() => ({ ticketFk: route.params.id }));
watch(
() => route.params.id,
async () => {
store.filter = crudModelFilter.value;
crudModelFilter.where.ticketFk = route.params.id;
store.filter = crudModelFilter;
await ticketNotesCrudRef.value.reload();
}
);