feat: refs #8087 refs#8087 Redadas en travel #908

Merged
carlosap merged 14 commits from 8087-nuevosCamposTravel into dev 2024-11-21 11:51:52 +00:00
9 changed files with 57 additions and 26 deletions
Showing only changes of commit fc73149dcf - Show all commits

View File

@ -1041,6 +1041,7 @@ travel:
delivered: Delivered
received: Received
daysInForward: Days in forward
isRaid: Raid
thermographs:
code: Code
temperature: Temperature

View File

@ -1039,6 +1039,7 @@ travel:
delivered: Enviada
received: Recibida
daysInForward: Días redada
isRaid: Redada
thermographs:
code: Código
temperature: Temperatura

View File

@ -36,6 +36,7 @@ const canEditZone = useAcl().hasAny([
const agencyFetchRef = ref();
const warehousesOptions = ref([]);
const companiesOptions = ref([]);
const currenciesOptions = ref([]);
const agenciesOptions = ref([]);
const zonesOptions = ref([]);
const addresses = ref([]);
@ -289,6 +290,15 @@ async function getZone(options) {
@on-fetch="(data) => (companiesOptions = data)"
auto-load
/>
<FetchData
url="Currencies"
:filter="{
fields: ['id', 'code'],
order: 'code ASC',
}"
@on-fetch="(data) => (currenciesOptions = data)"
auto-load
/>
<FetchData
ref="agencyFetchRef"
url="AgencyModes/byWarehouse"
@ -395,17 +405,6 @@ async function getZone(options) {
/>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md no-wrap">
<VnSelect
:label="t('basicData.company')"
v-model="formData.companyFk"
option-value="id"
option-label="code"
:options="companiesOptions"
hide-selected
map-options
:required="true"
:rules="validate('basicData.company')"
/>
<VnSelect
:label="t('basicData.agency')"
v-model="agencyModeId"
@ -444,6 +443,30 @@ async function getZone(options) {
</QItem>
</template>
</VnSelect>
<VnSelect
:label="t('basicData.company')"
v-model="formData.companyFk"
option-value="id"
carlosap marked this conversation as resolved Outdated
Outdated
Review

option-value="id" es la opcio per defecte, no caldria ficarlo

option-value="id" es la opcio per defecte, no caldria ficarlo
option-label="code"
:options="companiesOptions"
hide-selected
carlosap marked this conversation as resolved Outdated
Outdated
Review

igaul que estes opcions tambe son por defecte(hide-selected,map-options)

igaul que estes opcions tambe son por defecte(hide-selected,map-options)
map-options
:required="true"
:rules="validate('basicData.company')"
/>
</VnRow>
<VnRow class="row q-gutter-md q-mb-md no-wrap">
<VnSelect
:label="t('basicData.currencyFk')"
v-model="formData.currencyFk"
option-value="id"
option-label="code"
:options="currenciesOptions"
hide-selected
map-options
:required="true"
:rules="validate('basicData.currencyFk')"
/>
</VnRow>
<VnRow>
<VnInputDate

View File

@ -170,6 +170,7 @@ basicData:
negativesConfirmMessage: Negatives are going to be generated, are you sure you want to advance all the lines?
chooseAnOption: Choose an option
unroutedTicket: The ticket has been unrouted
currencyFk: Currency
purchaseRequest:
id: Id
description: Description

View File

@ -88,6 +88,7 @@ basicData:
negativesConfirmMessage: Se van a generar negativos, ¿seguro que quieres adelantar todas las líneas?
chooseAnOption: Elige una opción
unroutedTicket: El ticket ha sido desenrutado
currencyFk: Moneda
weeklyTickets:
id: ID Ticket
client: Cliente

View File

@ -84,6 +84,7 @@ const agenciesOptions = ref([]);
</VnInput>
</VnRow>
<VnRow>
<QCheckbox v-model="data.isRaid" :label="t('travel.basicData.isRaid')" />
<QCheckbox
:label="t('travel.basicData.delivered')"
v-model="data.isDelivered"
@ -99,7 +100,7 @@ const agenciesOptions = ref([]);
<i18n>
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 no se especifican días, la fecha no cambiará
carlosap marked this conversation as resolved Outdated

Si no se especifican días si açò es deixar-ho buit, millor dir-ho així.
Si se deja vacio

`Si no se especifican días ` si açò es deixar-ho buit, millor dir-ho així. `Si se deja vacio`
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 no days are specified, the date will stay the same.
</i18n>

View File

@ -32,6 +32,7 @@ const filter = {
'warehouseOutFk',
'cargoSupplierFk',
'agencyModeFk',
'isRaid',
'daysInForward',
],
include: [
@ -80,12 +81,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.ref, entity.
</template>
<template #icons="{ entity }">
<QCardActions class="q-gutter-x-md">
<QIcon
v-if="entity.daysInForward"
name="vn:net"
color="primary"
size="xs"
>
<QIcon v-if="entity.isRaid" name="vn:net" color="primary" size="xs">
<QTooltip>
{{
t('globals.raid', { daysInForward: entity.daysInForward })

View File

@ -268,6 +268,11 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.wareHouseOut')"
:value="travel.warehouseOut?.name"
/>
<QCheckbox
:label="t('travel.basicData.isRaid')"
v-model="travel.isRaid"
:disable="true"
/>
<QCheckbox
:label="t('travel.summary.delivered')"
v-model="travel.isDelivered"
@ -286,6 +291,10 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.wareHouseIn')"
:value="travel.warehouseIn?.name"
/>
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
<QCheckbox
:label="t('travel.summary.received')"
v-model="travel.isReceived"
@ -303,10 +312,6 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<VnLv :label="t('globals.reference')" :value="travel.ref" />
<VnLv label="m³" :value="travel.m3" />
<VnLv :label="t('globals.totalEntries')" :value="travel.totalEntries" />
<VnLv
:label="t('travel.basicData.daysInForward')"
:value="travel?.daysInForward"
/>
</QCard>
<QCard class="full-width">
<VnTitle :text="t('travel.summary.entries')" />

View File

@ -227,12 +227,14 @@ const columns = computed(() => [
>
<template #column-status="{ 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>
{{
t('globals.raid', { daysInForward: row.daysInForward })
t('globals.raid', {
daysInForward: row.daysInForward,
})
}}</QTooltip
>
>{{ console.log(row.daysInForward) }}
carlosap marked this conversation as resolved Outdated

borrar

borrar
</QIcon>
</div>
</template>