Compare commits
24 Commits
dev
...
6564-enhan
Author | SHA1 | Date |
---|---|---|
|
fa1a9da29e | |
|
07a36b4e53 | |
|
a896e4ce23 | |
|
72a19cbba1 | |
|
530dc62e00 | |
|
bbf4234351 | |
|
e73604d908 | |
|
36f2328656 | |
|
bed4763e88 | |
|
7b1e126966 | |
|
304a039ebd | |
|
acddcd58b8 | |
|
90d556c892 | |
|
3c2c40c8e6 | |
|
345dc4bfbc | |
|
5325095297 | |
|
76b914e6be | |
|
aa91209ab7 | |
|
4ba57a1ca3 | |
|
498e8c385e | |
|
fda024d6fe | |
|
35dac33ff9 | |
|
82fa3b4648 | |
|
aa3810a4c0 |
|
@ -1,12 +1,22 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { toCurrency } from 'src/filters';
|
import { toCurrency } from 'src/filters';
|
||||||
|
import { getValueFromPath } from 'src/composables/getValueFromPath';
|
||||||
|
|
||||||
defineProps({ row: { type: Object, required: true } });
|
const { row, visibleProblems = null } = defineProps({
|
||||||
|
row: { type: Object, required: true },
|
||||||
|
visibleProblems: { type: Array },
|
||||||
|
});
|
||||||
|
|
||||||
|
function showProblem(problem) {
|
||||||
|
const val = getValueFromPath(row, problem);
|
||||||
|
if (!visibleProblems) return val;
|
||||||
|
return !!(visibleProblems?.includes(problem) && val);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<span class="q-gutter-x-xs">
|
<span class="q-gutter-x-xs">
|
||||||
<router-link
|
<router-link
|
||||||
v-if="row.claim?.claimFk"
|
v-if="showProblem('claim.claimFk')"
|
||||||
:to="{ name: 'ClaimBasicData', params: { id: row.claim?.claimFk } }"
|
:to="{ name: 'ClaimBasicData', params: { id: row.claim?.claimFk } }"
|
||||||
class="link"
|
class="link"
|
||||||
>
|
>
|
||||||
|
@ -18,7 +28,7 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</router-link>
|
</router-link>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.isDeleted"
|
v-if="showProblem('isDeleted')"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="vn:deletedTicket"
|
name="vn:deletedTicket"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
@ -29,7 +39,7 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.hasRisk"
|
v-if="showProblem('hasRisk')"
|
||||||
name="vn:risk"
|
name="vn:risk"
|
||||||
:color="row.hasHighRisk ? 'negative' : 'primary'"
|
:color="row.hasHighRisk ? 'negative' : 'primary'"
|
||||||
size="xs"
|
size="xs"
|
||||||
|
@ -40,51 +50,76 @@ defineProps({ row: { type: Object, required: true } });
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.hasComponentLack"
|
v-if="showProblem('hasComponentLack')"
|
||||||
name="vn:components"
|
name="vn:components"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.componentLack') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.componentLack') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.hasItemDelay" color="primary" size="xs" name="vn:hasItemDelay">
|
<QIcon
|
||||||
|
v-if="showProblem('hasItemDelay')"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
name="vn:hasItemDelay"
|
||||||
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ $t('ticket.summary.hasItemDelay') }}
|
{{ $t('ticket.summary.hasItemDelay') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.hasItemLost" color="primary" size="xs" name="vn:hasItemLost">
|
<QIcon
|
||||||
|
v-if="showProblem('hasItemLost')"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
name="vn:hasItemLost"
|
||||||
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ $t('salesTicketsTable.hasItemLost') }}
|
{{ $t('salesTicketsTable.hasItemLost') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.hasItemShortage"
|
v-if="showProblem('hasItemShortage')"
|
||||||
name="vn:unavailable"
|
name="vn:unavailable"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.notVisible') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.notVisible') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.hasRounding" color="primary" name="sync_problem" size="xs">
|
<QIcon
|
||||||
|
v-if="showProblem('hasRounding')"
|
||||||
|
color="primary"
|
||||||
|
name="sync_problem"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ $t('ticketList.rounding') }}
|
{{ $t('ticketList.rounding') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="row?.hasTicketRequest"
|
v-if="showProblem('hasTicketRequest')"
|
||||||
name="vn:buyrequest"
|
name="vn:buyrequest"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="xs"
|
size="xs"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.purchaseRequest') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.isTaxDataChecked" name="vn:no036" color="primary" size="xs">
|
<QIcon
|
||||||
|
v-if="showProblem('isTaxDataChecked')"
|
||||||
|
name="vn:no036"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.noVerifiedData') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.isFreezed" name="vn:frozen" color="primary" size="xs">
|
<QIcon v-if="showProblem('isFreezed')" name="vn:frozen" color="primary" size="xs">
|
||||||
<QTooltip>{{ $t('salesTicketsTable.clientFrozen') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.clientFrozen') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon v-if="row?.isTooLittle" name="vn:isTooLittle" color="primary" size="xs">
|
<QIcon
|
||||||
|
v-if="showProblem('isTooLittle')"
|
||||||
|
name="vn:isTooLittle"
|
||||||
|
color="primary"
|
||||||
|
size="xs"
|
||||||
|
>
|
||||||
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
import { vi, describe, expect, it, beforeEach, afterEach } from 'vitest';
|
import { vi, describe, expect, it, beforeEach, beforeAll, afterEach } from 'vitest';
|
||||||
import { createWrapper } from 'app/test/vitest/helper';
|
import { createWrapper } from 'app/test/vitest/helper';
|
||||||
import UserPanel from 'src/components/UserPanel.vue';
|
import UserPanel from 'src/components/UserPanel.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useState } from 'src/composables/useState';
|
import { useState } from 'src/composables/useState';
|
||||||
|
|
||||||
vi.mock('src/utils/quasarLang', () => ({
|
|
||||||
default: vi.fn(),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('UserPanel', () => {
|
describe('UserPanel', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
let vm;
|
let vm;
|
||||||
|
@ -43,7 +39,7 @@ describe('UserPanel', () => {
|
||||||
await vm.saveDarkMode(true);
|
await vm.saveDarkMode(true);
|
||||||
expect(axios.patch).toHaveBeenCalledWith('/UserConfigs/115', { darkMode: true });
|
expect(axios.patch).toHaveBeenCalledWith('/UserConfigs/115', { darkMode: true });
|
||||||
expect(vm.user.darkMode).toBe(true);
|
expect(vm.user.darkMode).toBe(true);
|
||||||
await vm.updatePreferences();
|
vm.updatePreferences();
|
||||||
expect(vm.darkMode).toBe(true);
|
expect(vm.darkMode).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -52,7 +48,7 @@ describe('UserPanel', () => {
|
||||||
await vm.saveLanguage(userLanguage);
|
await vm.saveLanguage(userLanguage);
|
||||||
expect(axios.patch).toHaveBeenCalledWith('/VnUsers/115', { lang: userLanguage });
|
expect(axios.patch).toHaveBeenCalledWith('/VnUsers/115', { lang: userLanguage });
|
||||||
expect(vm.user.lang).toBe(userLanguage);
|
expect(vm.user.lang).toBe(userLanguage);
|
||||||
await vm.updatePreferences();
|
vm.updatePreferences();
|
||||||
expect(vm.locale).toBe(userLanguage);
|
expect(vm.locale).toBe(userLanguage);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,6 +56,8 @@ describe('UserPanel', () => {
|
||||||
const key = 'name';
|
const key = 'name';
|
||||||
const value = 'itboss';
|
const value = 'itboss';
|
||||||
await vm.saveUserData(key, value);
|
await vm.saveUserData(key, value);
|
||||||
expect(axios.post).toHaveBeenCalledWith('UserConfigs/setUserConfig', { [key]: value });
|
expect(axios.post).toHaveBeenCalledWith('UserConfigs/setUserConfig', {
|
||||||
|
[key]: value,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -6,6 +6,7 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { useClipboard } from 'src/composables/useClipboard';
|
import { useClipboard } from 'src/composables/useClipboard';
|
||||||
import VnMoreOptions from './VnMoreOptions.vue';
|
import VnMoreOptions from './VnMoreOptions.vue';
|
||||||
|
import { getValueFromPath } from 'src/composables/getValueFromPath';
|
||||||
|
|
||||||
const entity = defineModel({ type: Object, default: null });
|
const entity = defineModel({ type: Object, default: null });
|
||||||
const $props = defineProps({
|
const $props = defineProps({
|
||||||
|
@ -56,18 +57,6 @@ const routeName = computed(() => {
|
||||||
return `${routeName}Summary`;
|
return `${routeName}Summary`;
|
||||||
});
|
});
|
||||||
|
|
||||||
function getValueFromPath(path) {
|
|
||||||
if (!path) return;
|
|
||||||
const keys = path.toString().split('.');
|
|
||||||
let current = entity.value;
|
|
||||||
|
|
||||||
for (const key of keys) {
|
|
||||||
if (current[key] === undefined) return undefined;
|
|
||||||
else current = current[key];
|
|
||||||
}
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
function copyIdText(id) {
|
function copyIdText(id) {
|
||||||
copyText(id, {
|
copyText(id, {
|
||||||
component: {
|
component: {
|
||||||
|
@ -170,10 +159,10 @@ const toModule = computed(() => {
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span
|
<span
|
||||||
v-if="title"
|
v-if="title"
|
||||||
:title="getValueFromPath(title)"
|
:title="getValueFromPath(entity, title)"
|
||||||
:data-cy="`${$attrs['data-cy'] ?? 'vnDescriptor'}_title`"
|
:data-cy="`${$attrs['data-cy'] ?? 'vnDescriptor'}_title`"
|
||||||
>
|
>
|
||||||
{{ getValueFromPath(title) ?? title }}
|
{{ getValueFromPath(entity, title) ?? title }}
|
||||||
</span>
|
</span>
|
||||||
<slot v-else name="description" :entity="entity">
|
<slot v-else name="description" :entity="entity">
|
||||||
<span
|
<span
|
||||||
|
@ -189,7 +178,7 @@ const toModule = computed(() => {
|
||||||
class="subtitle"
|
class="subtitle"
|
||||||
:data-cy="`${$attrs['data-cy'] ?? 'vnDescriptor'}_subtitle`"
|
:data-cy="`${$attrs['data-cy'] ?? 'vnDescriptor'}_subtitle`"
|
||||||
>
|
>
|
||||||
#{{ getValueFromPath(subtitle) ?? entity.id }}
|
#{{ getValueFromPath(entity, subtitle) ?? entity.id }}
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
<QBtn
|
<QBtn
|
||||||
round
|
round
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
export function getValueFromPath(root, path) {
|
||||||
|
if (!root || !path) return;
|
||||||
|
const keys = path.toString().split('.');
|
||||||
|
let current = root;
|
||||||
|
|
||||||
|
for (const key of keys) {
|
||||||
|
if (current[key] === undefined) return undefined;
|
||||||
|
else current = current[key];
|
||||||
|
}
|
||||||
|
return current;
|
||||||
|
}
|
|
@ -46,7 +46,7 @@ async function getClaims() {
|
||||||
originalTicket.value = data[0]?.originalTicketFk;
|
originalTicket.value = data[0]?.originalTicketFk;
|
||||||
}
|
}
|
||||||
async function getProblems() {
|
async function getProblems() {
|
||||||
const { data } = await axios.get(`Tickets/${entityId.value}/getTicketProblems`);
|
const { data } = await axios.get(`Tickets/getTicketProblems`, {params: { ids: [entityId.value] }});
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
problems.value = data[0];
|
problems.value = data[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@ import { useState } from 'src/composables/useState';
|
||||||
import { toDateFormat } from 'src/filters/date.js';
|
import { toDateFormat } from 'src/filters/date.js';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
import { QTable } from 'quasar';
|
||||||
|
import TicketProblems from 'src/components/TicketProblems.vue';
|
||||||
|
|
||||||
const state = useState();
|
const state = useState();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -27,6 +29,16 @@ const selectedTickets = ref([]);
|
||||||
const vnTableRef = ref({});
|
const vnTableRef = ref({});
|
||||||
const originElRef = ref(null);
|
const originElRef = ref(null);
|
||||||
const destinationElRef = ref(null);
|
const destinationElRef = ref(null);
|
||||||
|
const actions = {
|
||||||
|
advance: {
|
||||||
|
title: t('advanceTickets.advanceTickets'),
|
||||||
|
cb: moveTicketsAdvance,
|
||||||
|
},
|
||||||
|
advanceWithoutNegative: {
|
||||||
|
title: t('advanceTickets.advanceTicketsWithoutNegatives'),
|
||||||
|
cb: splitTickets,
|
||||||
|
},
|
||||||
|
};
|
||||||
let today = Date.vnNew().toISOString();
|
let today = Date.vnNew().toISOString();
|
||||||
const tomorrow = new Date(today);
|
const tomorrow = new Date(today);
|
||||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||||
|
@ -78,6 +90,15 @@ const ticketColumns = computed(() => [
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: t('globals.agency'),
|
||||||
|
name: 'agency',
|
||||||
|
field: 'agency',
|
||||||
|
align: 'left',
|
||||||
|
sortable: true,
|
||||||
|
headerClass: 'horizontal-separator',
|
||||||
|
columnFilter: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: t('advanceTickets.preparation'),
|
label: t('advanceTickets.preparation'),
|
||||||
name: 'preparation',
|
name: 'preparation',
|
||||||
|
@ -85,7 +106,6 @@ const ticketColumns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
headerClass: 'horizontal-separator',
|
headerClass: 'horizontal-separator',
|
||||||
columnFilter: false,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -110,10 +130,17 @@ const ticketColumns = computed(() => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: t('advanceTickets.futureId'),
|
label: '',
|
||||||
name: 'futureId',
|
name: 'problems',
|
||||||
headerClass: 'vertical-separator horizontal-separator',
|
headerClass: 'vertical-separator horizontal-separator',
|
||||||
columnClass: 'vertical-separator',
|
columnClass: 'vertical-separator',
|
||||||
|
hidden: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('advanceTickets.futureId'),
|
||||||
|
name: 'futureId',
|
||||||
|
headerClass: 'horizontal-separator',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -242,7 +269,7 @@ const requestComponentUpdate = async (ticket, isWithoutNegatives) => {
|
||||||
return { query, params };
|
return { query, params };
|
||||||
};
|
};
|
||||||
|
|
||||||
const moveTicketsAdvance = async () => {
|
async function moveTicketsAdvance() {
|
||||||
let ticketsToMove = [];
|
let ticketsToMove = [];
|
||||||
for (const ticket of selectedTickets.value) {
|
for (const ticket of selectedTickets.value) {
|
||||||
if (!ticket.id) {
|
if (!ticket.id) {
|
||||||
|
@ -267,7 +294,7 @@ const moveTicketsAdvance = async () => {
|
||||||
vnTableRef.value.reload();
|
vnTableRef.value.reload();
|
||||||
selectedTickets.value = [];
|
selectedTickets.value = [];
|
||||||
if (ticketsToMove.length) notify(t('advanceTickets.moveTicketSuccess'), 'positive');
|
if (ticketsToMove.length) notify(t('advanceTickets.moveTicketSuccess'), 'positive');
|
||||||
};
|
}
|
||||||
|
|
||||||
const progressLength = ref(0);
|
const progressLength = ref(0);
|
||||||
const progressPercentage = computed(() => {
|
const progressPercentage = computed(() => {
|
||||||
|
@ -290,7 +317,7 @@ const progressAdd = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const splitTickets = async () => {
|
async function splitTickets() {
|
||||||
try {
|
try {
|
||||||
showProgressDialog.value = true;
|
showProgressDialog.value = true;
|
||||||
for (const ticket of selectedTickets.value) {
|
for (const ticket of selectedTickets.value) {
|
||||||
|
@ -310,7 +337,7 @@ const splitTickets = async () => {
|
||||||
} finally {
|
} finally {
|
||||||
vnTableRef.value.reload();
|
vnTableRef.value.reload();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const resetProgressData = () => {
|
const resetProgressData = () => {
|
||||||
if (cancelProgress.value) cancelProgress.value = false;
|
if (cancelProgress.value) cancelProgress.value = false;
|
||||||
|
@ -326,6 +353,32 @@ const handleCloseProgressDialog = () => {
|
||||||
|
|
||||||
const handleCancelProgress = () => (cancelProgress.value = true);
|
const handleCancelProgress = () => (cancelProgress.value = true);
|
||||||
|
|
||||||
|
const confirmAction = (action) => {
|
||||||
|
openConfirmationModal(actions[action].title, false, actions[action].cb, null, {
|
||||||
|
component: QTable,
|
||||||
|
props: {
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('advanceTickets.destination'),
|
||||||
|
name: 'id',
|
||||||
|
field: (row) => row.id,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
label: t('advanceTickets.origin'),
|
||||||
|
name: 'futureId',
|
||||||
|
field: (row) => row.futureId,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
rows: selectedTickets.value,
|
||||||
|
class: 'full-width',
|
||||||
|
dense: true,
|
||||||
|
flat: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => vnTableRef.value.tableRef?.$el,
|
() => vnTableRef.value.tableRef?.$el,
|
||||||
($el) => {
|
($el) => {
|
||||||
|
@ -399,15 +452,7 @@ watch(
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
:disable="!selectedTickets.length"
|
:disable="!selectedTickets.length"
|
||||||
@click.stop="
|
@click.stop="confirmAction('advance')"
|
||||||
openConfirmationModal(
|
|
||||||
t('advanceTickets.advanceTicketTitle'),
|
|
||||||
t(`advanceTickets.advanceTitleSubtitle`, {
|
|
||||||
selectedTickets: selectedTickets.length,
|
|
||||||
}),
|
|
||||||
moveTicketsAdvance,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('advanceTickets.advanceTickets') }}
|
{{ t('advanceTickets.advanceTickets') }}
|
||||||
|
@ -417,15 +462,7 @@ watch(
|
||||||
icon="alt_route"
|
icon="alt_route"
|
||||||
color="primary"
|
color="primary"
|
||||||
:disable="!selectedTickets.length"
|
:disable="!selectedTickets.length"
|
||||||
@click.stop="
|
@click.stop="confirmAction('advanceWithoutNegative')"
|
||||||
openConfirmationModal(
|
|
||||||
t('advanceTickets.advanceWithoutNegativeTitle'),
|
|
||||||
t(`advanceTickets.advanceWithoutNegativeSubtitle`, {
|
|
||||||
selectedTickets: selectedTickets.length,
|
|
||||||
}),
|
|
||||||
splitTickets,
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('advanceTickets.advanceTicketsWithoutNegatives') }}
|
{{ t('advanceTickets.advanceTicketsWithoutNegatives') }}
|
||||||
|
@ -454,7 +491,7 @@ watch(
|
||||||
}"
|
}"
|
||||||
v-model:selected="selectedTickets"
|
v-model:selected="selectedTickets"
|
||||||
:pagination="{ rowsPerPage: 0 }"
|
:pagination="{ rowsPerPage: 0 }"
|
||||||
:no-data-label="t('globals.noResults')"
|
:no-data-label="$t('globals.noResults')"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:order="['futureTotalWithVat ASC']"
|
:order="['futureTotalWithVat ASC']"
|
||||||
auto-load
|
auto-load
|
||||||
|
@ -522,6 +559,9 @@ watch(
|
||||||
{{ toCurrency(row.totalWithVat || 0) }}
|
{{ toCurrency(row.totalWithVat || 0) }}
|
||||||
</QBadge>
|
</QBadge>
|
||||||
</template>
|
</template>
|
||||||
|
<template #column-problems="{ row }">
|
||||||
|
<TicketProblems :row="row.problems" :visible-problems="['hasRisk']" />
|
||||||
|
</template>
|
||||||
<template #column-futureId="{ row }">
|
<template #column-futureId="{ row }">
|
||||||
<QBtn flat class="link" dense>
|
<QBtn flat class="link" dense>
|
||||||
{{ row.futureId }}
|
{{ row.futureId }}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||||
const { t, te } = useI18n();
|
const { t, te } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataKey: {
|
dataKey: {
|
||||||
|
@ -122,18 +122,20 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
v-model="params.scopeDays"
|
v-model="params.scopeDays"
|
||||||
:label="t('Days onward')"
|
:label="t('globals.daysOnward')"
|
||||||
filled
|
filled
|
||||||
|
:step="0"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<VnCheckbox
|
||||||
:label="t('params.isFullMovable')"
|
:label="t('params.isFullMovable')"
|
||||||
v-model="params.isFullMovable"
|
v-model="params.isFullMovable"
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
dense
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -166,11 +168,12 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QCheckbox
|
<VnCheckbox
|
||||||
toggle-indeterminate
|
toggle-indeterminate
|
||||||
label="only with destination"
|
:label="t('params.onlyWithDestination')"
|
||||||
v-model="params.onlyWithDestination"
|
v-model="params.onlyWithDestination"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
|
dense
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -194,8 +197,8 @@ es:
|
||||||
Vertical: Vertical
|
Vertical: Vertical
|
||||||
iptInfo: Encajado
|
iptInfo: Encajado
|
||||||
params:
|
params:
|
||||||
dateFuture: fecha origen
|
dateFuture: F. origen
|
||||||
dateToAdvance: Fecha destino
|
dateToAdvance: F. destino
|
||||||
futureIpt: IPT Origen
|
futureIpt: IPT Origen
|
||||||
ipt: IPT destino
|
ipt: IPT destino
|
||||||
isFullMovable: 100% movible
|
isFullMovable: 100% movible
|
||||||
|
|
Loading…
Reference in New Issue