Merge branch 'dev' into 8449-vnLogFilter
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
75a20f7ca7
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
|
@ -18,6 +18,14 @@ const state = useState();
|
||||||
const user = state.getUser();
|
const user = state.getUser();
|
||||||
const appName = 'Lilium';
|
const appName = 'Lilium';
|
||||||
const pinnedModulesRef = ref();
|
const pinnedModulesRef = ref();
|
||||||
|
const hostname = window.location.hostname;
|
||||||
|
const env = ref();
|
||||||
|
|
||||||
|
const getEnvironment = computed(() => {
|
||||||
|
env.value = hostname.split('-');
|
||||||
|
if (env.value.length <= 1) return;
|
||||||
|
return env.value[0];
|
||||||
|
});
|
||||||
|
|
||||||
onMounted(() => stateStore.setMounted());
|
onMounted(() => stateStore.setMounted());
|
||||||
const refresh = () => window.location.reload();
|
const refresh = () => window.location.reload();
|
||||||
|
@ -49,6 +57,9 @@ const refresh = () => window.location.reload();
|
||||||
{{ t('globals.backToDashboard') }}
|
{{ t('globals.backToDashboard') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
<QBadge v-if="getEnvironment" color="primary" align="top">
|
||||||
|
{{ getEnvironment }}
|
||||||
|
</QBadge>
|
||||||
</RouterLink>
|
</RouterLink>
|
||||||
<VnBreadcrumbs v-if="$q.screen.gt.sm" />
|
<VnBreadcrumbs v-if="$q.screen.gt.sm" />
|
||||||
<QSpinner
|
<QSpinner
|
||||||
|
|
|
@ -57,4 +57,5 @@ function handleClick() {
|
||||||
{{ capitalize(type).replace('-', '') }}
|
{{ capitalize(type).replace('-', '') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
|
{{ phoneNumber }}
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -43,7 +43,7 @@ const val = computed(() => $props.value);
|
||||||
<span style="color: var(--vn-label-color)">{{ label }}</span>
|
<span style="color: var(--vn-label-color)">{{ label }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value" v-if="value || $slots.value">
|
||||||
<slot name="value">
|
<slot name="value">
|
||||||
<span :title="value" style="text-overflow: ellipsis">
|
<span :title="value" style="text-overflow: ellipsis">
|
||||||
{{ dash ? dashIfEmpty(value) : value }}
|
{{ dash ? dashIfEmpty(value) : value }}
|
||||||
|
|
|
@ -847,6 +847,7 @@ travel:
|
||||||
availabledHour: Availabled hour
|
availabledHour: Availabled hour
|
||||||
thermographs: Thermographs
|
thermographs: Thermographs
|
||||||
hb: HB
|
hb: HB
|
||||||
|
roundedCc: Rounded CC
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Automatic movement (Raid)
|
daysInForward: Automatic movement (Raid)
|
||||||
isRaid: Raid
|
isRaid: Raid
|
||||||
|
|
|
@ -930,6 +930,7 @@ travel:
|
||||||
availabled: F. Disponible
|
availabled: F. Disponible
|
||||||
availabledHour: Hora Disponible
|
availabledHour: Hora Disponible
|
||||||
hb: HB
|
hb: HB
|
||||||
|
roundedCc: CC redondeado
|
||||||
basicData:
|
basicData:
|
||||||
daysInForward: Desplazamiento automatico (redada)
|
daysInForward: Desplazamiento automatico (redada)
|
||||||
isRaid: Redada
|
isRaid: Redada
|
||||||
|
|
|
@ -8,6 +8,6 @@ import filter from './EntryFilter.js';
|
||||||
data-key="Entry"
|
data-key="Entry"
|
||||||
url="Entries"
|
url="Entries"
|
||||||
:descriptor="EntryDescriptor"
|
:descriptor="EntryDescriptor"
|
||||||
:filter="filter"
|
:filter="{ ...filter, where: { id: $route.params.id } }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -249,7 +249,6 @@ function getBadgeAttrs(row) {
|
||||||
let timeDiff = today - timeTicket;
|
let timeDiff = today - timeTicket;
|
||||||
|
|
||||||
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
|
||||||
switch (row.entryTypeCode) {
|
switch (row.entryTypeCode) {
|
||||||
case 'regularization':
|
case 'regularization':
|
||||||
case 'life':
|
case 'life':
|
||||||
|
@ -274,6 +273,7 @@ function getBadgeAttrs(row) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
||||||
return { color: 'transparent' };
|
return { color: 'transparent' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,27 +216,23 @@ onMounted(async () => {
|
||||||
:value="toDate(entity.landed)"
|
:value="toDate(entity.landed)"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
<VnLv :label="t('globals.packages')" :value="entity.packages" />
|
||||||
<VnLv :value="entity.address.phone">
|
<VnLv :label="t('ticket.summary.consigneePhone')">
|
||||||
<template #label>
|
<template #value>
|
||||||
{{ t('ticket.summary.consigneePhone') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.address.phone" />
|
<VnLinkPhone :phone-number="entity.address.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="entity.address.mobile">
|
<VnLv :label="t('ticket.summary.consigneeMobile')">
|
||||||
<template #label>
|
<template #value>
|
||||||
{{ t('ticket.summary.consigneeMobile') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.address.mobile" />
|
<VnLinkPhone :phone-number="entity.address.mobile" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="entity.client.phone">
|
<VnLv :label="t('ticket.summary.clientPhone')">
|
||||||
<template #label>
|
<template #value>
|
||||||
{{ t('ticket.summary.clientPhone') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.client.phone" />
|
<VnLinkPhone :phone-number="entity.client.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :value="entity.client.mobile">
|
<VnLv :label="t('ticket.summary.clientMobile')">
|
||||||
<template #label>
|
<template #value>
|
||||||
{{ t('ticket.summary.clientMobile') }}
|
|
||||||
<VnLinkPhone :phone-number="entity.client.mobile" />
|
<VnLinkPhone :phone-number="entity.client.mobile" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
|
|
|
@ -89,6 +89,13 @@ const entriesTableColumns = computed(() => {
|
||||||
showValue: true,
|
showValue: true,
|
||||||
},
|
},
|
||||||
{ label: 'CC', field: 'cc', name: 'cc', align: 'left', showValue: true },
|
{ label: 'CC', field: 'cc', name: 'cc', align: 'left', showValue: true },
|
||||||
|
{
|
||||||
|
label: t('travel.summary.roundedCc'),
|
||||||
|
field: 'cc',
|
||||||
|
name: 'roundedCc',
|
||||||
|
align: 'left',
|
||||||
|
showValue: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Pallet',
|
label: 'Pallet',
|
||||||
field: 'pallet',
|
field: 'pallet',
|
||||||
|
@ -191,14 +198,15 @@ const entriesTotals = computed(() => {
|
||||||
freightValue: 0,
|
freightValue: 0,
|
||||||
packageValue: 0,
|
packageValue: 0,
|
||||||
cc: 0,
|
cc: 0,
|
||||||
|
roundedCc: 0,
|
||||||
pallet: 0,
|
pallet: 0,
|
||||||
m3: 0,
|
m3: 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
entriesTableRows.value.forEach((row) => {
|
entriesTableRows.value.forEach((row) => {
|
||||||
for (const key in totals) {
|
for (const key in totals) {
|
||||||
if (key === 'cc') {
|
if (key === 'roundedCc') {
|
||||||
totals[key] += Math.ceil(row[key] || 0);
|
totals['roundedCc'] += Math.ceil(row['cc'] || 0);
|
||||||
} else {
|
} else {
|
||||||
totals[key] += row[key] || 0;
|
totals[key] += row[key] || 0;
|
||||||
}
|
}
|
||||||
|
@ -210,6 +218,7 @@ const entriesTotals = computed(() => {
|
||||||
freight: toCurrency(totals.freightValue),
|
freight: toCurrency(totals.freightValue),
|
||||||
packageValue: toCurrency(totals.packageValue),
|
packageValue: toCurrency(totals.packageValue),
|
||||||
cc: totals.cc.toFixed(2),
|
cc: totals.cc.toFixed(2),
|
||||||
|
roundedCc: totals.roundedCc,
|
||||||
pallet: totals.pallet.toFixed(2),
|
pallet: totals.pallet.toFixed(2),
|
||||||
m3: totals.m3.toFixed(2),
|
m3: totals.m3.toFixed(2),
|
||||||
};
|
};
|
||||||
|
@ -374,6 +383,11 @@ onMounted(async () => {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-roundedCc="{ col, value }">
|
||||||
|
<QTd>
|
||||||
|
{{ Math.ceil(value) || 0 }}
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
<template #body-cell-observation="{ value }">
|
<template #body-cell-observation="{ value }">
|
||||||
<QTd>
|
<QTd>
|
||||||
<QIcon name="insert_drive_file" color="primary" size="24px">
|
<QIcon name="insert_drive_file" color="primary" size="24px">
|
||||||
|
@ -390,6 +404,7 @@ onMounted(async () => {
|
||||||
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.freight }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.packageValue }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.cc }}</QTd>
|
||||||
|
<QTd class="text-bold">{{ entriesTotals.roundedCc }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.pallet }}</QTd>
|
||||||
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
<QTd class="text-bold">{{ entriesTotals.m3 }}</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue