#7119 add VehicleList page and routing configuration #1129

Merged
jorgep merged 71 commits from 7119-createVehicle into dev 2025-02-06 09:24:16 +00:00
1 changed files with 14 additions and 2 deletions
Showing only changes of commit 9f815937a5 - Show all commits

View File

@ -12,6 +12,7 @@ const companies = ref([]);
const countries = ref([]); const countries = ref([]);
const fuelTypes = ref([]); const fuelTypes = ref([]);
const bankPolicies = ref([]); const bankPolicies = ref([]);
const deliveryPoints = ref([]);
</script> </script>
<template> <template>
<FetchData <FetchData
@ -38,6 +39,12 @@ const bankPolicies = ref([]);
@on-fetch="(data) => (fuelTypes = data)" @on-fetch="(data) => (fuelTypes = data)"
auto-load auto-load
/> />
<FetchData
url="DeliveryPoints"
:filter="{ fields: ['id', 'name'] }"
@on-fetch="(data) => (deliveryPoints = data)"
auto-load
/>
<FormModel model="Vehicle" :url-update="`Vehicles/${$route.params.id}`"> <FormModel model="Vehicle" :url-update="`Vehicles/${$route.params.id}`">
<template #form="{ data }"> <template #form="{ data }">
<VnRow> <VnRow>
@ -70,7 +77,11 @@ const bankPolicies = ref([]);
:label="$t('globals.fuel')" :label="$t('globals.fuel')"
:options="fuelTypes" :options="fuelTypes"
/> />
<VnInput v-model="data.vin" :label="$t('vehicle.vin')" /> <VnSelect
v-model="data.deliveryPointFk"
:label="$t('globals.deliveryPoint')"
:options="deliveryPoints"
/>
</VnRow> </VnRow>
<VnRow> <VnRow>
<VnSelect <VnSelect
@ -134,7 +145,8 @@ const bankPolicies = ref([]);
/> />
</VnRow> </VnRow>
<VnRow> <VnRow>
<span> <VnInput v-model="data.vin" :label="$t('vehicle.vin')" />
<span :style="{ 'align-self': $q.screen.gt.xs ? 'end' : 'unset' }">
<QCheckbox <QCheckbox
v-model="data.isActive" v-model="data.isActive"
:label="$t('vehicle.isActive')" :label="$t('vehicle.isActive')"