refactor: refs #6919 export filter
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-11-12 11:15:34 +01:00
parent efd66ea02a
commit b4d7653661
3 changed files with 46 additions and 44 deletions

View File

@ -2,50 +2,7 @@
import VnCard from 'components/common/VnCard.vue';
import EntryDescriptor from './EntryDescriptor.vue';
import EntryFilter from '../EntryFilter.vue';
const filter = {
include: [
{
relation: 'travel',
scope: {
fields: [
'id',
'landed',
'shipped',
'agencyModeFk',
'warehouseOutFk',
'daysInForward',
],
include: [
{
relation: 'agency',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseOut',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseIn',
scope: {
fields: ['name'],
},
},
],
},
},
{
relation: 'supplier',
scope: {
fields: ['id', 'nickname'],
},
},
],
};
import filter from './EntryFilter.js';
</script>
<template>
<VnCard

View File

@ -9,6 +9,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import { toDate } from 'src/filters';
import { usePrintService } from 'composables/usePrintService';
import { getUrl } from 'src/composables/getUrl';
import filter from './EntryFilter.js';
const $props = defineProps({
id: {
@ -62,6 +63,7 @@ const showEntryReport = () => {
ref="entryDescriptorRef"
module="Entry"
:url="`Entries/${entityId}`"
:filter="filter"
title="supplier.nickname"
data-key="Entry"
>

View File

@ -0,0 +1,43 @@
export default {
include: [
{
relation: 'travel',
scope: {
fields: [
'id',
'landed',
'shipped',
'agencyModeFk',
'warehouseOutFk',
'daysInForward',
],
include: [
{
relation: 'agency',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseOut',
scope: {
fields: ['name'],
},
},
{
relation: 'warehouseIn',
scope: {
fields: ['name'],
},
},
],
},
},
{
relation: 'supplier',
scope: {
fields: ['id', 'nickname'],
},
},
],
};