Merge branch 'dev' into 8604-FixTicketFuture
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
11dc113213
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue';
|
import { ref, computed, onMounted } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
import VnLv from 'components/ui/VnLv.vue';
|
||||||
|
@ -16,10 +16,76 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const zone = ref();
|
||||||
|
const zoneId = ref();
|
||||||
const entityId = computed(() => {
|
const entityId = computed(() => {
|
||||||
return $props.id || route.params.id;
|
return $props.id || route.params.id;
|
||||||
});
|
});
|
||||||
|
const getZone = async () => {
|
||||||
|
const filter = {
|
||||||
|
where: { routeFk: $props.id ? $props.id : route.params.id },
|
||||||
|
};
|
||||||
|
const { data } = await axios.get('Tickets/findOne', {
|
||||||
|
params: {
|
||||||
|
filter: JSON.stringify(filter),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
zoneId.value = data.zoneFk;
|
||||||
|
const { data: zoneData } = await axios.get(`Zones/${zoneId.value}`);
|
||||||
|
zone.value = zoneData.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
fields: [
|
||||||
|
'id',
|
||||||
|
'workerFk',
|
||||||
|
'agencyModeFk',
|
||||||
|
'dated',
|
||||||
|
'm3',
|
||||||
|
'warehouseFk',
|
||||||
|
'description',
|
||||||
|
'vehicleFk',
|
||||||
|
'kmStart',
|
||||||
|
'kmEnd',
|
||||||
|
'started',
|
||||||
|
'finished',
|
||||||
|
'cost',
|
||||||
|
'isOk',
|
||||||
|
],
|
||||||
|
include: [
|
||||||
|
{ relation: 'agencyMode', scope: { fields: ['id', 'name'] } },
|
||||||
|
{
|
||||||
|
relation: 'vehicle',
|
||||||
|
scope: { fields: ['id', 'm3'] },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'ticket',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'name', 'zoneFk'],
|
||||||
|
include: { relation: 'zone', scope: { fields: ['id', 'name'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'worker',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: {
|
||||||
|
relation: 'user',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: { relation: 'emailUser', scope: { fields: ['email'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const data = ref(useCardDescription());
|
||||||
|
const setData = (entity) => (data.value = useCardDescription(entity.code, entity.id));
|
||||||
|
onMounted(async () => {
|
||||||
|
getZone();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardDescriptor
|
<CardDescriptor
|
||||||
|
@ -30,9 +96,9 @@ const entityId = computed(() => {
|
||||||
width="lg-width"
|
width="lg-width"
|
||||||
>
|
>
|
||||||
<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="zone" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="$t('Volume')"
|
:label="$t('Volume')"
|
||||||
:value="`${dashIfEmpty(entity?.m3)} / ${dashIfEmpty(
|
:value="`${dashIfEmpty(entity?.m3)} / ${dashIfEmpty(
|
||||||
|
|
|
@ -29,6 +29,51 @@ const defaultInitialData = {
|
||||||
};
|
};
|
||||||
const maxDistance = ref();
|
const maxDistance = ref();
|
||||||
|
|
||||||
|
const routeFilter = {
|
||||||
|
fields: [
|
||||||
|
'id',
|
||||||
|
'workerFk',
|
||||||
|
'agencyModeFk',
|
||||||
|
'dated',
|
||||||
|
'm3',
|
||||||
|
'warehouseFk',
|
||||||
|
'description',
|
||||||
|
'vehicleFk',
|
||||||
|
'kmStart',
|
||||||
|
'kmEnd',
|
||||||
|
'started',
|
||||||
|
'finished',
|
||||||
|
'cost',
|
||||||
|
'isOk',
|
||||||
|
],
|
||||||
|
include: [
|
||||||
|
{ relation: 'agencyMode', scope: { fields: ['id', 'name'] } },
|
||||||
|
{
|
||||||
|
relation: 'vehicle',
|
||||||
|
scope: { fields: ['id', 'm3'] },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'ticket',
|
||||||
|
scope: {
|
||||||
|
fields: ['id', 'name', 'zoneFk'],
|
||||||
|
include: { relation: 'zone', scope: { fields: ['id', 'name'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
relation: 'worker',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: {
|
||||||
|
relation: 'user',
|
||||||
|
scope: {
|
||||||
|
fields: ['id'],
|
||||||
|
include: { relation: 'emailUser', scope: { fields: ['email'] } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
const onSave = (data, response) => {
|
const onSave = (data, response) => {
|
||||||
if (isNew) {
|
if (isNew) {
|
||||||
axios.post(`Routes/${response?.id}/updateWorkCenter`);
|
axios.post(`Routes/${response?.id}/updateWorkCenter`);
|
||||||
|
|
|
@ -8,6 +8,11 @@ import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
|
||||||
const sectors = ref([]);
|
const sectors = ref([]);
|
||||||
const sectorFilter = { fields: ['id', 'description'] };
|
const sectorFilter = { fields: ['id', 'description'] };
|
||||||
|
|
||||||
|
const filter = {
|
||||||
|
fields: ['sectorFk', 'code', 'pickingOrder'],
|
||||||
|
include: [{ relation: 'sector', scope: sectorFilter }],
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -26,10 +31,6 @@ const sectorFilter = { fields: ['id', 'description'] };
|
||||||
:label="$t('parking.pickingOrder')"
|
:label="$t('parking.pickingOrder')"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
|
||||||
<VnInput v-model="data.row" :label="$t('parking.row')" />
|
|
||||||
<VnInput v-model="data.column" :label="$t('parking.column')" />
|
|
||||||
</VnRow>
|
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
v-model="data.sectorFk"
|
v-model="data.sectorFk"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Picking order
|
pickingOrder: Picking order
|
||||||
sector: Sector
|
sector: Sector
|
||||||
row: Row
|
|
||||||
column: Column
|
|
||||||
search: Search parking
|
search: Search parking
|
||||||
searchInfo: You can search by parking code
|
searchInfo: You can search by parking code
|
|
@ -1,7 +1,5 @@
|
||||||
parking:
|
parking:
|
||||||
pickingOrder: Orden de recogida
|
pickingOrder: Orden de recogida
|
||||||
row: Fila
|
|
||||||
sector: Sector
|
sector: Sector
|
||||||
column: Columna
|
|
||||||
search: Buscar parking
|
search: Buscar parking
|
||||||
searchInfo: Puedes buscar por código de parking
|
searchInfo: Puedes buscar por código de parking
|
Loading…
Reference in New Issue