From 38dd54b2f5f158f51654aa91880f9c4b5e7e8712 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 9 Jul 2024 10:18:01 +0200 Subject: [PATCH] fix: i18n components --- src/pages/Ticket/Card/TicketComponents.vue | 42 +++++++++++----------- src/pages/Ticket/locale/en.yml | 2 +- src/pages/Ticket/locale/es.yml | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index 19d25d259..47a1f0aa1 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -71,39 +71,39 @@ const salesFilter = computed(() => ({ const columns = computed(() => [ { - label: t('components.item'), + label: t('ticketComponents.item'), name: 'item', align: 'left', }, { - label: t('components.description'), + label: t('ticketComponents.description'), name: 'description', align: 'left', }, { - label: t('components.quantity'), + label: t('ticketComponents.quantity'), name: 'quantity', field: 'quantity', align: 'left', format: (val) => dashIfEmpty(val), }, { - label: t('components.serie'), + label: t('ticketComponents.serie'), name: 'serie', align: 'left', }, { - label: t('components.components'), + label: t('ticketComponents.components'), name: 'components', align: 'left', }, { - label: t('components.import'), + label: t('ticketComponents.import'), name: 'import', align: 'left', }, { - label: t('components.total'), + label: t('ticketComponents.total'), name: 'total', align: 'left', }, @@ -111,7 +111,7 @@ const columns = computed(() => [ const getBase = computed(() => { let sum = 0; - for (let sale of components.value) { + for (let sale of ticketComponents.value) { for (let saleComponent of sale.components) { if (saleComponent.component.componentType.isBase) { sum += sale.quantity * saleComponent.value; @@ -123,7 +123,7 @@ const getBase = computed(() => { const getTotal = computed(() => { let total = 0; - for (let sale of components.value) { + for (let sale of ticketComponents.value) { for (let saleComponent of sale.components) { total += sale.quantity * saleComponent.value; } @@ -184,18 +184,18 @@ onUnmounted(() => (stateStore.rightDrawer = false)); > - {{ t('components.total') }} + {{ t('ticketComponents.total') }} {{ t('components.baseToCommission') }}: + >{{ t('ticketComponents.baseToCommission') }}: {{ toCurrency(getBase) }} {{ t('components.totalWithoutVat') }}: + >{{ t('ticketComponents.totalWithoutVat') }}: {{ toCurrency(getTotal) }} @@ -208,7 +208,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); > - {{ t('components.components') }} + {{ t('ticketComponents.components') }} (stateStore.rightDrawer = false)); > - {{ t('components.zoneBreakdown') }} + {{ t('ticketComponents.zoneBreakdown') }} - {{ t('components.price') }}: + {{ t('ticketComponents.price') }}: {{ toCurrency(ticketData?.zonePrice, 'EUR', 2) }} - {{ t('components.bonus') }}: + {{ t('ticketComponents.bonus') }}: {{ toCurrency(ticketData?.zoneBonus, 'EUR', 2) }} - {{ t('components.zone') }}: + {{ t('ticketComponents.zone') }}: {{ dashIfEmpty(ticketData?.zone?.name) }} @@ -258,13 +258,13 @@ onUnmounted(() => (stateStore.rightDrawer = false)); - {{ t('components.volume') }}: + {{ t('ticketComponents.volume') }}: {{ ticketVolume }} - {{ t('components.packages') }}: + {{ t('ticketComponents.packages') }}: {{ dashIfEmpty(ticketData?.packages) }} @@ -277,12 +277,12 @@ onUnmounted(() => (stateStore.rightDrawer = false)); > - {{ t('components.theoricalCost') }} + {{ t('ticketComponents.theoricalCost') }} - {{ t('components.totalPrice') }}: + {{ t('ticketComponents.totalPrice') }}: {{ toCurrency(theoricalCost, 'EUR', 2) }} diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index 861b06c9c..d5530926f 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -196,7 +196,7 @@ service: addService: Add service quantityInfo: To create services with negative amounts mark the service on the source ticket and press the pay button. createRefundSuccess: 'The following refund ticket have been created: { ticketId }' -components: +ticketComponents: item: Item description: Description quantity: Quantity diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index 7308644c8..132c61928 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -164,7 +164,7 @@ ticketSale: shipped: F. Envío agency: Agencia address: Consignatario -components: +ticketComponents: item: Artículo description: Descripción quantity: Cantidad