From 09582ab6a895a7a763dc24812bc30ac7238cb957 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 13 Mar 2024 09:05:23 -0300 Subject: [PATCH 01/22] WIP --- src/i18n/en/index.js | 16 + src/i18n/es/index.js | 16 + src/pages/Item/ItemList.vue | 550 ++++++++++++++++++++++++++++++- src/router/modules/item.js | 4 +- src/stores/useNavigationStore.js | 1 + 5 files changed, 584 insertions(+), 3 deletions(-) diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 94d552be3..6c4cc34f3 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -1164,6 +1164,22 @@ export default { warehouseText: 'Calculated on the warehouse of { warehouseName }', itemDiary: 'Item diary', }, + list: { + id: 'Identifier', + grouping: 'Grouping', + description: 'Description', + stems: 'Stems', + category: 'Category', + type: 'Type', + intrastat: 'Intrastat', + size: 'Size', + origin: 'Origin', + userName: 'Buyer', + weightByPiece: 'Weight/Piece', + multiplier: 'Multiplier', + producer: 'Producer', + landed: 'Landed', + }, }, components: { topbar: {}, diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index bcd780f5b..4ad9a1d5c 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -1164,6 +1164,22 @@ export default { warehouseText: 'Calculado sobre el almacén de { warehouseName }', itemDiary: 'Registro de compra-venta', }, + list: { + id: 'Identificador', + grouping: 'Grouping', + description: 'Descripción', + stems: 'Tallos', + category: 'Reino', + type: 'Tipo', + intrastat: 'Intrastat', + size: 'Medida', + origin: 'Origen', + weightByPiece: 'Peso (gramos)/tallo', + userName: 'Comprador', + multiplier: 'Multiplicador', + producer: 'Productor', + landed: 'F. entrega', + }, }, components: { topbar: {}, diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue index 49a5dbb64..14549296b 100644 --- a/src/pages/Item/ItemList.vue +++ b/src/pages/Item/ItemList.vue @@ -1 +1,549 @@ - + + + + + +es: + New item: Nuevo artículo + diff --git a/src/router/modules/item.js b/src/router/modules/item.js index d3462e15c..700278617 100644 --- a/src/router/modules/item.js +++ b/src/router/modules/item.js @@ -10,7 +10,7 @@ export default { component: RouterView, redirect: { name: 'ItemMain' }, menus: { - main: [], + main: ['ItemList'], card: [], }, children: [ @@ -18,7 +18,7 @@ export default { path: '', name: 'ItemMain', component: () => import('src/pages/Item/ItemMain.vue'), - redirect: { name: 'Itemlist' }, + redirect: { name: 'ItemList' }, children: [ { path: 'list', diff --git a/src/stores/useNavigationStore.js b/src/stores/useNavigationStore.js index afd3af0c0..f075301f6 100644 --- a/src/stores/useNavigationStore.js +++ b/src/stores/useNavigationStore.js @@ -7,6 +7,7 @@ import routes from 'src/router/modules'; export const useNavigationStore = defineStore('navigationStore', () => { const modules = [ + 'item', 'shelving', 'order', 'customer', From aa2db28edab94ee3f0da0771c3e71337697399d6 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Fri, 22 Mar 2024 08:30:54 -0500 Subject: [PATCH 02/22] Se crea submodulo mis documentos en worker --- src/css/app.scss | 5 + src/i18n/en/index.js | 5 +- src/i18n/es/index.js | 5 +- src/pages/Worker/Card/WorkerDms.vue | 164 +++++++++++ .../Worker/components/WorkerDmsActions.vue | 96 +++++++ .../Worker/components/WorkerDmsCreate.vue | 262 ++++++++++++++++++ .../Worker/components/WorkerDmsDelete.vue | 82 ++++++ src/pages/Worker/components/WorkerDmsEdit.vue | 246 ++++++++++++++++ src/router/modules/worker.js | 31 ++- 9 files changed, 891 insertions(+), 5 deletions(-) create mode 100644 src/pages/Worker/Card/WorkerDms.vue create mode 100644 src/pages/Worker/components/WorkerDmsActions.vue create mode 100644 src/pages/Worker/components/WorkerDmsCreate.vue create mode 100644 src/pages/Worker/components/WorkerDmsDelete.vue create mode 100644 src/pages/Worker/components/WorkerDmsEdit.vue diff --git a/src/css/app.scss b/src/css/app.scss index 3baa60c9b..c52cdb5d2 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -85,6 +85,11 @@ select:-webkit-autofill { color: $white; } +.card-width { + max-width: 800px; + width: 100%; +} + .vn-card { background-color: var(--vn-section-color); color: var(--vn-text-color); diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 80744b83d..197e94582 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -837,6 +837,7 @@ export default { workerCreate: 'New worker', department: 'Department', pda: 'PDA', + dms: 'My documentation', }, list: { name: 'Name', @@ -955,7 +956,7 @@ export default { roadmap: 'Roadmap', summary: 'Summary', basicData: 'Basic Data', - stops: 'Stops' + stops: 'Stops', }, }, roadmap: { @@ -963,7 +964,7 @@ export default { roadmap: 'Roadmap', summary: 'Summary', basicData: 'Basic Data', - stops: 'Stops' + stops: 'Stops', }, }, route: { diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index 37ba8da85..61896a283 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -837,6 +837,7 @@ export default { workerCreate: 'Nuevo trabajador', department: 'Departamentos', pda: 'PDA', + dms: 'Mi documentación', }, list: { name: 'Nombre', @@ -955,7 +956,7 @@ export default { roadmap: 'Troncales', summary: 'Resumen', basicData: 'Datos básicos', - stops: 'Paradas' + stops: 'Paradas', }, }, roadmap: { @@ -963,7 +964,7 @@ export default { roadmap: 'Troncales', summary: 'Resumen', basicData: 'Datos básicos', - stops: 'Paradas' + stops: 'Paradas', }, }, route: { diff --git a/src/pages/Worker/Card/WorkerDms.vue b/src/pages/Worker/Card/WorkerDms.vue new file mode 100644 index 000000000..144e3edee --- /dev/null +++ b/src/pages/Worker/Card/WorkerDms.vue @@ -0,0 +1,164 @@ + + + + + + + +es: + Id: Id + Order: Orden + Reference: Referencia + Description: Descripción + File: Archivo + Original: Original + Created: Fecha creación + Upload file: Subir fichero + diff --git a/src/pages/Worker/components/WorkerDmsActions.vue b/src/pages/Worker/components/WorkerDmsActions.vue new file mode 100644 index 000000000..9a8e4816e --- /dev/null +++ b/src/pages/Worker/components/WorkerDmsActions.vue @@ -0,0 +1,96 @@ + + + + + +en: + actionFile: '{action} file' +es: + actionFile: '{action} fichero' + diff --git a/src/pages/Worker/components/WorkerDmsCreate.vue b/src/pages/Worker/components/WorkerDmsCreate.vue new file mode 100644 index 000000000..d38e044ca --- /dev/null +++ b/src/pages/Worker/components/WorkerDmsCreate.vue @@ -0,0 +1,262 @@ + + + + + +en: + clientFileDescription: '{dmsTypeName} FROM CLIENT {clientName} ID {clientId}' +es: + Reference: Referencia + Company: Empresa + Warehouse: Almacén + Type: Tipo + Description: Descripción + clientFileDescription: '{dmsTypeName} DEL CLIENTE {clientName} ID {clientId}' + File: Fichero + Select a file: Selecciona un fichero + Allowed content types: Tipos de archivo permitidos + Generate identifier for original file: Generar identificador para archivo original + diff --git a/src/pages/Worker/components/WorkerDmsDelete.vue b/src/pages/Worker/components/WorkerDmsDelete.vue new file mode 100644 index 000000000..5e1b98b24 --- /dev/null +++ b/src/pages/Worker/components/WorkerDmsDelete.vue @@ -0,0 +1,82 @@ + + + + + +es: + This file will be deleted: Este fichero va a ser borrado + Are you sure you want to continue?: ¿Seguro que quieres continuar? + diff --git a/src/pages/Worker/components/WorkerDmsEdit.vue b/src/pages/Worker/components/WorkerDmsEdit.vue new file mode 100644 index 000000000..8e84c6326 --- /dev/null +++ b/src/pages/Worker/components/WorkerDmsEdit.vue @@ -0,0 +1,246 @@ + + + + + +en: + clientFileDescription: '{dmsTypeName} FROM CLIENT {clientName} ID {clientId}' +es: + Reference: Referencia + Company: Empresa + Warehouse: Almacén + Type: Tipo + Description: Descripción + clientFileDescription: '{dmsTypeName} DEL CLIENTE {clientName} ID {clientId}' + File: Fichero + Select a file: Selecciona un fichero + Allowed content types: Tipos de archivo permitidos + Generate identifier for original file: Generar identificador para archivo original + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 1c722afe8..a3b2d52dc 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -12,7 +12,7 @@ export default { redirect: { name: 'WorkerMain' }, menus: { main: ['WorkerList', 'WorkerDepartment'], - card: ['WorkerNotificationsManager', 'WorkerPda'], + card: ['WorkerNotificationsManager', 'WorkerPda', 'WorkerDms'], departmentCard: ['BasicData'], }, children: [ @@ -85,6 +85,35 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerPda.vue'), }, + { + path: 'dms', + name: 'DmsCard', + redirect: { name: 'WorkerDms' }, + children: [ + { + path: '', + name: 'WorkerDms', + meta: { + title: 'dms', + icon: 'cloud_upload', + }, + component: () => + import('src/pages/Worker/Card/WorkerDms.vue'), + }, + { + path: 'create', + name: 'WorkerDmsCreate', + component: () => + import('src/pages/Worker/components/WorkerDmsCreate.vue'), + }, + { + path: ':dmsId/edit', + name: 'WorkerDmsEdit', + component: () => + import('src/pages/Worker/components/WorkerDmsEdit.vue'), + }, + ], + }, ], }, ], From 627d3bbe85a38232de80a5d92bb67aee98a38291 Mon Sep 17 00:00:00 2001 From: carlosfonseca Date: Mon, 25 Mar 2024 16:00:47 -0500 Subject: [PATCH 03/22] Se implementan las correcciones a los comentarios --- src/pages/Worker/Card/WorkerDms.vue | 36 ++- .../Worker/components/WorkerDmsActions.vue | 16 +- .../Worker/components/WorkerDmsCreate.vue | 277 ++---------------- src/pages/Worker/components/WorkerDmsEdit.vue | 262 +++-------------- src/router/modules/worker.js | 32 +- 5 files changed, 103 insertions(+), 520 deletions(-) diff --git a/src/pages/Worker/Card/WorkerDms.vue b/src/pages/Worker/Card/WorkerDms.vue index 144e3edee..f794f6b17 100644 --- a/src/pages/Worker/Card/WorkerDms.vue +++ b/src/pages/Worker/Card/WorkerDms.vue @@ -1,22 +1,27 @@ @@ -95,6 +107,12 @@ const toWorkerDmsCreate = () => { auto-load :url="`WorkerDms/${route.params.id}/filter`" /> + { > @@ -138,7 +158,7 @@ const toWorkerDmsCreate = () => { - + {{ t('Upload file') }} @@ -147,7 +167,7 @@ const toWorkerDmsCreate = () => { diff --git a/src/pages/Worker/components/WorkerDmsActions.vue b/src/pages/Worker/components/WorkerDmsActions.vue index 9a8e4816e..2a6ab1ce3 100644 --- a/src/pages/Worker/components/WorkerDmsActions.vue +++ b/src/pages/Worker/components/WorkerDmsActions.vue @@ -1,17 +1,15 @@ - - -en: - clientFileDescription: '{dmsTypeName} FROM CLIENT {clientName} ID {clientId}' -es: - Reference: Referencia - Company: Empresa - Warehouse: Almacén - Type: Tipo - Description: Descripción - clientFileDescription: '{dmsTypeName} DEL CLIENTE {clientName} ID {clientId}' - File: Fichero - Select a file: Selecciona un fichero - Allowed content types: Tipos de archivo permitidos - Generate identifier for original file: Generar identificador para archivo original - diff --git a/src/pages/Worker/components/WorkerDmsEdit.vue b/src/pages/Worker/components/WorkerDmsEdit.vue index 8e84c6326..7656fe09f 100644 --- a/src/pages/Worker/components/WorkerDmsEdit.vue +++ b/src/pages/Worker/components/WorkerDmsEdit.vue @@ -1,246 +1,56 @@ - - -en: - clientFileDescription: '{dmsTypeName} FROM CLIENT {clientName} ID {clientId}' -es: - Reference: Referencia - Company: Empresa - Warehouse: Almacén - Type: Tipo - Description: Descripción - clientFileDescription: '{dmsTypeName} DEL CLIENTE {clientName} ID {clientId}' - File: Fichero - Select a file: Selecciona un fichero - Allowed content types: Tipos de archivo permitidos - Generate identifier for original file: Generar identificador para archivo original - diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index a3b2d52dc..c0fe6e1fa 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -86,33 +86,13 @@ export default { component: () => import('src/pages/Worker/Card/WorkerPda.vue'), }, { + name: 'WorkerDms', path: 'dms', - name: 'DmsCard', - redirect: { name: 'WorkerDms' }, - children: [ - { - path: '', - name: 'WorkerDms', - meta: { - title: 'dms', - icon: 'cloud_upload', - }, - component: () => - import('src/pages/Worker/Card/WorkerDms.vue'), - }, - { - path: 'create', - name: 'WorkerDmsCreate', - component: () => - import('src/pages/Worker/components/WorkerDmsCreate.vue'), - }, - { - path: ':dmsId/edit', - name: 'WorkerDmsEdit', - component: () => - import('src/pages/Worker/components/WorkerDmsEdit.vue'), - }, - ], + meta: { + title: 'dms', + icon: 'cloud_upload', + }, + component: () => import('src/pages/Worker/Card/WorkerDms.vue'), }, ], }, From 0d6d18b8c8ddd9046f84a5ad71d54ccba0b7a379 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Wed, 27 Mar 2024 20:33:35 -0300 Subject: [PATCH 04/22] Apply VnDmsList component and add docuware action --- src/components/common/VnDmsList.vue | 33 +++- src/composables/downloadFile.js | 9 +- src/composables/getUrl.js | 24 +++ src/pages/Worker/Card/WorkerDms.vue | 185 +----------------- .../Worker/components/WorkerDmsActions.vue | 94 --------- .../Worker/components/WorkerDmsCreate.vue | 37 ---- .../Worker/components/WorkerDmsDelete.vue | 82 -------- src/pages/Worker/components/WorkerDmsEdit.vue | 56 ------ 8 files changed, 67 insertions(+), 453 deletions(-) delete mode 100644 src/pages/Worker/components/WorkerDmsActions.vue delete mode 100644 src/pages/Worker/components/WorkerDmsCreate.vue delete mode 100644 src/pages/Worker/components/WorkerDmsDelete.vue delete mode 100644 src/pages/Worker/components/WorkerDmsEdit.vue diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue index 23e00f5d9..9bf90230d 100644 --- a/src/components/common/VnDmsList.vue +++ b/src/components/common/VnDmsList.vue @@ -9,6 +9,7 @@ import FetchData from 'components/FetchData.vue'; import VnDms from 'src/components/common/VnDms.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; import { downloadFile } from 'src/composables/downloadFile'; +import { getUrlFindOne } from 'composables/getUrl'; const route = useRoute(); const quasar = useQuasar(); @@ -142,15 +143,17 @@ const columns = computed(() => [ components: [ { component: QBtn, + name: 'download', props: () => ({ icon: 'cloud_download', flat: true, color: 'primary', }), - click: (prop) => downloadFile(prop.row.id), + click: (prop) => downloadFile(prop.row.id, prop.row.isDocuware), }, { component: QBtn, + name: 'edit', props: () => ({ icon: 'edit', flat: true, @@ -160,6 +163,7 @@ const columns = computed(() => [ }, { component: QBtn, + name: 'delete', props: () => ({ icon: 'delete', flat: true, @@ -167,6 +171,16 @@ const columns = computed(() => [ }), click: (prop) => deleteDms(prop.row.id), }, + { + component: QBtn, + name: 'openDocuware', + props: () => ({ + icon: 'open_in_new', + flat: true, + color: 'primary', + }), + click: () => openDocuware(), + }, ], }, ]); @@ -206,6 +220,16 @@ function parseDms(data) { } return data; } + +async function openDocuware() { + const url = await getUrlFindOne('WebClient', 'docuware'); + if (url) window.open(url).focus(); +} + +function shouldRenderButton(buttonName, isDocuware = false) { + // Renderizar el botón si no se llama 'openDocuware' o (se llama 'openDocuware' y props.row.isDocuware = true) + return buttonName !== 'openDocuware' || (buttonName === 'openDocuware' && isDocuware); +} -