Merge pull request 'feat: refs#8087 Redadas en travel' (!984) from travelisRaidTest into test
Reviewed-on: #984 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
e04d77f55e
|
@ -767,6 +767,7 @@ travel:
|
||||||
hb: HB
|
hb: HB
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Days in forward
|
daysInForward: Days in forward
|
||||||
|
isRaid: Raid
|
||||||
thermographs:
|
thermographs:
|
||||||
temperature: Temperature
|
temperature: Temperature
|
||||||
destination: Destination
|
destination: Destination
|
||||||
|
|
|
@ -761,6 +761,7 @@ travel:
|
||||||
hb: HB
|
hb: HB
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Días redada
|
daysInForward: Días redada
|
||||||
|
isRaid: Redada
|
||||||
thermographs:
|
thermographs:
|
||||||
temperature: Temperatura
|
temperature: Temperatura
|
||||||
destination: Destino
|
destination: Destino
|
||||||
|
|
|
@ -221,7 +221,7 @@ onMounted(async () => {
|
||||||
t('entry.list.tableVisibleColumns.isExcludedFromAvailable')
|
t('entry.list.tableVisibleColumns.isExcludedFromAvailable')
|
||||||
}}</QTooltip>
|
}}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
|
<QIcon v-if="!!row.isRaid" name="vn:net" color="primary">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{
|
{{
|
||||||
t('globals.raid', { daysInForward: row.daysInForward })
|
t('globals.raid', { daysInForward: row.daysInForward })
|
||||||
|
|
|
@ -21,12 +21,7 @@ const agenciesOptions = ref([]);
|
||||||
@on-fetch="(data) => (agenciesOptions = data)"
|
@on-fetch="(data) => (agenciesOptions = data)"
|
||||||
auto-load
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FormModel
|
<FormModel :url-update="`Travels/${route.params.id}`" model="Travel" auto-load>
|
||||||
:url="`Travels/${route.params.id}`"
|
|
||||||
:url-update="`Travels/${route.params.id}`"
|
|
||||||
model="Travel"
|
|
||||||
auto-load
|
|
||||||
>
|
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.ref" :label="t('globals.reference')" />
|
<VnInput v-model="data.ref" :label="t('globals.reference')" />
|
||||||
|
@ -78,6 +73,7 @@ const agenciesOptions = ref([]);
|
||||||
</VnInput>
|
</VnInput>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('travel.summary.delivered')"
|
:label="t('travel.summary.delivered')"
|
||||||
v-model="data.isDelivered"
|
v-model="data.isDelivered"
|
||||||
|
@ -93,7 +89,7 @@ const agenciesOptions = ref([]);
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
raidDays: Al rellenarlo, generamos una redada. Indica los días que un travel se moverá automáticamente en el tiempo
|
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á
|
||||||
en:
|
en:
|
||||||
raidDays: When filling, a raid is generated. Enter the number of days the travel will automatically forward in time
|
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.
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -1,34 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import VnCard from 'components/common/VnCard.vue';
|
import VnCard from 'components/common/VnCard.vue';
|
||||||
import TravelDescriptor from './TravelDescriptor.vue';
|
import TravelDescriptor from './TravelDescriptor.vue';
|
||||||
|
import filter from './TravelFilter.js';
|
||||||
const filter = {
|
|
||||||
fields: [
|
|
||||||
'id',
|
|
||||||
'ref',
|
|
||||||
'shipped',
|
|
||||||
'landed',
|
|
||||||
'totalEntries',
|
|
||||||
'warehouseInFk',
|
|
||||||
'warehouseOutFk',
|
|
||||||
'cargoSupplierFk',
|
|
||||||
'agencyModeFk',
|
|
||||||
],
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'warehouseIn',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'warehouseOut',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnCard
|
<VnCard
|
||||||
|
|
|
@ -7,6 +7,7 @@ import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import useCardDescription from 'src/composables/useCardDescription';
|
import useCardDescription from 'src/composables/useCardDescription';
|
||||||
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
import TravelDescriptorMenuItems from './TravelDescriptorMenuItems.vue';
|
||||||
|
import filter from './TravelFilter.js';
|
||||||
|
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
|
|
||||||
|
@ -21,35 +22,6 @@ const $props = defineProps({
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const filter = {
|
|
||||||
fields: [
|
|
||||||
'id',
|
|
||||||
'ref',
|
|
||||||
'shipped',
|
|
||||||
'landed',
|
|
||||||
'totalEntries',
|
|
||||||
'warehouseInFk',
|
|
||||||
'warehouseOutFk',
|
|
||||||
'cargoSupplierFk',
|
|
||||||
'agencyModeFk',
|
|
||||||
'daysInForward',
|
|
||||||
],
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'warehouseIn',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'warehouseOut',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
@ -65,7 +37,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
:title="data.title"
|
:title="data.title"
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
data-key="travelData"
|
data-key="Travel"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
>
|
>
|
||||||
<template #menu="{ entity }">
|
<template #menu="{ entity }">
|
||||||
|
@ -80,12 +52,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
|
||||||
</template>
|
</template>
|
||||||
<template #icons="{ entity }">
|
<template #icons="{ entity }">
|
||||||
<QCardActions class="q-gutter-x-md">
|
<QCardActions class="q-gutter-x-md">
|
||||||
<QIcon
|
<QIcon v-if="entity.isRaid" name="vn:net" color="primary" size="xs">
|
||||||
v-if="entity.daysInForward"
|
|
||||||
name="vn:net"
|
|
||||||
color="primary"
|
|
||||||
size="xs"
|
|
||||||
>
|
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{
|
{{
|
||||||
t('globals.raid', { daysInForward: entity.daysInForward })
|
t('globals.raid', { daysInForward: entity.daysInForward })
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
export default {
|
||||||
|
fields: [
|
||||||
|
'id',
|
||||||
|
'ref',
|
||||||
|
'shipped',
|
||||||
|
'landed',
|
||||||
|
'totalEntries',
|
||||||
|
'warehouseInFk',
|
||||||
|
'warehouseOutFk',
|
||||||
|
'cargoSupplierFk',
|
||||||
|
'agencyModeFk',
|
||||||
|
'isRaid',
|
||||||
|
'daysInForward',
|
||||||
|
],
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'warehouseIn',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'warehouseOut',
|
||||||
|
scope: {
|
||||||
|
fields: ['name'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
|
@ -268,6 +268,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
:label="t('globals.warehouseOut')"
|
:label="t('globals.warehouseOut')"
|
||||||
:value="travel.warehouseOut?.name"
|
:value="travel.warehouseOut?.name"
|
||||||
/>
|
/>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('travel.basicData.isRaid')"
|
||||||
|
v-model="travel.isRaid"
|
||||||
|
:disable="true"
|
||||||
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('travel.summary.delivered')"
|
:label="t('travel.summary.delivered')"
|
||||||
v-model="travel.isDelivered"
|
v-model="travel.isDelivered"
|
||||||
|
@ -286,6 +291,10 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
||||||
:label="t('globals.warehouseIn')"
|
:label="t('globals.warehouseIn')"
|
||||||
:value="travel.warehouseIn?.name"
|
:value="travel.warehouseIn?.name"
|
||||||
/>
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('travel.basicData.daysInForward')"
|
||||||
|
:value="travel?.daysInForward"
|
||||||
|
/>
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
:label="t('travel.summary.received')"
|
:label="t('travel.summary.received')"
|
||||||
v-model="travel.isReceived"
|
v-model="travel.isReceived"
|
||||||
|
|
|
@ -227,10 +227,12 @@ const columns = computed(() => [
|
||||||
>
|
>
|
||||||
<template #column-status="{ row }">
|
<template #column-status="{ row }">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<QIcon v-if="!!row.daysInForward" name="vn:net" color="primary">
|
<QIcon v-if="!!row.isRaid" name="vn:net" color="primary">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{
|
{{
|
||||||
t('globals.raid', { daysInForward: row.daysInForward })
|
t('globals.raid', {
|
||||||
|
daysInForward: row.daysInForward,
|
||||||
|
})
|
||||||
}}</QTooltip
|
}}</QTooltip
|
||||||
>
|
>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
|
|
Loading…
Reference in New Issue