feat: refs #7119 add VehicleSearchbar component and update localization for vehicle search
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-12-26 17:02:41 +01:00
parent 458e48d4c6
commit 2851291a27
4 changed files with 22 additions and 7 deletions

View File

@ -3,6 +3,7 @@ import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import VnTable from 'components/VnTable/VnTable.vue';
import FetchData from 'src/components/FetchData.vue';
import VehicleSearchbar from 'src/pages/Route/Vehicle/VehicleSearchbar.vue';
const { t } = useI18n();
const warehouses = ref([]);
@ -74,13 +75,8 @@ const columns = computed(() => [
{
name: 'vehicleStateFk',
label: t('globals.state'),
columnFilter: {
component: 'select',
name: 'vehicleStateFk',
optionValue: 'id',
optionLabel: 'state',
options: vehicleStates.value,
},
columnFilter: false,
sortable: false,
format: (row, dashIfEmpty) => dashIfEmpty(row.event?.state?.state),
},
]);
@ -110,6 +106,7 @@ const columns = computed(() => [
@on-fetch="(data) => (vehicleStates = data)"
auto-load
/>
<VehicleSearchbar />
<VnTable
data-key="VehicleList"
url="Vehicles/filter"

View File

@ -0,0 +1,12 @@
<script setup>
import VnSearchbar from 'components/ui/VnSearchbar.vue';
</script>
<template>
<VnSearchbar
data-key="VehicleList"
url="Vehicles/filter"
:label="$t('vehicle.searchbar.label')"
:info="$t('vehicle.searchbar.info')"
custom-route-redirect-name="ZoneSummary"
/>
</template>

View File

@ -4,3 +4,6 @@ vehicle:
chassis: Chassis
leasing: Leasing
isKmTruckRate: Trailer
searchbar:
label: Search Vehicle
info: Search by id or number plate

View File

@ -4,3 +4,6 @@ vehicle:
chassis: Número de bastidor
leasing: Número de leasing
isKmTruckRate: Trailer
searchbar:
label: Buscar Vehículo
info: Buscar por id o matrícula