<script setup>
import VnCard from 'components/common/VnCard.vue';
import TravelDescriptor from './TravelDescriptor.vue';

const filter = {
    fields: [
        'id',
        'ref',
        'shipped',
        'landed',
        'totalEntries',
        'warehouseInFk',
        'warehouseOutFk',
        'cargoSupplierFk',
        'agencyModeFk',
    ],
    include: [
        {
            relation: 'warehouseIn',
            scope: {
                fields: ['name'],
            },
        },
        {
            relation: 'warehouseOut',
            scope: {
                fields: ['name'],
            },
        },
    ],
};
</script>
<template>
    <VnCard
        data-key="Travel"
        base-url="Travels"
        search-data-key="TravelList"
        :filter="filter"
        :descriptor="TravelDescriptor"
        :searchbar-props="{
            url: 'Travels',
            label: 'Search travel',
            info: 'You can search by travel id or name',
        }"
    />
</template>
