Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into beta
gitea/salix-front/pipeline/pr-master This commit looks good Details
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2024-12-18 12:07:41 +01:00
commit 44ee641414
16 changed files with 229 additions and 237 deletions

View File

@ -361,7 +361,7 @@ function handleOnDataSave({ CrudModelRef }) {
@on-fetch="(data) => (warehousesOptions = data)" @on-fetch="(data) => (warehousesOptions = data)"
auto-load auto-load
url="Warehouses" url="Warehouses"
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }" :filter="{ fields: ['id', 'name'], order: 'name ASC' }"
/> />
<RightMenu> <RightMenu>
<template #right-panel> <template #right-panel>
@ -394,7 +394,6 @@ function handleOnDataSave({ CrudModelRef }) {
/> />
</template> </template>
</VnSubToolbar> </VnSubToolbar>
<QPage>
<VnTable <VnTable
@on-fetch=" @on-fetch="
(data) => (data) =>
@ -425,15 +424,12 @@ function handleOnDataSave({ CrudModelRef }) {
'row-key': 'id', 'row-key': 'id',
selection: 'multiple', selection: 'multiple',
}" }"
:crud-model="{ :use-model="true"
disableInfiniteScroll: true,
}"
v-model:selected="rowsSelected" v-model:selected="rowsSelected"
:create-as-dialog="false" :create-as-dialog="false"
:create="{ :create="{
onDataSaved: handleOnDataSave, onDataSaved: handleOnDataSave,
}" }"
:use-model="true"
:disable-option="{ card: true }" :disable-option="{ card: true }"
> >
<template #header-selection="scope"> <template #header-selection="scope">
@ -578,7 +574,6 @@ function handleOnDataSave({ CrudModelRef }) {
@on-data-saved="onEditCellDataSaved()" @on-data-saved="onEditCellDataSaved()"
/> />
</QDialog> </QDialog>
</QPage>
</template> </template>
<style lang="scss"> <style lang="scss">
.q-table th, .q-table th,

View File

@ -29,7 +29,7 @@ const exprBuilder = (param, value) => {
return { 'a.supplierName': value }; return { 'a.supplierName': value };
case 'routeFk': case 'routeFk':
return { 'a.routeFk': value }; return { 'a.routeFk': value };
case 'created': case 'dated':
case 'agencyFk': case 'agencyFk':
case 'packages': case 'packages':
case 'm3': case 'm3':
@ -145,7 +145,7 @@ const exprBuilder = (param, value) => {
<QItem class="q-my-sm"> <QItem class="q-my-sm">
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
v-model="params.created" v-model="params.dated"
:label="t('Date')" :label="t('Date')"
is-outlined is-outlined
/> />

View File

@ -28,7 +28,7 @@ const filter = {
'id', 'id',
'workerFk', 'workerFk',
'agencyModeFk', 'agencyModeFk',
'created', 'dated',
'm3', 'm3',
'warehouseFk', 'warehouseFk',
'description', 'description',
@ -78,7 +78,7 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
@on-fetch="setData" @on-fetch="setData"
> >
<template #body="{ entity }"> <template #body="{ entity }">
<VnLv :label="t('Date')" :value="toDate(entity?.created)" /> <VnLv :label="t('Date')" :value="toDate(entity?.dated)" />
<VnLv :label="t('Agency')" :value="entity?.agencyMode?.name" /> <VnLv :label="t('Agency')" :value="entity?.agencyMode?.name" />
<VnLv :label="t('Zone')" :value="entity?.zone?.name" /> <VnLv :label="t('Zone')" :value="entity?.zone?.name" />
<VnLv <VnLv

View File

@ -19,7 +19,7 @@ const shelvingId = ref(route.params?.id || null);
const isNew = Boolean(!shelvingId.value); const isNew = Boolean(!shelvingId.value);
const defaultInitialData = { const defaultInitialData = {
agencyModeFk: null, agencyModeFk: null,
created: null, dated: null,
description: '', description: '',
vehicleFk: null, vehicleFk: null,
workerFk: null, workerFk: null,
@ -32,7 +32,7 @@ const routeFilter = {
'id', 'id',
'workerFk', 'workerFk',
'agencyModeFk', 'agencyModeFk',
'created', 'dated',
'm3', 'm3',
'warehouseFk', 'warehouseFk',
'description', 'description',
@ -134,7 +134,7 @@ const onSave = (data, response) => {
option-label="name" option-label="name"
:input-debounce="0" :input-debounce="0"
/> />
<VnInputDate v-model="data.created" :label="t('Created')" /> <VnInputDate v-model="data.dated" :label="t('Dated')" />
</VnRow> </VnRow>
<template v-if="!isNew"> <template v-if="!isNew">
<VnRow> <VnRow>
@ -188,7 +188,7 @@ es:
Hour finished: Hora fin Hour finished: Hora fin
Description: Descripción Description: Descripción
Is served: Se ha servido Is served: Se ha servido
Created: Creado Dated: Fecha
The km can not exceed: La distancia debe ser inferior a {maxDistance} The km can not exceed: La distancia debe ser inferior a {maxDistance}
en: en:
The km can not exceed: Distance must be lesser than {maxDistance} The km can not exceed: Distance must be lesser than {maxDistance}

View File

@ -139,7 +139,7 @@ const ticketColumns = ref([
<QCard class="vn-one"> <QCard class="vn-one">
<VnLv <VnLv
:label="t('route.summary.date')" :label="t('route.summary.date')"
:value="toDate(entity?.route.created)" :value="toDate(entity?.route.dated)"
/> />
<VnLv <VnLv
:label="t('route.summary.agency')" :label="t('route.summary.agency')"

View File

@ -46,10 +46,10 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'created', name: 'dated',
label: t('Date'), label: t('Date'),
columnFilter: false, columnFilter: false,
format: ({ created }) => toDate(created), format: ({ dated }) => toDate(dated),
}, },
{ {
align: 'left', align: 'left',

View File

@ -111,7 +111,7 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'created', name: 'dated',
label: t('route.Date'), label: t('route.Date'),
columnFilter: false, columnFilter: false,
cardVisible: true, cardVisible: true,

View File

@ -45,7 +45,7 @@ const columns = computed(() => [
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
}, },
format: ({ created }) => toDate(created), format: ({ dated }) => toDate(dated),
cardVisible: true, cardVisible: true,
}, },
{ {

View File

@ -109,7 +109,7 @@ const ticketList = ref([]);
const cloneRoutes = () => { const cloneRoutes = () => {
axios.post('Routes/clone', { axios.post('Routes/clone', {
created: startingDate.value, dated: startingDate.value,
ids: selectedRows.value.map((row) => row?.id), ids: selectedRows.value.map((row) => row?.id),
}); });
refreshKey.value++; refreshKey.value++;

View File

@ -5,7 +5,7 @@ route:
Description: Description Description: Description
hourStarted: H.Start hourStarted: H.Start
hourFinished: H.End hourFinished: H.End
createRoute: Create route dated: Dated
From: From From: From
To: To To: To
Date: Date Date: Date

View File

@ -23,13 +23,13 @@ const countriesOptions = ref([]);
<template> <template>
<FetchData <FetchData
url="Provinces" url="Provinces"
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }" :filter="{ fields: ['id', 'name'], order: 'name ASC'}"
@on-fetch="(data) => (provincesOptions = data)" @on-fetch="(data) => (provincesOptions = data)"
auto-load auto-load
/> />
<FetchData <FetchData
url="countries" url="countries"
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }" :filter="{ fields: ['id', 'name'], order: 'name ASC'}"
@on-fetch="(data) => (countriesOptions = data)" @on-fetch="(data) => (countriesOptions = data)"
auto-load auto-load
/> />

View File

@ -8,7 +8,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import VnTitle from 'src/components/common/VnTitle.vue'; import VnTitle from 'src/components/common/VnTitle.vue';
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue'; import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
import FetchData from 'src/components/FetchData.vue'; import FetchData from 'src/components/FetchData.vue';
import VnRow from 'components/ui/VnRow.vue';
import { toDate, toCurrency } from 'src/filters'; import { toDate, toCurrency } from 'src/filters';
import axios from 'axios'; import axios from 'axios';
@ -256,16 +256,20 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
:label="t('globals.warehouseOut')" :label="t('globals.warehouseOut')"
:value="travel.warehouseOut?.name" :value="travel.warehouseOut?.name"
/> />
<VnRow>
<QCheckbox <QCheckbox
:label="t('travel.basicData.isRaid')" :label="t('travel.basicData.isRaid')"
v-model="travel.isRaid" v-model="travel.isRaid"
:disable="true" :disable="true"
/> />
</VnRow>
<VnRow>
<QCheckbox <QCheckbox
:label="t('travel.summary.delivered')" :label="t('travel.summary.delivered')"
v-model="travel.isDelivered" v-model="travel.isDelivered"
:disable="true" :disable="true"
/> />
</VnRow>
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
@ -320,7 +324,6 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
<QTd> <QTd>
<QCheckbox <QCheckbox
v-if="col.name === 'isConfirmed'" v-if="col.name === 'isConfirmed'"
:label="t('travel.summary.received')"
:true-value="1" :true-value="1"
:false-value="0" :false-value="0"
v-model="row[col.name]" v-model="row[col.name]"

View File

@ -77,7 +77,6 @@ defineExpose({ states });
:label="t('travel.shipped')" :label="t('travel.shipped')"
v-model="params.shipped" v-model="params.shipped"
@update:model-value="searchFn()" @update:model-value="searchFn()"
dense
outlined outlined
rounded rounded
/> />
@ -153,7 +152,7 @@ es:
Id: Id Id: Id
ref: Referencia ref: Referencia
agency: Agencia agency: Agencia
warehouseInFk: Alm.Salida warehouseInFk: Alm.Entrada
shipped: F.Envío shipped: F.Envío
shipmentHour: Hora de envío shipmentHour: Hora de envío
warehouseOut: Alm.Entrada warehouseOut: Alm.Entrada

View File

@ -54,7 +54,9 @@ const columns = computed(() => [
name: 'id', name: 'id',
label: t('globals.id'), label: t('globals.id'),
isId: true, isId: true,
cardVisible: true, chip: {
condition: () => true,
},
}, },
{ {
align: 'left', align: 'left',
@ -64,7 +66,7 @@ const columns = computed(() => [
columnField: { columnField: {
component: null, component: null,
}, },
cardVisible: true, isTitle: true,
create: true, create: true,
}, },
{ {
@ -103,14 +105,14 @@ const columns = computed(() => [
}, },
{ {
align: 'left', align: 'left',
name: 'shipped',
label: t('globals.shipped'), label: t('globals.shipped'),
name: 'shipped',
create: true,
cardVisible: true,
component: 'date', component: 'date',
columnField: { columnField: {
component: null, component: null,
}, },
cardVisible: true,
create: true,
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)), format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)),
}, },
{ {
@ -201,7 +203,7 @@ const columns = computed(() => [
/> />
<RightMenu> <RightMenu>
<template #right-panel> <template #right-panel>
<TravelFilter data-key="TravelList" ref="travelFilterRef" /> <TravelFilter data-key="TravelList" />
</template> </template>
</RightMenu> </RightMenu>
<VnTable <VnTable

View File

@ -103,9 +103,12 @@ const formattedWeekTotalHours = computed(() =>
const onInputChange = async (date) => { const onInputChange = async (date) => {
if (!date) return; if (!date) return;
const { year, month, day } = date.scope.timestamp; const { timestamp, outside } = date.scope;
const { year, month, day } = timestamp;
const _date = new Date(year, month - 1, day); const _date = new Date(year, month - 1, day);
setDate(_date); setDate(_date);
if (outside) getMailStates(_date);
}; };
const setDate = async (date) => { const setDate = async (date) => {
@ -378,7 +381,7 @@ const isUnsatisfied = async (reason) => {
const resendEmail = async () => { const resendEmail = async () => {
const params = { const params = {
recipient: worker.value?.user?.email, recipient: worker.value[0]?.user?.emailUser?.email,
week: selectedWeekNumber.value, week: selectedWeekNumber.value,
year: selectedDate.value.getFullYear(), year: selectedDate.value.getFullYear(),
workerId: Number(route.params.id), workerId: Number(route.params.id),

View File

@ -16,24 +16,14 @@ const actions = {
clone: async () => { clone: async () => {
const opts = { message: t('Zone cloned'), type: 'positive' }; const opts = { message: t('Zone cloned'), type: 'positive' };
try {
const { data } = await axios.post(`Zones/${zoneId}/clone`, {}); const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
notify(opts); notify(opts);
push(`/zone/${data.id}/basic-data`); push(`/zone/${data.id}/basic-data`);
} catch (e) {
opts.message = t('It was not able to clone the zone');
opts.type = 'negative';
}
}, },
remove: async () => { remove: async () => {
try {
await axios.post(`Zones/${zoneId}/deleteZone`); await axios.post(`Zones/${zoneId}/deleteZone`);
notify({ message: t('Zone deleted'), type: 'positive' }); notify({ message: t('Zone deleted'), type: 'positive' });
push({ name: 'ZoneList' }); push({ name: 'ZoneList' });
} catch (e) {
notify({ message: e.message, type: 'negative' });
}
}, },
}; };
function openConfirmDialog(callback) { function openConfirmDialog(callback) {