From 04693529d70d4ace9fc2054b5eeb0ada535fc559 Mon Sep 17 00:00:00 2001 From: alexandre Date: Fri, 25 Nov 2022 15:54:35 +0100 Subject: [PATCH 1/4] refs #4801 working on fetched tags --- src/css/quasar.variables.scss | 5 + src/filters/dashIfEmpty.js | 4 + src/filters/index.js | 4 + src/filters/zeroFill.js | 4 + src/i18n/en/index.js | 42 ++ src/i18n/es/index.js | 42 ++ src/pages/Ticket/Card/FetchedTags.vue | 17 + src/pages/Ticket/Card/TicketSummary.vue | 504 ++++++++++++++++++++++++ 8 files changed, 622 insertions(+) create mode 100644 src/filters/dashIfEmpty.js create mode 100644 src/filters/zeroFill.js create mode 100644 src/pages/Ticket/Card/FetchedTags.vue diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss index 37f693da6..6476f150a 100644 --- a/src/css/quasar.variables.scss +++ b/src/css/quasar.variables.scss @@ -22,3 +22,8 @@ $positive: #21ba45; $negative: #c10015; $info: #31ccec; $warning: #f2c037; + +$color-spacer-light: rgba(255, 255, 255, .12); +$border-thin-light: 1px solid $color-spacer-light; + +$spacing-md: 16px; diff --git a/src/filters/dashIfEmpty.js b/src/filters/dashIfEmpty.js new file mode 100644 index 000000000..4d959ea2c --- /dev/null +++ b/src/filters/dashIfEmpty.js @@ -0,0 +1,4 @@ +export default function (value) { + if (value == null || value === '') return '-'; + return value; +} diff --git a/src/filters/index.js b/src/filters/index.js index 459087e8e..5f9d9e746 100644 --- a/src/filters/index.js +++ b/src/filters/index.js @@ -2,10 +2,14 @@ import toLowerCase from './toLowerCase'; import toDate from './toDate'; import toCurrency from './toCurrency'; import toPercentage from './toPercentage'; +import dashIfEmpty from './dashIfEmpty'; +import zeroFill from './zeroFill'; export { toLowerCase, toDate, toCurrency, toPercentage, + dashIfEmpty, + zeroFill }; diff --git a/src/filters/zeroFill.js b/src/filters/zeroFill.js new file mode 100644 index 000000000..00d47d366 --- /dev/null +++ b/src/filters/zeroFill.js @@ -0,0 +1,4 @@ +export default function (value, pad) { + const valueStr = String(value); + return valueStr.padStart(pad, '0'); +} diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 88fae5bb7..62e83884e 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -187,6 +187,48 @@ export default { selectVideo: 'Select video:', notFound: 'No videos available', }, + summary: { + state: 'State', + salesPerson: 'Sales person', + agency: 'Agency', + zone: 'Zone', + warehouse: 'Warehouse', + route: 'Route', + invoice: 'Invoice', + shipped: 'Shipped', + landed: 'Landed', + packages: 'Packages', + consigneePhone: 'Consignee phone', + consigneeMobile: 'Consignee mobile', + clientPhone: 'Client phone', + clientMobile: 'Client mobile', + consignee: 'Consignee', + subtotal: 'Subtotal', + vat: 'VAT', + total: 'Total', + saleLines: 'Line items', + item: 'Item', + visible: 'Visible', + available: 'Available', + quantity: 'Quantity', + description: 'Description', + price: 'Price', + discount: 'Discount', + amount: 'Amount', + packing: 'Packing', + hasComponentLack: 'Component lack', + itemShortage: 'Not visible', + claim: 'Claim', + reserved: 'Reserved', + created: 'Created', + package: 'Package', + taxClass: 'Tax class', + services: 'Services', + changeState: 'Change state', + requester: 'Requester', + atender: 'Atender', + request: 'Request' + } }, claim: { pageTitles: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 0103b1a92..d614591e3 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -186,6 +186,48 @@ export default { selectVideo: 'Seleccionar vídeo:', notFound: 'No hay vídeos disponibles', }, + summary: { + state: 'Estado', + salesPerson: 'Comercial', + agency: 'Agencia', + zone: 'Zona', + warehouse: 'Almacén', + route: 'Ruta', + invoice: 'Factura', + shipped: 'Enviado', + landed: 'Entregado', + packages: 'Bultos', + consigneePhone: 'Tel. consignatario', + consigneeMobile: 'Móv. consignatario', + clientPhone: 'Tel. cliente', + clientMobile: 'Móv. cliente', + consignee: 'Consignatario', + subtotal: 'Subtotal', + vat: 'IVA', + total: 'Total', + saleLines: 'Líneas del pedido', + item: 'Artículo', + visible: 'Visible', + available: 'Disponible', + quantity: 'Cantidad', + description: 'Descripción', + price: 'Precio', + discount: 'Descuento', + amount: 'Importe', + packing: 'Encajado', + hasComponentLack: 'Faltan componentes', + itemShortage: 'No visible', + claim: 'Reclamación', + reserved: 'Reservado', + created: 'Fecha creación', + package: 'Embalaje', + taxClass: 'Tipo IVA', + services: 'Servicios', + changeState: 'Cambiar estado', + requester: 'Solicitante', + atender: 'Comprador', + request: 'Petición de compra' + } }, claim: { pageTitles: { diff --git a/src/pages/Ticket/Card/FetchedTags.vue b/src/pages/Ticket/Card/FetchedTags.vue new file mode 100644 index 000000000..86abe93f7 --- /dev/null +++ b/src/pages/Ticket/Card/FetchedTags.vue @@ -0,0 +1,17 @@ + + + + diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index e69de29bb..44239a25f 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -0,0 +1,504 @@ + + + + From 7ee8dbf2d6511ad43b695e1e02cce54296d9d7be Mon Sep 17 00:00:00 2001 From: alexandre Date: Mon, 28 Nov 2022 09:10:13 +0100 Subject: [PATCH 2/4] refs #4801 fetched tags added --- src/components/ui/FetchedTags.vue | 54 +++++++++++++++++++++++++ src/css/quasar.variables.scss | 1 + src/i18n/en/index.js | 3 +- src/i18n/es/index.js | 3 +- src/pages/Ticket/Card/FetchedTags.vue | 17 -------- src/pages/Ticket/Card/TicketSummary.vue | 41 ++++++++++++++++--- 6 files changed, 95 insertions(+), 24 deletions(-) create mode 100644 src/components/ui/FetchedTags.vue delete mode 100644 src/pages/Ticket/Card/FetchedTags.vue diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue new file mode 100644 index 000000000..364713cbc --- /dev/null +++ b/src/components/ui/FetchedTags.vue @@ -0,0 +1,54 @@ + + + + diff --git a/src/css/quasar.variables.scss b/src/css/quasar.variables.scss index 6476f150a..33e59074f 100644 --- a/src/css/quasar.variables.scss +++ b/src/css/quasar.variables.scss @@ -24,6 +24,7 @@ $info: #31ccec; $warning: #f2c037; $color-spacer-light: rgba(255, 255, 255, .12); +$color-spacer:rgba(255, 255, 255, .3); $border-thin-light: 1px solid $color-spacer-light; $spacing-md: 16px; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 62e83884e..acde021bd 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -227,7 +227,8 @@ export default { changeState: 'Change state', requester: 'Requester', atender: 'Atender', - request: 'Request' + request: 'Request', + goTo: 'Go to' } }, claim: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index d614591e3..78519a604 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -226,7 +226,8 @@ export default { changeState: 'Cambiar estado', requester: 'Solicitante', atender: 'Comprador', - request: 'Petición de compra' + request: 'Petición de compra', + goTo: 'Ir a' } }, claim: { diff --git a/src/pages/Ticket/Card/FetchedTags.vue b/src/pages/Ticket/Card/FetchedTags.vue deleted file mode 100644 index 86abe93f7..000000000 --- a/src/pages/Ticket/Card/FetchedTags.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - - diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 44239a25f..b172d0c89 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -6,7 +6,7 @@ import axios from 'axios'; import { dashIfEmpty, toDate, toCurrency, zeroFill } from 'src/filters'; import SkeletonSummary from 'components/ui/SkeletonSummary.vue'; import FetchData from 'components/FetchData.vue'; -import FetchedTags from './FetchedTags.vue'; +import FetchedTags from 'components/ui/FetchedTags.vue'; onMounted(() => fetch()); onUpdated(() => fetch()); @@ -126,7 +126,7 @@ async function changeState(value) { {{ t('ticket.summary.salesPerson') }} - {{ ticket.client.salesPersonUser.name }} + {{ ticket.client.salesPersonUser.name }} @@ -150,7 +150,7 @@ async function changeState(value) { {{ t('ticket.summary.invoice') }} - {{ dashIfEmpty(ticket.refFk) }} + {{ ticket.refFk }} @@ -250,6 +250,7 @@ async function changeState(value) {
{{ t('ticket.summary.saleLines') }} + {{ t('ticket.summary.goTo') }} + + diff --git a/src/pages/Customer/Card/CustomerSummaryDialog.vue b/src/pages/Customer/Card/CustomerSummaryDialog.vue index 84ecaf084..d40d99d1b 100644 --- a/src/pages/Customer/Card/CustomerSummaryDialog.vue +++ b/src/pages/Customer/Card/CustomerSummaryDialog.vue @@ -19,3 +19,11 @@ const { dialogRef, onDialogHide } = useDialogPluginComponent(); + + diff --git a/src/pages/Ticket/Card/TicketSummaryDialog.vue b/src/pages/Ticket/Card/TicketSummaryDialog.vue new file mode 100644 index 000000000..40b88a96d --- /dev/null +++ b/src/pages/Ticket/Card/TicketSummaryDialog.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index f875e5314..212a4f359 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -1,12 +1,13 @@ @@ -111,7 +110,7 @@ function showPreview(id) { {{ t('components.smartCard.openCard') }} - + {{ t('components.smartCard.openSummary') }} @@ -120,7 +119,4 @@ function showPreview(id) { - - -