0
0
Fork 0

Compare commits

...

3 Commits

7 changed files with 159 additions and 17 deletions

View File

@ -368,7 +368,7 @@ const openTab = (id) =>
<template #column-totalProblems="{ row }">
<span>
<QIcon
v-if="row.isTaxDataChecked === 0"
v-if="row.isTaxDataChecked === 1"
name="vn:no036"
color="primary"
size="xs"
@ -420,6 +420,16 @@ const openTab = (id) =>
>
<QTooltip>{{ $t('salesTicketsTable.tooLittle') }}</QTooltip>
</QIcon>
<QIcon
v-if="row.hasRounding"
color="primary"
name="sync_problem"
size="xs"
>
<QTooltip>
{{ t('ticketList.rounding') }}
</QTooltip>
</QIcon>
</span>
</template>
<template #column-id="{ row }">

View File

@ -9,6 +9,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import useCardDescription from 'src/composables/useCardDescription';
import VnUserLink from 'src/components/ui/VnUserLink.vue';
import { toDateTimeFormat } from 'src/filters/date';
import FetchData from 'src/components/FetchData.vue';
const $props = defineProps({
id: {
@ -24,6 +25,7 @@ const { t } = useI18n();
const entityId = computed(() => {
return $props.id || route.params.id;
});
const problems = ref({});
const filter = {
include: [
@ -105,6 +107,11 @@ function ticketFilter(ticket) {
</script>
<template>
<FetchData
:url="`Tickets/${entityId}/getTicketProblems`"
auto-load
@on-fetch="(data) => (problems = data)"
/>
<CardDescriptor
module="Ticket"
:url="`Tickets/${entityId}`"
@ -165,14 +172,6 @@ function ticketFilter(ticket) {
>
<QTooltip>{{ t('Client inactive') }}</QTooltip>
</QIcon>
<QIcon
v-if="entity.client.isFreezed == true"
name="vn:frozen"
size="xs"
color="primary"
>
<QTooltip>{{ t('Client Frozen') }}</QTooltip>
</QIcon>
<QIcon
v-if="entity.problem.includes('hasRisk')"
name="vn:risk"
@ -197,6 +196,84 @@ function ticketFilter(ticket) {
>
<QTooltip>{{ t('This ticket is deleted') }}</QTooltip>
</QIcon>
<div v-for="problem in problems" :key="problem" class="q-gutter-x-xs">
<QIcon
v-if="problem?.hasComponentLack"
color="primary"
name="vn:components"
size="xs"
>
<QTooltip>
{{ t('ticket.summary.hasComponentLack') }}
</QTooltip>
</QIcon>
<QIcon
v-show="problem?.risk"
name="vn:risk"
:color="problem?.hasHighRisk ? 'negative' : 'primary'"
size="xs"
>
<QTooltip
>{{ $t('salesTicketsTable.risk') }}: {{ row.risk }}</QTooltip
>
</QIcon>
<QIcon v-if="problem?.hasItemDelay" color="primary" size="xs">
<QTooltip>
{{ t('ticket.summary.hasItemDelay') }}
</QTooltip>
</QIcon>
<QIcon v-if="problem?.hasItemLost" color="primary" size="xs">
<QTooltip>
{{ t('ticket.summary.hasItemLost') }}
</QTooltip>
</QIcon>
<QIcon
name="vn:unavailable"
v-show="problem?.hasItemShortage"
color="primary"
size="xs"
>
<QTooltip>
{{ t('ticket.summary.itemShortage') }}
</QTooltip>
</QIcon>
<QIcon
v-if="problem?.hasRounding"
color="primary"
name="sync_problem"
size="xs"
>
<QTooltip>
{{ t('ticketList.rounding') }}
</QTooltip>
</QIcon>
<QIcon
v-if="problem?.hasTicketRequest"
color="primary"
name="vn:buyrequest"
size="xs"
>
<QTooltip>
{{ t('ticket.summary.hasTicketRequest') }}
</QTooltip>
</QIcon>
<QIcon
v-if="problem.isFreezed"
name="vn:frozen"
size="xs"
color="primary"
>
<QTooltip>{{ t('Client Frozen') }}</QTooltip>
</QIcon>
<QIcon
v-show="problem.isTaxDataChecked"
name="vn:no036"
size="xs"
color="primary"
>
<QTooltip>{{ t('Client not checked') }}</QTooltip>
</QIcon>
</div>
</QCardActions>
</template>
<template #actions="{ entity }">

View File

@ -660,7 +660,22 @@ watch(
size="xs"
>
<QTooltip>
{{ t('ticketSale.hasComponentLack') }}
{{ t('ticket.summary.hasComponentLack') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.hasRounding" color="primary" name="sync_problem" size="xs">
<QTooltip>
{{ t('ticketList.rounding') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.hasItemLost" color="primary" size="xs">
<QTooltip>
{{ t('ticketList.itemLost') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.hasItemDelay" color="primary" size="xs">
<QTooltip>
{{ t('ticketList.itemDelay') }}
</QTooltip>
</QIcon>
</template>

View File

@ -415,6 +415,34 @@ function isOnTicketCard() {
{{ t('ticket.summary.hasComponentLack') }}
</QTooltip>
</QIcon>
<QIcon
v-show="props.row.hasRounding"
color="primary"
name="sync_problem"
size="xs"
>
<QTooltip>
{{ t('ticketList.rounding') }}
</QTooltip>
</QIcon>
<QIcon
v-show="props.row.hasItemLost"
color="primary"
size="xs"
>
<QTooltip>
{{ t('ticketList.itemLost') }}
</QTooltip>
</QIcon>
<QIcon
v-show="props.row.hasItemDelay"
color="primary"
size="xs"
>
<QTooltip>
{{ t('ticketList.itemDelay') }}
</QTooltip>
</QIcon>
</QTd>
<QTd>
<QBtn class="link" flat>

View File

@ -489,13 +489,13 @@ function setReference(data) {
<template #column-statusIcons="{ row }">
<div class="q-gutter-x-xs">
<QIcon
v-if="row.isTaxDataChecked === 0"
v-if="row.isTaxDataChecked === 1"
color="primary"
name="vn:no036"
size="xs"
>
<QTooltip>
{{ t('No verified data') }}
{{ t('ticketList.noVerifiedData') }}
</QTooltip>
</QIcon>
<QIcon
@ -505,7 +505,7 @@ function setReference(data) {
size="xs"
>
<QTooltip>
{{ t('Purchase request') }}
{{ t('ticketList.purchaseRequest') }}
</QTooltip>
</QIcon>
<QIcon
@ -515,12 +515,12 @@ function setReference(data) {
size="xs"
>
<QTooltip>
{{ t('Not visible') }}
{{ t('ticketList.notVisible') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.isFreezed" color="primary" name="vn:frozen" size="xs">
<QTooltip>
{{ t('Client frozen') }}
{{ t('ticketList.clientFrozen') }}
</QTooltip>
</QIcon>
<QIcon v-if="row.risk" color="primary" name="vn:risk" size="xs">
@ -533,7 +533,7 @@ function setReference(data) {
size="xs"
>
<QTooltip>
{{ t('Component lack') }}
{{ t('ticketList.componentLack') }}
</QTooltip>
</QIcon>
<QIcon
@ -543,7 +543,7 @@ function setReference(data) {
size="xs"
>
<QTooltip>
{{ t('Rounding') }}
{{ t('ticketList.rounding') }}
</QTooltip>
</QIcon>
</div>

View File

@ -282,3 +282,9 @@ ticketList:
toLines: Go to lines
addressNickname: Address nickname
ref: Reference
rounding: Rounding
noVerifiedData: No verified data
purchaseRequest: Purchase request
notVisible: Not visible
clientFrozen: Client frozen
componentLack: Component lack

View File

@ -287,3 +287,9 @@ ticketList:
toLines: Ir a lineas
addressNickname: Alias consignatario
ref: Referencia
rounding: Redondeo
noVerifiedData: Sin datos comprobados
purchaseRequest: Petición de compra
notVisible: No visible
clientFrozen: Cliente congelado
componentLack: Faltan componentes