From 36344d112b0019372c7026eb10e19465dfddf493 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Fri, 22 Dec 2023 00:34:18 -0400 Subject: [PATCH 01/18] Create order volume --- src/i18n/en/index.js | 1 + src/i18n/es/index.js | 1 + src/pages/Order/OrderVolume.vue | 149 ++++++++++++++++++++++++++++++++ src/router/modules/order.js | 11 ++- 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 src/pages/Order/OrderVolume.vue diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 4a1eea8f4..45df3f1ff 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -557,6 +557,7 @@ export default { summary: 'Summary', basicData: 'Basic Data', catalog: 'Catalog', + volume: 'Volume' }, field: { salesPersonFk: 'Sales Person', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 3f4ac1c27..90fdb18b6 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -466,6 +466,7 @@ export default { summary: 'Resumen', basicData: 'Datos básicos', catalog: 'Catálogo', + volume: 'Volumen', }, field: { salesPersonFk: 'Comercial', diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue new file mode 100644 index 000000000..f2b451628 --- /dev/null +++ b/src/pages/Order/OrderVolume.vue @@ -0,0 +1,149 @@ + + + + + + + +en: + summary: Summary + total: Total + boxes: Boxes + item: Item + subName: Subname + quantity: Quantity + volume: m³ per quantity +es: + summary: Resumen + total: Total + boxes: Cajas + item: Artículo + subName: Subname + quantity: Cantidad + volume: m³ por cantidad + diff --git a/src/router/modules/order.js b/src/router/modules/order.js index e91e95493..8a55a39d2 100644 --- a/src/router/modules/order.js +++ b/src/router/modules/order.js @@ -11,7 +11,7 @@ export default { redirect: { name: 'OrderMain' }, menus: { main: ['OrderList'], - card: ['OrderBasicData', 'OrderCatalog'], + card: ['OrderBasicData', 'OrderCatalog', 'OrderVolume'], }, children: [ { @@ -72,6 +72,15 @@ export default { }, component: () => import('src/pages/Order/OrderCatalog.vue'), }, + { + name: 'OrderVolume', + path: 'volume', + meta: { + title: 'volume', + icon: 'vn:volume', + }, + component: () => import('src/pages/Order/OrderVolume.vue'), + }, ], }, ], From 06637cd89c004262826180ebb030f11dcbac6065 Mon Sep 17 00:00:00 2001 From: Kevin Martinez Date: Fri, 22 Dec 2023 00:50:07 -0400 Subject: [PATCH 02/18] Fix card list class --- src/pages/Order/OrderVolume.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/Order/OrderVolume.vue b/src/pages/Order/OrderVolume.vue index f2b451628..2c962600e 100644 --- a/src/pages/Order/OrderVolume.vue +++ b/src/pages/Order/OrderVolume.vue @@ -94,11 +94,6 @@ const loadVolumes = async (rows) => { + + + +es: + Identifier: Identificador + Social name: Razón social + Salesperson: Comercial + Phone: Teléfono + City: Población + Email: Email + diff --git a/src/pages/Customer/CustomerNotificationsFilter.vue b/src/pages/Customer/CustomerNotificationsFilter.vue new file mode 100644 index 000000000..1c4c8f3e2 --- /dev/null +++ b/src/pages/Customer/CustomerNotificationsFilter.vue @@ -0,0 +1,144 @@ + + + + + + + +en: + params: + identifier: Identifier + socialName: Social name + city: City + phone: Phone + email: Email +es: + params: + identifier: Identificador + socialName: Razón social + city: Población + phone: Teléfono + email: Email + Identifier: Identificador + Social name: Razón social + City: Población + Phone: Teléfono + Email: Email + diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js index ec81a9c77..04cbf42b3 100644 --- a/src/router/modules/customer.js +++ b/src/router/modules/customer.js @@ -10,7 +10,12 @@ export default { component: RouterView, redirect: { name: 'CustomerMain' }, menus: { - main: ['CustomerList', 'CustomerPayments', 'CustomerExtendedList'], + main: [ + 'CustomerList', + 'CustomerPayments', + 'CustomerExtendedList', + 'CustomerNotifications', + ], card: ['CustomerBasicData'], }, children: [ @@ -56,6 +61,16 @@ export default { component: () => import('src/pages/Customer/CustomerExtendedList.vue'), }, + { + path: 'notifications', + name: 'CustomerNotifications', + meta: { + title: 'notifications', + icon: 'notifications', + }, + component: () => + import('src/pages/Customer/CustomerNotifications.vue'), + }, ], }, { From 2e09fbd9688b907dafe4b1fac3caadc955f5c5c7 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Mon, 25 Dec 2023 20:38:13 -0300 Subject: [PATCH 08/18] Department tree and summary view --- src/components/CreateDepartmentChild.vue | 100 ++++++++++++++ src/components/ui/VnTree.vue | 88 +++++++++--- src/i18n/en/index.js | 20 +++ src/i18n/es/index.js | 20 +++ .../Department/Card/DepartmentBasicData.vue | 3 + src/pages/Department/Card/DepartmentCard.vue | 34 +++++ .../Department/Card/DepartmentDescriptor.vue | 129 ++++++++++++++++++ .../Department/Card/DepartmentSummary.vue | 107 +++++++++++++++ src/router/modules/department.js | 46 +++++++ src/router/modules/index.js | 2 + src/router/modules/worker.js | 1 + src/router/routes.js | 4 +- 12 files changed, 532 insertions(+), 22 deletions(-) create mode 100644 src/components/CreateDepartmentChild.vue create mode 100644 src/pages/Department/Card/DepartmentBasicData.vue create mode 100644 src/pages/Department/Card/DepartmentCard.vue create mode 100644 src/pages/Department/Card/DepartmentDescriptor.vue create mode 100644 src/pages/Department/Card/DepartmentSummary.vue create mode 100644 src/router/modules/department.js diff --git a/src/components/CreateDepartmentChild.vue b/src/components/CreateDepartmentChild.vue new file mode 100644 index 000000000..8f5b4b874 --- /dev/null +++ b/src/components/CreateDepartmentChild.vue @@ -0,0 +1,100 @@ + + + + + + + +es: + Name: Nombre + New department: Nuevo departamento + diff --git a/src/components/ui/VnTree.vue b/src/components/ui/VnTree.vue index 08541b6df..23faf770f 100644 --- a/src/components/ui/VnTree.vue +++ b/src/components/ui/VnTree.vue @@ -1,12 +1,22 @@ @@ -109,4 +153,6 @@ const createNode = async () => { Departments: Departamentos Remove: Quitar Create: Crear - + Are you sure you want to delete it?: ¿Seguro que quieres eliminarlo? + Delete department: Eliminar departamento + diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 66e725f4f..023016f4c 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -604,6 +604,26 @@ export default { amount: 'Amount', }, }, + department: { + pageTitles: { + basicData: 'Basic data', + department: 'Department', + summary: 'Summary', + }, + basicData: 'Basic data', + name: 'Name', + code: 'Code', + chat: 'Chat', + bossDepartment: 'Boss Department', + email: 'Email', + selfConsumptionCustomer: 'Self-consumption customer', + telework: 'Telework', + notifyOnErrors: 'Notify on errors', + worksInProduction: 'Works in production', + hasToRefill: 'Fill in days without physical check-ins', + hasToSendMail: 'Send check-ins by email', + departmentRemoved: 'Department removed', + }, worker: { pageTitles: { workers: 'Workers', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 66f14a2c1..8eb15af43 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -604,6 +604,26 @@ export default { country: 'País', }, }, + department: { + pageTitles: { + basicData: 'Basic data', + department: 'Departamentos', + summary: 'Resumen', + }, + basicData: 'Datos básicos', + name: 'Nombre', + code: 'Código', + chat: 'Chat', + bossDepartment: 'Jefe de departamento', + email: 'Email', + selfConsumptionCustomer: 'Cliente autoconsumo', + telework: 'Teletrabaja', + notifyOnErrors: 'Notificar errores', + worksInProduction: 'Pertenece a producción', + hasToRefill: 'Completar días sin registros físicos', + hasToSendMail: 'Enviar fichadas por mail', + departmentRemoved: 'Departamento eliminado', + }, worker: { pageTitles: { workers: 'Trabajadores', diff --git a/src/pages/Department/Card/DepartmentBasicData.vue b/src/pages/Department/Card/DepartmentBasicData.vue new file mode 100644 index 000000000..c4068c60d --- /dev/null +++ b/src/pages/Department/Card/DepartmentBasicData.vue @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/Department/Card/DepartmentCard.vue b/src/pages/Department/Card/DepartmentCard.vue new file mode 100644 index 000000000..a175d6bb4 --- /dev/null +++ b/src/pages/Department/Card/DepartmentCard.vue @@ -0,0 +1,34 @@ + + + + +es: + Search worker: Buscar trabajador + You can search by worker id or name: Puedes buscar por id o nombre del trabajador + diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue new file mode 100644 index 000000000..1f7e6dcbb --- /dev/null +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -0,0 +1,129 @@ + + + + + es: + Department workers: Trabajadores del departamento + diff --git a/src/pages/Department/Card/DepartmentSummary.vue b/src/pages/Department/Card/DepartmentSummary.vue new file mode 100644 index 000000000..40bb4c83d --- /dev/null +++ b/src/pages/Department/Card/DepartmentSummary.vue @@ -0,0 +1,107 @@ + + + diff --git a/src/router/modules/department.js b/src/router/modules/department.js new file mode 100644 index 000000000..aaffc3460 --- /dev/null +++ b/src/router/modules/department.js @@ -0,0 +1,46 @@ +import { RouterView } from 'vue-router'; + +export default { + path: '/department', + name: 'Department', + meta: { + title: 'department', + icon: 'vn:greuge', + }, + component: RouterView, + redirect: { name: 'DepartmentCard' }, + menus: { + main: [], + card: ['DepartmentBasicData'], + }, + children: [ + { + name: 'DepartmentCard', + path: 'department/:id', + component: () => import('src/pages/Department/Card/DepartmentCard.vue'), + redirect: { name: 'DepartmentSummary' }, + children: [ + { + name: 'DepartmentSummary', + path: 'summary', + meta: { + title: 'summary', + icon: 'launch', + }, + component: () => + import('src/pages/Department/Card/DepartmentSummary.vue'), + }, + { + name: 'DepartmentBasicData', + path: 'basic-data', + meta: { + title: 'basicData', + icon: 'vn:settings', + }, + component: () => + import('src/pages/Department/Card/DepartmentBasicData.vue'), + }, + ], + }, + ], +}; diff --git a/src/router/modules/index.js b/src/router/modules/index.js index 1eff2c180..68d1d8146 100644 --- a/src/router/modules/index.js +++ b/src/router/modules/index.js @@ -10,6 +10,7 @@ import Route from './route'; import Supplier from './Supplier'; import Travel from './travel'; import Order from './order'; +import Department from './department'; export default [ Customer, @@ -24,4 +25,5 @@ export default [ Travel, Order, invoiceIn, + Department, ]; diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index f2332618f..27a6f19a9 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -12,6 +12,7 @@ export default { menus: { main: ['WorkerList', 'WorkerDepartment'], card: ['WorkerNotificationsManager'], + departmentCard: ['BasicData'], }, children: [ { diff --git a/src/router/routes.js b/src/router/routes.js index ee8b30d64..32f5aaef6 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -8,8 +8,9 @@ import wagon from './modules/wagon'; import supplier from './modules/Supplier'; import route from './modules/route'; import travel from './modules/travel'; +import department from './modules/department'; import shelving from 'src/router/modules/shelving'; -import order from "src/router/modules/order"; +import order from 'src/router/modules/order'; const routes = [ { @@ -61,6 +62,7 @@ const routes = [ route, supplier, travel, + department, { path: '/:catchAll(.*)*', name: 'NotFound', From 893b1bb4c8471645c8976110d6381f90059acaae Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 26 Dec 2023 16:15:46 -0300 Subject: [PATCH 09/18] Add department basic data --- src/components/FormModel.vue | 11 +- src/i18n/en/index.js | 1 - src/i18n/es/index.js | 1 - .../Department/Card/DepartmentBasicData.vue | 136 +++++++++++++++++- src/pages/Department/Card/DepartmentCard.vue | 6 - 5 files changed, 141 insertions(+), 14 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 62993ef24..e683ce735 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -58,7 +58,7 @@ const $props = defineProps({ mapper: { type: Function, default: null, - } + }, }); const emit = defineEmits(['onFetch', 'onDataSaved']); @@ -129,7 +129,7 @@ async function save() { isLoading.value = true; try { - const body = $props.mapper ? $props.mapper(formData.value) : formData.value + const body = $props.mapper ? $props.mapper(formData.value) : formData.value; if ($props.urlCreate) { await axios.post($props.urlCreate, body); notify('globals.dataCreated', 'positive'); @@ -179,11 +179,14 @@ watch(formUrl, async () => { }); - - -es: - Search worker: Buscar trabajador - You can search by worker id or name: Puedes buscar por id o nombre del trabajador - From 5729204a3b39c5f2e56f33cdd6742ffdd990b897 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Thu, 28 Dec 2023 10:25:23 -0500 Subject: [PATCH 10/18] Se crea tabla y filtros de morosos en clientes --- src/i18n/en/index.js | 9 +- src/i18n/es/index.js | 9 +- .../Customer/Defaulter/CustomerDefaulter.vue | 253 ++++++++++++++++++ .../Defaulter/CustomerDefaulterFilter.vue | 238 ++++++++++++++++ .../CustomerExtendedList.vue | 0 .../CustomerExtendedListActions.vue | 2 +- .../CustomerExtendedListFilter.vue | 17 +- .../CustomerNotifications.vue | 2 +- .../CustomerNotificationsFilter.vue | 50 ++-- .../{ => Payments}/CustomerPayments.vue | 2 +- .../{ => Payments}/CustomerPaymentsFilter.vue | 0 src/router/modules/customer.js | 22 +- .../pages/Customer/CustomerPayments.spec.js | 8 +- 13 files changed, 552 insertions(+), 60 deletions(-) create mode 100644 src/pages/Customer/Defaulter/CustomerDefaulter.vue create mode 100644 src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue rename src/pages/Customer/{ => ExtendedList}/CustomerExtendedList.vue (100%) rename src/pages/Customer/{ => ExtendedList}/CustomerExtendedListActions.vue (94%) rename src/pages/Customer/{ => ExtendedList}/CustomerExtendedListFilter.vue (91%) rename src/pages/Customer/{ => Notifications}/CustomerNotifications.vue (98%) rename src/pages/Customer/{ => Notifications}/CustomerNotificationsFilter.vue (94%) rename src/pages/Customer/{ => Payments}/CustomerPayments.vue (99%) rename src/pages/Customer/{ => Payments}/CustomerPaymentsFilter.vue (100%) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index f7234ba57..18a2e4ecf 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -113,6 +113,7 @@ export default { webPayments: 'Web Payments', extendedList: 'Extended list', notifications: 'Notifications', + defaulter: 'Defaulter', createCustomer: 'Create customer', summary: 'Summary', basicData: 'Basic Data', @@ -568,7 +569,7 @@ export default { landed: 'Landed', hour: 'Hour', agency: 'Agency', - total: 'Total' + total: 'Total', }, form: { clientFk: 'Client', @@ -577,7 +578,7 @@ export default { agencyModeFk: 'Agency', }, list: { - newOrder: 'New Order' + newOrder: 'New Order', }, summary: { basket: 'Basket', @@ -603,8 +604,8 @@ export default { description: 'Description', quantity: 'Quantity', price: 'Price', - amount: 'Amount' - } + amount: 'Amount', + }, }, worker: { pageTitles: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index f96add139..af8191052 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -113,6 +113,7 @@ export default { webPayments: 'Pagos Web', extendedList: 'Listado extendido', notifications: 'Notificaciones', + defaulter: 'Morosos', createCustomer: 'Crear cliente', basicData: 'Datos básicos', summary: 'Resumen', @@ -477,7 +478,7 @@ export default { landed: 'F. entrega', hour: 'Hora', agency: 'Agencia', - total: 'Total' + total: 'Total', }, form: { clientFk: 'Cliente', @@ -486,7 +487,7 @@ export default { agencyModeFk: 'Agencia', }, list: { - newOrder: 'Nuevo Pedido' + newOrder: 'Nuevo Pedido', }, summary: { basket: 'Cesta', @@ -512,8 +513,8 @@ export default { description: 'Descripción', quantity: 'Cantidad', price: 'Precio', - amount: 'Monto' - } + amount: 'Monto', + }, }, shelving: { pageTitles: { diff --git a/src/pages/Customer/Defaulter/CustomerDefaulter.vue b/src/pages/Customer/Defaulter/CustomerDefaulter.vue new file mode 100644 index 000000000..b35980416 --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerDefaulter.vue @@ -0,0 +1,253 @@ + + + + + + + +es: + Client: Cliente + Is worker: Es trabajador + Salesperson: Comercial + Country: País + P. Method: F. Pago + Balance D.: Saldo V. + Author: Autor + Last observation: Última observación + L. O. Date: Fecha Ú. O. + Credit I.: Crédito A. + From: Desde + diff --git a/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue new file mode 100644 index 000000000..43ceb1bac --- /dev/null +++ b/src/pages/Customer/Defaulter/CustomerDefaulterFilter.vue @@ -0,0 +1,238 @@ + + + + + + + +en: + params: + clientFk: Client + salesPersonFk: Salesperson + countryFk: Country + paymentMethod: P. Method + balance: Balance D. + workerFk: Author + date: L. O. Date + credit: Credit I. + defaulterSinced: From +es: + params: + clientFk: Cliente + salesPersonFk: Comercial + countryFk: País + paymentMethod: F. Pago + balance: Saldo V. + workerFk: Autor + date: Fecha Ú. O. + credit: Crédito A. + defaulterSinced: Desde + Client: Cliente + Salesperson: Comercial + Country: País + P. Method: F. Pago + Balance D.: Saldo V. + Author: Autor + L. O. Date: Fecha Ú. O. + Credit I.: Crédito A. + From: Desde + diff --git a/src/pages/Customer/CustomerExtendedList.vue b/src/pages/Customer/ExtendedList/CustomerExtendedList.vue similarity index 100% rename from src/pages/Customer/CustomerExtendedList.vue rename to src/pages/Customer/ExtendedList/CustomerExtendedList.vue diff --git a/src/pages/Customer/CustomerExtendedListActions.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue similarity index 94% rename from src/pages/Customer/CustomerExtendedListActions.vue rename to src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue index 1fec71ffe..7e3639522 100644 --- a/src/pages/Customer/CustomerExtendedListActions.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListActions.vue @@ -4,7 +4,7 @@ import { useRouter } from 'vue-router'; import { useQuasar } from 'quasar'; -import CustomerSummaryDialog from './Card/CustomerSummaryDialog.vue'; +import CustomerSummaryDialog from '../Card/CustomerSummaryDialog.vue'; const { t } = useI18n(); const quasar = useQuasar(); diff --git a/src/pages/Customer/CustomerExtendedListFilter.vue b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue similarity index 91% rename from src/pages/Customer/CustomerExtendedListFilter.vue rename to src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue index ba1c966dc..dbed3141d 100644 --- a/src/pages/Customer/CustomerExtendedListFilter.vue +++ b/src/pages/Customer/ExtendedList/CustomerExtendedListFilter.vue @@ -80,7 +80,7 @@ const workers = ref(); -en: - params: - identifier: Identifier - socialName: Social name - salesPerson: Salesperson - phone: Phone - city: City - email: Email es: - params: - identifier: Identificador - socialName: Razón social - salesPerson: Comercial - phone: Teléfono - city: Población - email: Email Identifier: Identificador Social name: Razón social Salesperson: Comercial diff --git a/src/pages/Customer/CustomerNotifications.vue b/src/pages/Customer/Notifications/CustomerNotifications.vue similarity index 98% rename from src/pages/Customer/CustomerNotifications.vue rename to src/pages/Customer/Notifications/CustomerNotifications.vue index 91d137763..f9ff66a7b 100644 --- a/src/pages/Customer/CustomerNotifications.vue +++ b/src/pages/Customer/Notifications/CustomerNotifications.vue @@ -8,7 +8,7 @@ import { useArrayData } from 'composables/useArrayData'; import { useStateStore } from 'stores/useStateStore'; import CustomerNotificationsFilter from './CustomerNotificationsFilter.vue'; -import CustomerDescriptorProxy from './Card/CustomerDescriptorProxy.vue'; +import CustomerDescriptorProxy from '../Card/CustomerDescriptorProxy.vue'; const { t } = useI18n(); const stateStore = useStateStore(); diff --git a/src/pages/Customer/CustomerNotificationsFilter.vue b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue similarity index 94% rename from src/pages/Customer/CustomerNotificationsFilter.vue rename to src/pages/Customer/Notifications/CustomerNotificationsFilter.vue index 1c4c8f3e2..650158278 100644 --- a/src/pages/Customer/CustomerNotificationsFilter.vue +++ b/src/pages/Customer/Notifications/CustomerNotificationsFilter.vue @@ -4,8 +4,8 @@ import { useI18n } from 'vue-i18n'; import FetchData from 'components/FetchData.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; -import VnSelectFilter from 'components/common/VnSelectFilter.vue'; import VnInput from 'src/components/common/VnInput.vue'; +import VnSelectFilter from 'components/common/VnSelectFilter.vue'; const { t } = useI18n(); const props = defineProps({ @@ -15,18 +15,18 @@ const props = defineProps({ }, }); -const clients = ref(); const cities = ref(); +const clients = ref();