This commit is contained in:
parent
5c593697b9
commit
ed5ce3c459
|
@ -12,6 +12,7 @@ const props = defineProps({
|
|||
baseUrl: { type: String, default: undefined },
|
||||
customUrl: { type: String, default: undefined },
|
||||
filter: { type: Object, default: () => {} },
|
||||
userFilter: { type: Object, default: () => {} },
|
||||
descriptor: { type: Object, required: true },
|
||||
filterPanel: { type: Object, default: undefined },
|
||||
searchDataKey: { type: String, default: undefined },
|
||||
|
@ -32,6 +33,7 @@ const url = computed(() => {
|
|||
const arrayData = useArrayData(props.dataKey, {
|
||||
url: url.value,
|
||||
filter: props.filter,
|
||||
userFilter: props.userFilter,
|
||||
});
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
|
|
@ -1,7 +1,40 @@
|
|||
<script setup>
|
||||
import TravelDescriptor from './TravelDescriptor.vue';
|
||||
import VnCardBeta from 'src/components/common/VnCardBeta.vue';
|
||||
|
||||
const userFilter = {
|
||||
fields: [
|
||||
'id',
|
||||
'ref',
|
||||
'shipped',
|
||||
'landed',
|
||||
'totalEntries',
|
||||
'warehouseInFk',
|
||||
'warehouseOutFk',
|
||||
'cargoSupplierFk',
|
||||
'agencyModeFk',
|
||||
],
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouseOut',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnCardBeta data-key="Travel" base-url="Travels" :descriptor="TravelDescriptor" />
|
||||
<VnCardBeta
|
||||
data-key="Travel"
|
||||
base-url="Travels"
|
||||
:descriptor="TravelDescriptor"
|
||||
:user-filter="userFilter"
|
||||
/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue