From b06234441c0d0ead6cd7efc3b089cd826acde540 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Fri, 19 Jan 2024 10:08:26 -0500 Subject: [PATCH 1/9] Se crean las tarjetas de greuges, recobros y acceso web --- src/pages/Customer/Card/CustomerCredits.vue | 20 +- src/pages/Customer/Card/CustomerGreuges.vue | 201 +++++++++++++++++- .../Customer/Card/CustomerRecoveries.vue | 156 +++++++++++++- src/pages/Customer/Card/CustomerWebAccess.vue | 68 +++++- .../components/CustomerGreugeCreate.vue | 93 ++++++++ .../components/CustomerNoteCreate.vue | 2 +- .../components/CustomerRecoverieCreate.vue | 72 +++++++ src/router/modules/customer.js | 64 ++++-- 8 files changed, 644 insertions(+), 32 deletions(-) create mode 100644 src/pages/Customer/components/CustomerGreugeCreate.vue create mode 100644 src/pages/Customer/components/CustomerRecoverieCreate.vue diff --git a/src/pages/Customer/Card/CustomerCredits.vue b/src/pages/Customer/Card/CustomerCredits.vue index 13bc684b3..7840453ef 100644 --- a/src/pages/Customer/Card/CustomerCredits.vue +++ b/src/pages/Customer/Card/CustomerCredits.vue @@ -1,22 +1,24 @@ + + + + + +es: + Total: Total + Date: Fecha + Created by: Creado por + Comment: Comentario + Type: Tipo + Amount: Importe + New greuge: Nuevo greuge + diff --git a/src/pages/Customer/Card/CustomerRecoveries.vue b/src/pages/Customer/Card/CustomerRecoveries.vue index 54274717c..7247145f2 100644 --- a/src/pages/Customer/Card/CustomerRecoveries.vue +++ b/src/pages/Customer/Card/CustomerRecoveries.vue @@ -1,3 +1,157 @@ + + + + + + +es: + Since: Desde + To: Hasta + Amount: Importe + Period: Periodo + New recoverie: Nuevo recobro + diff --git a/src/pages/Customer/Card/CustomerWebAccess.vue b/src/pages/Customer/Card/CustomerWebAccess.vue index 95ec77c3d..d3be7bec8 100644 --- a/src/pages/Customer/Card/CustomerWebAccess.vue +++ b/src/pages/Customer/Card/CustomerWebAccess.vue @@ -1,3 +1,69 @@ + + + + +es: + Enable web access: Habilitar acceso web + User: Usuario + Recovery email: Correo de recuperacion + This email is used for user to regain access their account: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta + diff --git a/src/pages/Customer/components/CustomerGreugeCreate.vue b/src/pages/Customer/components/CustomerGreugeCreate.vue new file mode 100644 index 000000000..1ff467d97 --- /dev/null +++ b/src/pages/Customer/components/CustomerGreugeCreate.vue @@ -0,0 +1,93 @@ + + + + + + + +es: + Amount: Importe + Date: Fecha + Comment: Comentario + Type: Tipo + diff --git a/src/pages/Customer/components/CustomerNoteCreate.vue b/src/pages/Customer/components/CustomerNoteCreate.vue index cea90f975..640f6f3a0 100644 --- a/src/pages/Customer/components/CustomerNoteCreate.vue +++ b/src/pages/Customer/components/CustomerNoteCreate.vue @@ -32,8 +32,8 @@ const toCustomerNotes = () => { -
{{ data }}
From 660a53b44fca837b87336bcd0500a06101f00b73 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Mon, 22 Jan 2024 12:52:53 -0400 Subject: [PATCH 3/9] Add response data on form model save --- src/components/FormModel.vue | 2 +- src/pages/Route/Card/RouteForm.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 4ad566bf8..755cef77c 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -135,7 +135,7 @@ async function save() { } else { response = await axios.patch($props.urlUpdate || $props.url, body); } - emit('onDataSaved', formData.value, response); + emit('onDataSaved', formData.value, response?.data); originalData.value = JSON.parse(JSON.stringify(formData.value)); hasChanges.value = false; } catch (err) { diff --git a/src/pages/Route/Card/RouteForm.vue b/src/pages/Route/Card/RouteForm.vue index 49a067c00..5acbcff0e 100644 --- a/src/pages/Route/Card/RouteForm.vue +++ b/src/pages/Route/Card/RouteForm.vue @@ -71,8 +71,8 @@ const routeFilter = { }; const onSave = (data, response) => { if (isNew) { - axios.post(`Routes/${response.data?.id}/updateWorkCenter`); - router.push({ name: 'RouteSummary', params: { id: response.data?.id } }); + axios.post(`Routes/${response?.id}/updateWorkCenter`); + router.push({ name: 'RouteSummary', params: { id: response?.id } }); } }; From d0d57f71e0a02738dfa6144b34e566ec2d85d9ee Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Wed, 24 Jan 2024 06:51:52 -0400 Subject: [PATCH 4/9] Implement routes report --- src/pages/Route/RouteList.vue | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 591f723e9..392d7f8cb 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -15,11 +15,13 @@ import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; import { useQuasar } from 'quasar'; import RouteSummaryDialog from 'pages/Route/Card/RouteSummaryDialog.vue'; +import {useSession} from "composables/useSession"; const stateStore = useStateStore(); const { t } = useI18n(); const { validate } = useValidator(); const quasar = useQuasar(); +const session = useSession(); const to = Date.vnNew(); to.setDate(to.getDate() + 1); @@ -149,6 +151,23 @@ const cloneRoutes = () => { startingDate.value = null; }; +const showRouteReport = () => { + const ids = selectedRows.value.map(row => row?.id) + const idString = ids.join(',') + let url; + + if (selectedRows.value.length <= 1) { + url = `api/Routes/${idString}/driver-route-pdf?access_token=${session.getToken()}`; + } else { + const params = new URLSearchParams({ + access_token: session.getToken(), + id: idString + }) + url = `api/Routes/downloadZip?${params.toString()}`; + } + window.open(url, '_blank'); +} + const markAsServed = () => { selectedRows.value.forEach((row) => { if (row?.id) { @@ -206,7 +225,6 @@ function previewRoute(id) { autofocus /> - @@ -239,7 +257,15 @@ function previewRoute(id) { > {{ t('Clone Selected Routes') }} - + + {{ t('Download selected routes as PDF') }} + From 1d6625a9be1e0962086b415c8ae8e026c59107fb Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Thu, 25 Jan 2024 05:50:00 -0500 Subject: [PATCH 5/9] Se crea la tarjeta de balances --- src/pages/Customer/Card/CustomerBalance.vue | 281 ++++++++++++++++- .../Customer/Card/CustomerConsignees.vue | 18 +- src/pages/Customer/Card/CustomerGreuges.vue | 4 +- src/pages/Customer/Card/CustomerNotes.vue | 2 +- .../components/CustomerConsigneeCreate.vue | 4 +- .../components/CustomerNewPayment.vue | 286 ++++++++++++++++++ 6 files changed, 577 insertions(+), 18 deletions(-) create mode 100644 src/pages/Customer/components/CustomerNewPayment.vue diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index 9e44f67f5..5d296881f 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -1,3 +1,282 @@ + + + + +es: + Company: Empresa + Total by company: Total por empresa + New payment: Añadir pago + Date: Fecha + Creation date: Fecha de creación + Employee: Empleado + Reference: Referencia + Bank: Caja + Debit: Debe + Havings: Haber + Balance: Balance + Conciliated: Conciliado + diff --git a/src/pages/Customer/Card/CustomerConsignees.vue b/src/pages/Customer/Card/CustomerConsignees.vue index bf61ea302..7e643208e 100644 --- a/src/pages/Customer/Card/CustomerConsignees.vue +++ b/src/pages/Customer/Card/CustomerConsignees.vue @@ -137,21 +137,15 @@ const toCustomerConsigneeEdit = (consigneeId) => { - - - - - {{ t('New consignee') }} - - + + + + {{ t('New consignee') }} + +