feat: add Options Style in AddressList from TicketCrete #999
|
@ -60,7 +60,7 @@ globals:
|
|||
reference: Reference
|
||||
agency: Agency
|
||||
warehouseOut: Warehouse Out
|
||||
wareHouseIn: Warehouse In
|
||||
warehouseIn: Warehouse In
|
||||
landed: Landed
|
||||
shipped: Shipped
|
||||
totalEntries: Total entries
|
||||
|
|
|
@ -14,6 +14,8 @@ const route = useRoute();
|
|||
const { t } = useI18n();
|
||||
|
||||
const agenciesOptions = ref([]);
|
||||
const warehousesOptionsOut = ref([]);
|
||||
const warehousesOptionsIn = ref([]);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -21,6 +23,18 @@ const agenciesOptions = ref([]);
|
|||
@on-fetch="(data) => (agenciesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptionsOut = data)"
|
||||
auto-load
|
||||
:filter="{ where: { isOrigin: TRUE } }"
|
||||
/>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
@on-fetch="(data) => (warehousesOptionsIn = data)"
|
||||
auto-load
|
||||
:filter="{ where: { isDestiny: TRUE } }"
|
||||
/>
|
||||
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
|
@ -39,11 +53,12 @@ const agenciesOptions = ref([]);
|
|||
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
||||
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
||||
</VnRow>
|
||||
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('globals.warehouseOut')"
|
||||
v-model="data.warehouseOutFk"
|
||||
:options="agenciesOptions"
|
||||
:options="warehousesOptionsOut"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
map-options
|
||||
|
@ -52,7 +67,7 @@ const agenciesOptions = ref([]);
|
|||
<VnSelect
|
||||
:label="t('globals.warehouseIn')"
|
||||
v-model="data.warehouseInFk"
|
||||
:options="agenciesOptions"
|
||||
:options="warehousesOptionsIn"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
map-options
|
||||
|
@ -89,7 +104,7 @@ const agenciesOptions = ref([]);
|
|||
|
||||
<i18n>
|
||||
es:
|
||||
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados (incluido 0). Si se deja vacio, la fecha no cambiará
|
||||
raidDays: Si se marca "Redada", la fecha de entrega se moverá automáticamente los días indicados.
|
||||
en:
|
||||
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days (including 0). If left empty, the date will stay the same.
|
||||
raidDays: If "Raid" is checked, the landing date will automatically shift by the specified number of days.
|
||||
</i18n>
|
||||
|
|
|
@ -44,8 +44,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
|||
<TravelDescriptorMenuItems :travel="entity" />
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn.name" />
|
||||
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut.name" />
|
||||
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn?.name" />
|
||||
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut?.name" />
|
||||
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
||||
|
|
Loading…
Reference in New Issue