<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"
        searchbar-label="Search travel"
        searchbar-info="You can search by travel id or name"
        search-url="Travels"
        :filter="filter"
        :descriptor="TravelDescriptor"
    />
</template>
