forked from verdnatura/salix-front
changes
This commit is contained in:
parent
8ee4fa2e7d
commit
ae73dd047f
|
@ -13,7 +13,6 @@ const route = useRoute();
|
||||||
const routeName = computed(() => route.name);
|
const routeName = computed(() => route.name);
|
||||||
const searchBarDataKeys = {
|
const searchBarDataKeys = {
|
||||||
TicketSummary: 'TicketSummary',
|
TicketSummary: 'TicketSummary',
|
||||||
TicketNotes: 'TicketNotes',
|
|
||||||
TicketSale: 'TicketSale',
|
TicketSale: 'TicketSale',
|
||||||
TicketPurchaseRequest: 'TicketPurchaseRequest',
|
TicketPurchaseRequest: 'TicketPurchaseRequest',
|
||||||
};
|
};
|
||||||
|
|
|
@ -71,7 +71,7 @@ const filter = {
|
||||||
|
|
||||||
const data = ref(useCardDescription());
|
const data = ref(useCardDescription());
|
||||||
const setData = (entity) =>
|
const setData = (entity) =>
|
||||||
(data.value = useCardDescription(entity.client.name, entity.id));
|
(data.value = useCardDescription(entity.client?.name, entity.id));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -92,7 +92,7 @@ const setData = (entity) =>
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link">
|
<span class="link">
|
||||||
{{ entity.clientFk }}
|
{{ entity.clientFk }}
|
||||||
<CustomerDescriptorProxy :id="entity.client.id" />
|
<CustomerDescriptorProxy :id="entity.client?.id" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
@ -109,8 +109,8 @@ const setData = (entity) =>
|
||||||
<VnLv :label="t('ticket.summary.salesPerson')">
|
<VnLv :label="t('ticket.summary.salesPerson')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<VnUserLink
|
||||||
:name="entity.client.salesPersonUser?.name"
|
:name="entity.client?.salesPersonUser?.name"
|
||||||
:worker-id="entity.client.salesPersonFk"
|
:worker-id="entity.client?.salesPersonFk"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, computed } from 'vue';
|
import { ref, watch, computed, reactive } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
|
@ -18,17 +18,18 @@ const observationTypes = ref([]);
|
||||||
const arrayData = useArrayData('TicketNotes');
|
const arrayData = useArrayData('TicketNotes');
|
||||||
const { store } = arrayData;
|
const { store } = arrayData;
|
||||||
|
|
||||||
const crudModelFilter = computed(() => ({
|
const crudModelFilter = reactive({
|
||||||
where: { ticketFk: route.params.id },
|
where: { ticketFk: route.params.id },
|
||||||
fields: ['id', 'ticketFk', 'observationTypeFk', 'description'],
|
fields: ['id', 'ticketFk', 'observationTypeFk', 'description'],
|
||||||
}));
|
});
|
||||||
|
|
||||||
const crudModelRequiredData = computed(() => ({ ticketFk: route.params.id }));
|
const crudModelRequiredData = computed(() => ({ ticketFk: route.params.id }));
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
async () => {
|
async () => {
|
||||||
store.filter = crudModelFilter.value;
|
crudModelFilter.where.ticketFk = route.params.id;
|
||||||
|
store.filter = crudModelFilter;
|
||||||
await ticketNotesCrudRef.value.reload();
|
await ticketNotesCrudRef.value.reload();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue