feat: refs #7119 add VehicleSearchbar component and update localization for vehicle search
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
458e48d4c6
commit
2851291a27
|
@ -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"
|
||||
|
|
|
@ -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>
|
|
@ -4,3 +4,6 @@ vehicle:
|
|||
chassis: Chassis
|
||||
leasing: Leasing
|
||||
isKmTruckRate: Trailer
|
||||
searchbar:
|
||||
label: Search Vehicle
|
||||
info: Search by id or number plate
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue