Merge branch 'dev' into 8717-reviewAndFixAgencySection
This commit is contained in:
commit
7bc793cfb7
|
@ -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 }}
|
||||||
|
|
|
@ -248,7 +248,7 @@ 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: 'warning', 'text-color': 'black' };
|
||||||
switch (row.entryTypeCode) {
|
switch (row.entryTypeCode) {
|
||||||
case 'regularization':
|
case 'regularization':
|
||||||
case 'life':
|
case 'life':
|
||||||
|
@ -273,7 +273,7 @@ function getBadgeAttrs(row) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (timeDiff < 0) return { color: 'warning', 'text-color': 'black' };
|
if (timeDiff > 0) return { color: 'info', 'text-color': 'black' };
|
||||||
return { color: 'transparent' };
|
return { color: 'transparent' };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from '../Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
|
||||||
import { toDateFormat } from 'src/filters/date.js';
|
import { toDateFormat } from 'src/filters/date.js';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
import VnRow from 'src/components/ui/VnRow.vue';
|
import VnRow from 'src/components/ui/VnRow.vue';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
|
import useOpenURL from 'src/composables/useOpenURL';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const dates = dateRange(Date.vnNew());
|
const dates = dateRange(Date.vnNew());
|
||||||
|
@ -94,6 +95,7 @@ const columns = computed(() => [
|
||||||
columnClass: 'no-padding',
|
columnClass: 'no-padding',
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const openTab = (id) => useOpenURL(`#/customer/${id}/summary`);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -113,6 +115,8 @@ const columns = computed(() => [
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
dense
|
dense
|
||||||
class="q-px-none"
|
class="q-px-none"
|
||||||
|
:row-click="({ id }) => openTab(id)"
|
||||||
|
:row-ctrl-click="(_, { id }) => openTab(id)"
|
||||||
>
|
>
|
||||||
<template #top-left>
|
<template #top-left>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -121,12 +125,16 @@ const columns = computed(() => [
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
<template #column-departmentFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<span class="link" :title="row.department" v-text="row.department" />
|
<span @click.stop.prevent class="link" :title="row.department">
|
||||||
<WorkerDescriptorProxy :id="row.departmentFk" dense />
|
{{ row.department }}
|
||||||
|
<DepartmentDescriptorProxy :id="row.departmentFk" dense
|
||||||
|
/></span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-clientFk="{ row }">
|
<template #column-clientFk="{ row }">
|
||||||
<span class="link" :title="row.clientName" v-text="row.clientName" />
|
<span @click.stop.prevent class="link" :title="row.clientName">
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
{{ row.clientName }}
|
||||||
|
<CustomerDescriptorProxy :id="row.clientFk" dense
|
||||||
|
/></span>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -9,6 +9,7 @@ import { toDateFormat, toDateTimeFormat } from 'src/filters/date.js';
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency } from 'src/filters';
|
||||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import useOpenURL from 'src/composables/useOpenURL';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openConfirmationModal } = useVnConfirm();
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
|
@ -108,8 +109,7 @@ const removeOrders = async () => {
|
||||||
await table.value.reload();
|
await table.value.reload();
|
||||||
};
|
};
|
||||||
|
|
||||||
const openTab = (id) =>
|
const openTab = (id) => useOpenURL(`#/order/${id}/summary`);
|
||||||
window.open(`#/order/${id}/summary`, '_blank', 'noopener, noreferrer');
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnTable
|
<VnTable
|
||||||
|
@ -129,6 +129,7 @@ const openTab = (id) =>
|
||||||
}"
|
}"
|
||||||
default-mode="table"
|
default-mode="table"
|
||||||
:row-click="({ id }) => openTab(id)"
|
:row-click="({ id }) => openTab(id)"
|
||||||
|
:row-ctrl-click="(_, { id }) => openTab(id)"
|
||||||
v-model:selected="selectedRows"
|
v-model:selected="selectedRows"
|
||||||
:disable-option="{ card: true }"
|
:disable-option="{ card: true }"
|
||||||
>
|
>
|
||||||
|
@ -177,16 +178,16 @@ const openTab = (id) =>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #column-clientFk="{ row }">
|
<template #column-clientFk="{ row }">
|
||||||
<QTd @click.stop>
|
<span class="link" @click.stop :title="row.clientName">
|
||||||
<span class="link" v-text="row.clientName" :title="row.clientName" />
|
{{ row.clientName }}
|
||||||
<CustomerDescriptorProxy :id="row.clientFk" />
|
<CustomerDescriptorProxy :id="row.clientFk" dense
|
||||||
</QTd>
|
/></span>
|
||||||
</template>
|
</template>
|
||||||
<template #column-departmentFk="{ row }">
|
<template #column-departmentFk="{ row }">
|
||||||
<QTd @click.stop>
|
<span class="link" @click.stop :title="row.departmentName">
|
||||||
<span class="link" v-text="row.departmentName" />
|
{{ row.departmentName }}
|
||||||
<DepartmentDescriptorProxy :id="row.departmentFk" dense />
|
<DepartmentDescriptorProxy :id="row.departmentFk" dense
|
||||||
</QTd>
|
/></span>
|
||||||
</template>
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -449,21 +449,19 @@ const openTab = (id) => useOpenURL(`#/ticket/${id}/sale`);
|
||||||
<span :title="row.province" v-text="row.province" />
|
<span :title="row.province" v-text="row.province" />
|
||||||
</template>
|
</template>
|
||||||
<template #column-state="{ row }">
|
<template #column-state="{ row }">
|
||||||
<div @click.stop.prevent>
|
<div v-if="row.refFk" @click.stop.prevent>
|
||||||
<div v-if="row.refFk">
|
<span class="link">{{ row.refFk }}</span>
|
||||||
<span class="link">{{ row.refFk }}</span>
|
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
||||||
<InvoiceOutDescriptorProxy :id="row.invoiceOutId" />
|
|
||||||
</div>
|
|
||||||
<QBadge
|
|
||||||
v-else
|
|
||||||
:color="stateColors[row.classColor] || 'transparent'"
|
|
||||||
:text-color="stateColors[row.classColor] ? 'black' : 'white'"
|
|
||||||
class="q-pa-sm"
|
|
||||||
style="font-size: 14px"
|
|
||||||
>
|
|
||||||
{{ row.state }}
|
|
||||||
</QBadge>
|
|
||||||
</div>
|
</div>
|
||||||
|
<QBadge
|
||||||
|
v-else
|
||||||
|
:color="stateColors[row.classColor] || 'transparent'"
|
||||||
|
:text-color="stateColors[row.classColor] ? 'black' : 'white'"
|
||||||
|
class="q-pa-sm"
|
||||||
|
style="font-size: 14px"
|
||||||
|
>
|
||||||
|
{{ row.state }}
|
||||||
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
<template #column-isFragile="{ row }">
|
<template #column-isFragile="{ row }">
|
||||||
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
|
<QIcon v-if="row.isFragile" name="local_bar" color="primary" size="sm">
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -141,7 +141,6 @@ const columns = computed(() => [
|
||||||
label: 'id',
|
label: 'id',
|
||||||
field: 'id',
|
field: 'id',
|
||||||
name: 'id',
|
name: 'id',
|
||||||
align: 'center',
|
|
||||||
showValue: true,
|
showValue: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -165,7 +164,7 @@ const columns = computed(() => [
|
||||||
label: t('globals.amount'),
|
label: t('globals.amount'),
|
||||||
name: 'invoiceAmount',
|
name: 'invoiceAmount',
|
||||||
field: 'entries',
|
field: 'entries',
|
||||||
align: 'left',
|
align: 'right',
|
||||||
showValue: true,
|
showValue: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
format: (value) =>
|
format: (value) =>
|
||||||
|
@ -190,7 +189,7 @@ const columns = computed(() => [
|
||||||
label: t('globals.packages'),
|
label: t('globals.packages'),
|
||||||
field: 'stickers',
|
field: 'stickers',
|
||||||
name: 'stickers',
|
name: 'stickers',
|
||||||
align: 'left',
|
align: 'right',
|
||||||
showValue: true,
|
showValue: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -198,7 +197,7 @@ const columns = computed(() => [
|
||||||
label: '%',
|
label: '%',
|
||||||
field: '',
|
field: '',
|
||||||
name: 'percentage',
|
name: 'percentage',
|
||||||
align: 'center',
|
align: 'right',
|
||||||
showValue: false,
|
showValue: false,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -214,7 +213,7 @@ const columns = computed(() => [
|
||||||
label: t('extraCommunity.physicKg'),
|
label: t('extraCommunity.physicKg'),
|
||||||
field: 'loadedKg',
|
field: 'loadedKg',
|
||||||
name: 'loadedKg',
|
name: 'loadedKg',
|
||||||
align: 'left',
|
align: 'right',
|
||||||
showValue: true,
|
showValue: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -222,7 +221,7 @@ const columns = computed(() => [
|
||||||
label: 'KG Vol.',
|
label: 'KG Vol.',
|
||||||
field: 'volumeKg',
|
field: 'volumeKg',
|
||||||
name: 'volumeKg',
|
name: 'volumeKg',
|
||||||
align: 'left',
|
align: 'right',
|
||||||
showValue: true,
|
showValue: true,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
|
@ -277,7 +276,6 @@ async function getData() {
|
||||||
const onStoreDataChange = () => {
|
const onStoreDataChange = () => {
|
||||||
const newData = JSON.parse(JSON.stringify(arrayData.store.data)) || [];
|
const newData = JSON.parse(JSON.stringify(arrayData.store.data)) || [];
|
||||||
rows.value = newData;
|
rows.value = newData;
|
||||||
// el objetivo de esto es guardar una copia de los valores iniciales de todas las rows para corroborar si la data cambio antes de guardar los cambios
|
|
||||||
originalRowDataCopy.value = JSON.parse(JSON.stringify(newData));
|
originalRowDataCopy.value = JSON.parse(JSON.stringify(newData));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -300,20 +298,17 @@ const openReportPdf = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const saveFieldValue = async (val, field, index) => {
|
const saveFieldValue = async (val, field, index) => {
|
||||||
// Evitar la solicitud de guardado si el valor no ha cambiado
|
|
||||||
if (originalRowDataCopy.value[index][field] == val) return;
|
if (originalRowDataCopy.value[index][field] == val) return;
|
||||||
|
|
||||||
const id = rows.value[index].id;
|
const id = rows.value[index].id;
|
||||||
const params = { [field]: val };
|
const params = { [field]: val };
|
||||||
await axios.patch(`Travels/${id}`, params);
|
await axios.patch(`Travels/${id}`, params);
|
||||||
// Actualizar la copia de los datos originales con el nuevo valor
|
|
||||||
originalRowDataCopy.value[index][field] = val;
|
originalRowDataCopy.value[index][field] = val;
|
||||||
|
|
||||||
await arrayData.fetch({ append: false });
|
await arrayData.fetch({ append: false });
|
||||||
};
|
};
|
||||||
|
|
||||||
const stopEventPropagation = (event, col) => {
|
const stopEventPropagation = (event, col) => {
|
||||||
// Detener la propagación del evento de los siguientes elementos para evitar el click sobre la row que dispararía la función navigateToTravelId
|
|
||||||
if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return;
|
if (!['ref', 'id', 'cargoSupplierNickname', 'kg'].includes(col.name)) return;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
@ -335,14 +330,12 @@ onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handler del evento @dragstart (inicio del drag) y guarda información inicial
|
|
||||||
const handleDragStart = (event, rowIndex, entryIndex) => {
|
const handleDragStart = (event, rowIndex, entryIndex) => {
|
||||||
draggedRowIndex.value = rowIndex;
|
draggedRowIndex.value = rowIndex;
|
||||||
entryRowIndex.value = entryIndex;
|
entryRowIndex.value = entryIndex;
|
||||||
event.dataTransfer.effectAllowed = 'move';
|
event.dataTransfer.effectAllowed = 'move';
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handler del evento @dragenter (cuando haces drag sobre une elemento y lo arrastras sobre un posible target de drop) y actualiza el targetIndex
|
|
||||||
const handleDragEnter = (_, targetIndex) => {
|
const handleDragEnter = (_, targetIndex) => {
|
||||||
targetRowIndex.value = targetIndex;
|
targetRowIndex.value = targetIndex;
|
||||||
};
|
};
|
||||||
|
@ -356,11 +349,8 @@ const saveRowDrop = async (targetRowIndex) => {
|
||||||
const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
|
const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
|
||||||
try {
|
try {
|
||||||
if (draggedRowIndex === targetRowIndex) return;
|
if (draggedRowIndex === targetRowIndex) return;
|
||||||
// Remover entry de la row original
|
|
||||||
draggedEntry.value = rows.value[draggedRowIndex].entries.splice(entryIndex, 1)[0];
|
draggedEntry.value = rows.value[draggedRowIndex].entries.splice(entryIndex, 1)[0];
|
||||||
//Si la row de destino por alguna razón no tiene la propiedad entry la creamos
|
|
||||||
if (!rows.value[targetRowIndex].entries) rows.value[targetRowIndex].entries = [];
|
if (!rows.value[targetRowIndex].entries) rows.value[targetRowIndex].entries = [];
|
||||||
// Añadir entry a la row de destino
|
|
||||||
rows.value[targetRowIndex].entries.push(draggedEntry.value);
|
rows.value[targetRowIndex].entries.push(draggedEntry.value);
|
||||||
|
|
||||||
await saveRowDrop(targetRowIndex);
|
await saveRowDrop(targetRowIndex);
|
||||||
|
@ -370,13 +360,11 @@ const moveRow = async (draggedRowIndex, targetRowIndex, entryIndex) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handler de cuando haces un drop tanto dentro como fuera de la tabla para limpiar acciones y data
|
|
||||||
const handleDragEnd = () => {
|
const handleDragEnd = () => {
|
||||||
stopScroll();
|
stopScroll();
|
||||||
cleanDragAndDropData();
|
cleanDragAndDropData();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handler del evento @drop (cuando soltas el elemento draggeado sobre un target)
|
|
||||||
const handleDrop = () => {
|
const handleDrop = () => {
|
||||||
if (
|
if (
|
||||||
!draggedRowIndex.value &&
|
!draggedRowIndex.value &&
|
||||||
|
@ -399,7 +387,6 @@ const cleanDragAndDropData = () => {
|
||||||
const scrollInterval = ref(null);
|
const scrollInterval = ref(null);
|
||||||
|
|
||||||
const startScroll = (direction) => {
|
const startScroll = (direction) => {
|
||||||
// Iniciar el scroll en la dirección especificada
|
|
||||||
if (!scrollInterval.value) {
|
if (!scrollInterval.value) {
|
||||||
scrollInterval.value = requestAnimationFrame(() => scroll(direction));
|
scrollInterval.value = requestAnimationFrame(() => scroll(direction));
|
||||||
}
|
}
|
||||||
|
@ -413,14 +400,12 @@ const stopScroll = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const scroll = (direction) => {
|
const scroll = (direction) => {
|
||||||
// Controlar el desplazamiento en la dirección especificada
|
|
||||||
const yOffset = direction === 'up' ? -2 : 2;
|
const yOffset = direction === 'up' ? -2 : 2;
|
||||||
window.scrollBy(0, yOffset);
|
window.scrollBy(0, yOffset);
|
||||||
|
|
||||||
const windowHeight = window.innerHeight;
|
const windowHeight = window.innerHeight;
|
||||||
const documentHeight = document.body.offsetHeight;
|
const documentHeight = document.body.offsetHeight;
|
||||||
|
|
||||||
// Verificar si se alcanzaron los límites de la ventana para detener el desplazamiento
|
|
||||||
if (
|
if (
|
||||||
(direction === 'up' && window.scrollY > 0) ||
|
(direction === 'up' && window.scrollY > 0) ||
|
||||||
(direction === 'down' && windowHeight + window.scrollY < documentHeight)
|
(direction === 'down' && windowHeight + window.scrollY < documentHeight)
|
||||||
|
@ -431,13 +416,10 @@ const scroll = (direction) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handler del scroll mientras se hace el drag de una row
|
|
||||||
const handleDragScroll = (event) => {
|
const handleDragScroll = (event) => {
|
||||||
// Obtener la posición y dimensiones del cursor
|
|
||||||
const y = event.clientY;
|
const y = event.clientY;
|
||||||
const windowHeight = window.innerHeight;
|
const windowHeight = window.innerHeight;
|
||||||
|
|
||||||
// Verificar si el cursor está cerca del borde superior o inferior de la ventana
|
|
||||||
const nearTop = y < 150;
|
const nearTop = y < 150;
|
||||||
const nearBottom = y > windowHeight - 100;
|
const nearBottom = y > windowHeight - 100;
|
||||||
|
|
||||||
|
@ -547,7 +529,7 @@ watch(route, () => {
|
||||||
? `${props.row.percentageKg}%`
|
? `${props.row.percentageKg}%`
|
||||||
: '-'
|
: '-'
|
||||||
"
|
"
|
||||||
class="text-left q-py-xs q-px-sm"
|
class="text-right q-py-xs q-px-sm"
|
||||||
:color="getColor(props.row.percentageKg)"
|
:color="getColor(props.row.percentageKg)"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
|
@ -566,7 +548,6 @@ watch(route, () => {
|
||||||
]"
|
]"
|
||||||
v-text="col.value"
|
v-text="col.value"
|
||||||
/>
|
/>
|
||||||
<!-- Main Row Descriptors -->
|
|
||||||
<TravelDescriptorProxy
|
<TravelDescriptorProxy
|
||||||
v-if="col.name === 'id'"
|
v-if="col.name === 'id'"
|
||||||
:id="props.row.id"
|
:id="props.row.id"
|
||||||
|
@ -597,7 +578,7 @@ watch(route, () => {
|
||||||
index === props.row.entries.length - 1,
|
index === props.row.entries.length - 1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<QTd>
|
<QTd class="text-right">
|
||||||
<QBtn dense flat class="link">{{ entry.id }} </QBtn>
|
<QBtn dense flat class="link">{{ entry.id }} </QBtn>
|
||||||
<EntryDescriptorProxy :id="entry.id" />
|
<EntryDescriptorProxy :id="entry.id" />
|
||||||
</QTd>
|
</QTd>
|
||||||
|
@ -605,7 +586,7 @@ watch(route, () => {
|
||||||
<QBtn flat class="link" dense>{{ entry.supplierName }}</QBtn>
|
<QBtn flat class="link" dense>{{ entry.supplierName }}</QBtn>
|
||||||
<SupplierDescriptorProxy :id="entry.supplierFk" />
|
<SupplierDescriptorProxy :id="entry.supplierFk" />
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>
|
<QTd class="text-center">
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="entry.isCustomInspectionRequired"
|
v-if="entry.isCustomInspectionRequired"
|
||||||
name="warning"
|
name="warning"
|
||||||
|
@ -615,21 +596,21 @@ watch(route, () => {
|
||||||
>
|
>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>
|
<QTd class="text-right">
|
||||||
<span>{{ toCurrency(entry.invoiceAmount) }}</span>
|
<span>{{ toCurrency(entry.invoiceAmount) }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>
|
<QTd>
|
||||||
<span>{{ entry.reference }}</span>
|
<span>{{ entry.reference }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>
|
<QTd class="text-right">
|
||||||
<span>{{ entry.stickers }}</span>
|
<span>{{ entry.stickers }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd />
|
<QTd />
|
||||||
<QTd></QTd>
|
<QTd></QTd>
|
||||||
<QTd>
|
<QTd class="text-right">
|
||||||
<span>{{ entry.loadedkg }}</span>
|
<span>{{ entry.loadedkg }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd>
|
<QTd class="text-right">
|
||||||
<span>{{ entry.volumeKg }}</span>
|
<span>{{ entry.volumeKg }}</span>
|
||||||
</QTd>
|
</QTd>
|
||||||
<QTd />
|
<QTd />
|
||||||
|
@ -664,9 +645,6 @@ watch(route, () => {
|
||||||
:deep(.q-table) {
|
:deep(.q-table) {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
|
||||||
th {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
tbody tr td {
|
tbody tr td {
|
||||||
&:nth-child(1) {
|
&:nth-child(1) {
|
||||||
max-width: 65px;
|
max-width: 65px;
|
||||||
|
@ -675,6 +653,10 @@ watch(route, () => {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
thead > tr > th {
|
||||||
|
padding: 3px;
|
||||||
|
color: var(--vn-label-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-td :deep(input) {
|
.q-td :deep(input) {
|
||||||
|
|
|
@ -44,11 +44,12 @@ describe('EntryList', () => {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
checkBadgeDate(
|
// fix on task https://redmine.verdnatura.es/issues/8638
|
||||||
|
/* checkBadgeDate(
|
||||||
'td[data-col-field="landed"] > div .bg-info',
|
'td[data-col-field="landed"] > div .bg-info',
|
||||||
(badgeDate, compareDate) => {
|
(badgeDate, compareDate) => {
|
||||||
expect(badgeDate.getTime()).to.be.lessThan(compareDate.getTime());
|
expect(badgeDate.getTime()).to.be.lessThan(compareDate.getTime());
|
||||||
},
|
},
|
||||||
);
|
); */
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue