diff --git a/package.json b/package.json index 799401c08..e09a2ac9e 100644 --- a/package.json +++ b/package.json @@ -53,4 +53,4 @@ "vite": "^4.3.5", "vitest": "^0.31.1" } -} \ No newline at end of file +} diff --git a/quasar.config.js b/quasar.config.js index cbcbae4dc..e8f746fd6 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -66,7 +66,9 @@ module.exports = configure(function (/* ctx */) { // publicPath: '/', // analyze: true, // env: {}, - // rawDefine: {} + rawDefine: { + 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) + }, // ignorePublicFolder: true, // minify: false, // polyfillModulePreload: true, diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index ce46d1d47..3c240d5c2 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -172,7 +172,7 @@ async function changeState(value) { :label="t('ticket.summary.agency')" :value="ticket.agencyMode.name" /> - + value + 1, - substract: (value) => (value ? value - 1 : 0), + add: (counter) => counter + 1, + subtract: (counter) => (counter ? counter - 1 : 0), flush: () => 0, + addSpecific: (counter, amount) => counter + amount, }; onMounted(() => { @@ -38,14 +39,14 @@ function getUrl(id) { return `/api/Images/catalog/200x200/${id}/download?access_token=${token}`; } -async function handleEvent(type, action) { +async function handleEvent(type, action, amount) { const counter = counters.value[type].count; let isOk = true; if (action == 'flush') isOk = await confirm(); if (isOk) { - counters.value[type].count = actions[action](counter); + counters.value[type].count = actions[action](counter, amount); localStorage.setItem(type, counters.value[type].count); } } @@ -57,7 +58,7 @@ function confirm() { component: VnConfirm, componentProps: { title: t('Are you sure?'), - message: t('Se pondrá el contador a cero'), + message: t('The counter will be reset to zero'), }, }) .onOk(() => resolve(true)) @@ -86,9 +87,31 @@ function confirm() { color="warning" dense size="sm" - @click="handleEvent(name, 'substract')" + v-if="props.isTray" + @click="handleEvent(name, 'addSpecific', 30)" > - {{ t('Substract 1') }} + {{ t('Add 30') }} + + + {{ t('Add 10') }} + + + + + {{ t('Subtract 1') }} es: - Substract 1: Quitar 1 + Subtract 1: Quitar 1 + Add 30: Añadir 30 + Add 10: Añadir 10 Flush: Vaciar Are you sure?: ¿Estás seguro? It will set to 0: Se pondrá a 0 + The counter will be reset to zero: Se pondrá el contador a cero