From c807b5feb278c6918bec7f02189d226c5810f9ee Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 17 Jun 2024 08:21:43 -0300 Subject: [PATCH 1/5] Weekly tickets --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Ticket/TicketWeekly.vue | 327 ++++++++++++++++++++++++++++++ src/pages/Ticket/locale/en.yml | 9 + src/pages/Ticket/locale/es.yml | 9 + src/router/modules/ticket.js | 11 +- 6 files changed, 357 insertions(+), 1 deletion(-) create mode 100644 src/pages/Ticket/TicketWeekly.vue create mode 100644 src/pages/Ticket/locale/en.yml diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 5ef3a5472..7f212ca30 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -442,6 +442,7 @@ ticket: sms: Sms notes: Notes sale: Sale + weeklyTickets: Weekly tickets list: nickname: Nickname state: State diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index cfadd57b3..ff357492b 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -440,6 +440,7 @@ ticket: sms: Sms notes: Notas sale: Lineas del pedido + weeklyTickets: Tickets programados list: nickname: Alias state: Estado diff --git a/src/pages/Ticket/TicketWeekly.vue b/src/pages/Ticket/TicketWeekly.vue new file mode 100644 index 000000000..50b4c0451 --- /dev/null +++ b/src/pages/Ticket/TicketWeekly.vue @@ -0,0 +1,327 @@ + + + + + +es: + You are going to delete this weekly ticket: Vas a eliminar este ticket programado + This ticket will be removed from weekly tickets! Continue anyway?: Este ticket se eliminará de tickets programados! ¿Continuar de todas formas? + diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml new file mode 100644 index 000000000..a4c5b78ac --- /dev/null +++ b/src/pages/Ticket/locale/en.yml @@ -0,0 +1,9 @@ +weeklyTickets: + id: Ticket ID + client: Client + shipment: Shipment + agency: Agency + warehouse: Warehouse + salesperson: Salesperson + search: Search weekly tickets + searchInfo: Search weekly tickets by id or client id diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index 5348b29b9..0e2f77d73 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -1,2 +1,11 @@ +weeklyTickets: + id: ID Ticket + client: Cliente + shipment: Salida + agency: Agencia + warehouse: Almacén + salesperson: Comercial + search: Buscar por tickets programados + searchInfo: Buscar tickets programados por el identificador o el identificador del cliente Search ticket: Buscar ticket You can search by ticket id or alias: Puedes buscar por id o alias del ticket diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js index 6cb7291dc..e92ba6650 100644 --- a/src/router/modules/ticket.js +++ b/src/router/modules/ticket.js @@ -11,7 +11,7 @@ export default { component: RouterView, redirect: { name: 'TicketMain' }, menus: { - main: ['TicketList'], + main: ['TicketList', 'TicketWeekly'], card: ['TicketBoxing', 'TicketSms', 'TicketSale'], }, children: [ @@ -40,6 +40,15 @@ export default { }, component: () => import('src/pages/Ticket/TicketCreate.vue'), }, + { + name: 'TicketWeekly', + path: 'weekly', + meta: { + title: 'weeklyTickets', + icon: 'access_time', + }, + component: () => import('src/pages/Ticket/TicketWeekly.vue'), + }, ], }, { From d488a2d52391e12f4d1f89ddfdf5a86ba6ab1b4f Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 18 Jun 2024 11:50:15 -0300 Subject: [PATCH 2/5] small change --- src/pages/Ticket/TicketWeekly.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Ticket/TicketWeekly.vue b/src/pages/Ticket/TicketWeekly.vue index 50b4c0451..022f1bb30 100644 --- a/src/pages/Ticket/TicketWeekly.vue +++ b/src/pages/Ticket/TicketWeekly.vue @@ -67,7 +67,7 @@ const applyColumnFilter = async (col) => { } }; -const getInputEvents = (col) => ({ 'update:modelValue': () => applyColumnFilter(col) }); +const getInputEvents = (col) => ({ 'keyup.enter': () => applyColumnFilter(col) }); const columns = computed(() => [ { From de0ef06d926b01293350fe5a4ce76ad16307464e Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 18 Jun 2024 19:28:05 -0300 Subject: [PATCH 3/5] remove console.log --- src/pages/Ticket/TicketWeekly.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Ticket/TicketWeekly.vue b/src/pages/Ticket/TicketWeekly.vue index 022f1bb30..5dbc99d22 100644 --- a/src/pages/Ticket/TicketWeekly.vue +++ b/src/pages/Ticket/TicketWeekly.vue @@ -60,7 +60,6 @@ const applyColumnFilter = async (col) => { try { const paramKey = col.columnFilter?.filterParamKey || col.field; params[paramKey] = col.columnFilter.filterValue; - console.log('paramKey', paramKey, 'params', params); await paginateRef.value.addFilter(null, params); } catch (err) { console.error('Error applying column filter', err); From d29bf095358a62cd9db21719b65cbda66ec34531 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 25 Jun 2024 14:48:39 +0200 Subject: [PATCH 4/5] remove warnings --- src/components/ui/VnImg.vue | 2 +- src/pages/Account/Card/AccountBasicData.vue | 1 - src/pages/Route/RouteList.vue | 1 - src/pages/Route/RouteRoadmap.vue | 2 +- src/pages/Ticket/Card/TicketSale.vue | 17 ++++++++--------- 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue index a88c02898..37c1edefc 100644 --- a/src/components/ui/VnImg.vue +++ b/src/components/ui/VnImg.vue @@ -32,7 +32,7 @@ const url = computed( () => `/api/${$props.storage}/${$props.collection}/${$props.size}/${$props.id}/download?access_token=${token}&${timeStamp.value}` ); -const reload = (emit = false) => { +const reload = () => { timeStamp.value = `timestamp=${Date.now()}`; }; defineExpose({ diff --git a/src/pages/Account/Card/AccountBasicData.vue b/src/pages/Account/Card/AccountBasicData.vue index 3a9d5c9bf..42b77419f 100644 --- a/src/pages/Account/Card/AccountBasicData.vue +++ b/src/pages/Account/Card/AccountBasicData.vue @@ -3,7 +3,6 @@ import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import VnSelect from 'src/components/common/VnSelect.vue'; import FormModel from 'components/FormModel.vue'; -import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import { ref, watch } from 'vue'; diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index edec43fec..de60d164e 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -1,5 +1,4 @@ diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 7cc8539cf..9fdbd4738 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -353,15 +353,14 @@ const newOrderFromTicket = async () => { }; const goToLog = (saleId) => { - //TODO: Redireccionar cuando exista la vista TicketLog - // router.push({ - // name: 'TicketLog', - // params: { - // originId: route.params.id, - // changedModel: 'Sale', - // changedModelId: saleId, - // }, - // }); + router.push({ + name: 'TicketLog', + params: { + originId: route.params.id, + changedModel: 'Sale', + changedModelId: saleId, + }, + }); }; const changeTicketState = async (val) => { From 6e6c6301d2bcdf9e4308b5a14044395585153804 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 25 Jun 2024 15:27:48 -0300 Subject: [PATCH 5/5] fix log view not refreshing when changing id param --- src/pages/Ticket/Card/TicketLog.vue | 5 ++++- src/pages/Ticket/Card/TicketSale.vue | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/Ticket/Card/TicketLog.vue b/src/pages/Ticket/Card/TicketLog.vue index 94b63a117..94cff4dfc 100644 --- a/src/pages/Ticket/Card/TicketLog.vue +++ b/src/pages/Ticket/Card/TicketLog.vue @@ -1,7 +1,10 @@ diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index 9fdbd4738..32408bf67 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -724,8 +724,9 @@ onUnmounted(() => (stateStore.rightDrawer = false));