This commit is contained in:
parent
00b7883aed
commit
8af09d46ed
|
@ -2,11 +2,13 @@
|
|||
import InvoiceOutDescriptor from './InvoiceOutDescriptor.vue';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import InvoiceOutFilter from '../InvoiceOutFilter.vue';
|
||||
import filter from './InvoiceOutFilter.js';
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="InvoiceOut"
|
||||
url="InvoiceOuts"
|
||||
:filter="filter"
|
||||
:descriptor="InvoiceOutDescriptor"
|
||||
:filter-panel="InvoiceOutFilter"
|
||||
search-data-key="InvoiceOutList"
|
||||
|
|
|
@ -8,8 +8,8 @@ import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy
|
|||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import InvoiceOutDescriptorMenu from './InvoiceOutDescriptorMenu.vue';
|
||||
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import { toCurrency, toDate } from 'src/filters';
|
||||
import filter from './InvoiceOutFilter.js';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -26,30 +26,11 @@ const entityId = computed(() => {
|
|||
return $props.id || route.params.id;
|
||||
});
|
||||
|
||||
const filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'company',
|
||||
scope: {
|
||||
fields: ['id', 'code'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['id', 'name', 'email'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const descriptor = ref();
|
||||
|
||||
function ticketFilter(invoice) {
|
||||
return JSON.stringify({ refFk: invoice.ref });
|
||||
}
|
||||
const data = ref(useCardDescription());
|
||||
const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.id));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -58,10 +39,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
|||
module="InvoiceOut"
|
||||
:url="`InvoiceOuts/${entityId}`"
|
||||
:filter="filter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
@on-fetch="setData"
|
||||
data-key="invoiceOutData"
|
||||
title="ref"
|
||||
data-key="InvoiceOut"
|
||||
>
|
||||
<template #menu="{ entity, menuRef }">
|
||||
<InvoiceOutDescriptorMenu :invoice-out-data="entity" :menu-ref="menuRef" />
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
export default {
|
||||
include: [
|
||||
{
|
||||
relation: 'company',
|
||||
scope: {
|
||||
fields: ['id', 'code'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['id', 'name', 'email'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
Loading…
Reference in New Issue