forked from verdnatura/salix-front
Merge pull request 'fix: hotfix travel' (!1003) from hotfix-7366travel into master
Reviewed-on: verdnatura/salix-front#1003 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
75986bf7a8
|
@ -60,7 +60,7 @@ globals:
|
||||||
reference: Reference
|
reference: Reference
|
||||||
agency: Agency
|
agency: Agency
|
||||||
warehouseOut: Warehouse Out
|
warehouseOut: Warehouse Out
|
||||||
wareHouseIn: Warehouse In
|
warehouseIn: Warehouse In
|
||||||
landed: Landed
|
landed: Landed
|
||||||
shipped: Shipped
|
shipped: Shipped
|
||||||
totalEntries: Total entries
|
totalEntries: Total entries
|
||||||
|
|
|
@ -14,6 +14,8 @@ const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const agenciesOptions = ref([]);
|
const agenciesOptions = ref([]);
|
||||||
|
const warehousesOptionsOut = ref([]);
|
||||||
|
const warehousesOptionsIn = ref([]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -21,6 +23,18 @@ const agenciesOptions = ref([]);
|
||||||
@on-fetch="(data) => (agenciesOptions = data)"
|
@on-fetch="(data) => (agenciesOptions = data)"
|
||||||
auto-load
|
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>
|
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -39,11 +53,12 @@ const agenciesOptions = ref([]);
|
||||||
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
<VnInputDate v-model="data.shipped" :label="t('globals.shipped')" />
|
||||||
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
<VnInputDate v-model="data.landed" :label="t('globals.landed')" />
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('globals.warehouseOut')"
|
||||||
v-model="data.warehouseOutFk"
|
v-model="data.warehouseOutFk"
|
||||||
:options="agenciesOptions"
|
:options="warehousesOptionsOut"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
map-options
|
map-options
|
||||||
|
@ -52,7 +67,7 @@ const agenciesOptions = ref([]);
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('globals.warehouseIn')"
|
:label="t('globals.warehouseIn')"
|
||||||
v-model="data.warehouseInFk"
|
v-model="data.warehouseInFk"
|
||||||
:options="agenciesOptions"
|
:options="warehousesOptionsIn"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
map-options
|
map-options
|
||||||
|
@ -89,7 +104,7 @@ const agenciesOptions = ref([]);
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
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. Si se deja a 0 la fecha no cambiará
|
||||||
en:
|
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. If it is 0 the date will not change.
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -44,8 +44,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
<TravelDescriptorMenuItems :travel="entity" />
|
<TravelDescriptorMenuItems :travel="entity" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn.name" />
|
<VnLv :label="t('globals.warehouseIn')" :value="entity.warehouseIn?.name" />
|
||||||
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut.name" />
|
<VnLv :label="t('globals.warehouseOut')" :value="entity.warehouseOut?.name" />
|
||||||
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
<VnLv :label="t('globals.shipped')" :value="toDate(entity.shipped)" />
|
||||||
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
<VnLv :label="t('globals.landed')" :value="toDate(entity.landed)" />
|
||||||
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
<VnLv :label="t('globals.totalEntries')" :value="entity.totalEntries" />
|
||||||
|
|
Loading…
Reference in New Issue