From 3bfbed9e545c1c1462c59ef2ac2ed7d40a4f2030 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 10 Jun 2024 13:19:09 +0200 Subject: [PATCH 001/142] refs #7529 create WorkerPIT --- src/pages/Worker/Card/WorkerPit.vue | 112 ++++++++++++++++++++++++++++ src/router/modules/worker.js | 9 +++ 2 files changed, 121 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerPit.vue diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue new file mode 100644 index 000000000..6e088ba76 --- /dev/null +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -0,0 +1,112 @@ + + + + + +es: + familySituation: Situación familiar + disabilityGrades: Discapacidad + geographicMobilityDate: Movilidad geografica + childPension: Pensión hijos + spousePension: Pensión cónyuge + isDependend: Ayuda / Movilidad reducida + spouseNif: NIF cónyuge + hasHousingPaymentBefore: Pagos vivienda anterior 2011 + hasHousingPaymentAfter: Pagos vivienda posterior 2011 + hasExtendedWorking: Prolongación actividad laboral + diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 927d11802..14b0708ac 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -176,6 +176,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerLocker.vue'), }, + { + name: 'WorkerPit', + path: 'pit', + meta: { + title: 'pit', + icon: 'lock', + }, + component: () => import('src/pages/Worker/Card/WorkerPit.vue'), + }, ], }, ], From 657dbc67615af7372b1dac8d1b93f004933369b9 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 13 Jun 2024 08:24:36 +0200 Subject: [PATCH 002/142] refs #7529 route --- src/router/modules/worker.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 14b0708ac..77b2586fa 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -23,6 +23,7 @@ export default { 'WorkerDms', 'WorkerTimeControl', 'WorkerLocker', + 'WorkerPit', ], }, children: [ From 87bce8fc216a9ed0ff9f0e67e7ca6b0944857b69 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 18 Sep 2024 12:08:38 +0200 Subject: [PATCH 003/142] refs #7529 fix workerPit --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Worker/Card/WorkerPit.vue | 28 +++++++++++++++++++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index e27dc7bd4..499b40537 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -272,6 +272,7 @@ globals: clientsActionsMonitor: Clients and actions serial: Serial medical: Mutual + pit: IRPF supplier: Supplier created: Created worker: Worker diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index ed34c8761..34f45b3ca 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -275,6 +275,7 @@ globals: clientsActionsMonitor: Clientes y acciones serial: Facturas por serie medical: Mutua + pit: IRPF supplier: Proveedor created: Fecha creación worker: Trabajador diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index 6e088ba76..e01878340 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -24,11 +24,7 @@ const toCustomerAddressCreate = () => { @on-fetch="(data) => (disabilityGradesOptions = data)" auto-load /> - + + + + + + + + @@ -109,4 +116,15 @@ es: hasHousingPaymentBefore: Pagos vivienda anterior 2011 hasHousingPaymentAfter: Pagos vivienda posterior 2011 hasExtendedWorking: Prolongación actividad laboral +en: + familySituation: Family Situation + disabilityGrades: Disability Grades + geographicMobilityDate: Geographic Mobility Date + childPension: Child Pension + spousePension: Spouse Pension + isDependend: Dependent Support / Reduced Mobility + spouseNif: Spouse NIF (Tax ID) + hasHousingPaymentBefore: Housing Payments Before 2011 + hasHousingPaymentAfter: Housing Payments After 2011 + hasExtendedWorking: Extended Work Activity From ee2f80e9bba8c9369780d03e21a69161c9f598fd Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 19 Sep 2024 10:25:22 +0200 Subject: [PATCH 004/142] refs #7529 crudModel workerPit --- src/pages/Worker/Card/WorkerPit.vue | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index e01878340..4a6cd12df 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -8,6 +8,7 @@ import FormModel from 'src/components/FormModel.vue'; import VnRow from 'components/ui/VnRow.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import CrudModel from 'components/CrudModel.vue'; const route = useRoute(); const { t } = useI18n(); @@ -91,17 +92,29 @@ const toCustomerAddressCreate = () => { - - + + + From fb7087d38a09d13eb2706fe39efc24e75501d075 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 15 Oct 2024 10:26:07 +0200 Subject: [PATCH 005/142] fix: refs #7229 download file --- src/composables/downloadFile.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/composables/downloadFile.js b/src/composables/downloadFile.js index 12639dcd6..f46697fb1 100644 --- a/src/composables/downloadFile.js +++ b/src/composables/downloadFile.js @@ -1,11 +1,28 @@ import { useSession } from 'src/composables/useSession'; import { getUrl } from './getUrl'; +import axios from 'axios'; +import { exportFile } from 'quasar'; const { getTokenMultimedia } = useSession(); const token = getTokenMultimedia(); export async function downloadFile(id, model = 'dms', urlPath = '/downloadFile', url) { - let appUrl = await getUrl('', 'lilium'); - appUrl = appUrl.replace('/#/', ''); - window.open(url ?? `${appUrl}/api/${model}/${id}${urlPath}?access_token=${token}`); + try { + const appUrl = (await getUrl('', 'lilium')).replace('/#/', ''); + const response = await axios.get( + url ?? `${appUrl}/${model}/${id}${urlPath}?access_token=${token}`, + { responseType: 'blob' } + ); + + const contentDisposition = response.headers['content-disposition']; + const matches = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(contentDisposition); + const filename = + matches != null && matches[1] + ? matches[1].replace(/['"]/g, '') + : 'downloaded-file'; + + exportFile(filename, response.data); + } catch (error) { + console.error('Error downloading the file', error); + } } From 8381a250171c00c8bf832b9efde290bce4fd1ab9 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 18 Oct 2024 13:46:34 +0200 Subject: [PATCH 006/142] fix: refs #8036 apply exprBuilder after save filters --- src/components/ui/VnFilterPanel.vue | 3 +-- src/composables/useArrayData.js | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 43d634ad9..4dececa91 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -37,7 +37,7 @@ const $props = defineProps({ }, hiddenTags: { type: Array, - default: () => ['filter', 'search', 'or', 'and'], + default: () => ['filter', 'or', 'and'], }, customTags: { type: Array, @@ -62,7 +62,6 @@ const emit = defineEmits([ 'update:modelValue', 'refresh', 'clear', - 'search', 'init', 'remove', 'setUserParams', diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 30bcac66b..c55e08d74 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -74,18 +74,10 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { limit: store.limit, }; - let exprFilter; let userParams = { ...store.userParams }; - if (store?.exprBuilder) { - const where = buildFilter(userParams, (param, value) => { - const res = store.exprBuilder(param, value); - if (res) delete userParams[param]; - return res; - }); - exprFilter = where ? { where } : null; - } - Object.assign(filter, store.userFilter, exprFilter); + Object.assign(filter, store.userFilter); + let where; if (filter?.where || store.filter?.where) where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {}); @@ -98,8 +90,22 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { if (store.order && store.order.length) params.filter.order = store.order; else delete params.filter.order; + store.currentFilter = JSON.parse(JSON.stringify(params)); + store.currentFilter.filter = JSON.stringify(store.currentFilter.filter); + + let exprFilter; + if (store?.exprBuilder) { + exprFilter = buildFilter(params, (param, value) => { + if (param == 'filter') return; + const res = store.exprBuilder(param, value); + if (res) delete params[param]; + return res; + }); + } + + params.filter.where = { ...params.filter.where, ...exprFilter }; params.filter = JSON.stringify(params.filter); - store.currentFilter = params; + store.isLoading = true; const response = await axios.get(store.url, { signal: canceller.signal, From bfc906a3469077b448df99163690b4d20b0afd3b Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 18 Oct 2024 13:48:10 +0200 Subject: [PATCH 007/142] fix: refs #8036 only add where when required --- src/composables/useArrayData.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c55e08d74..6b1d183f2 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -103,7 +103,8 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { }); } - params.filter.where = { ...params.filter.where, ...exprFilter }; + if (params.filter.where || exprFilter) + params.filter.where = { ...params.filter.where, ...exprFilter }; params.filter = JSON.stringify(params.filter); store.isLoading = true; From 1aefad58e916b5ed9065c1413883013987de9281 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 18 Oct 2024 14:05:38 +0200 Subject: [PATCH 008/142] fix: refs #7529 fix front --- src/pages/Worker/Card/WorkerPit.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/Worker/Card/WorkerPit.vue b/src/pages/Worker/Card/WorkerPit.vue index 4a6cd12df..ac3e75026 100644 --- a/src/pages/Worker/Card/WorkerPit.vue +++ b/src/pages/Worker/Card/WorkerPit.vue @@ -13,7 +13,7 @@ import CrudModel from 'components/CrudModel.vue'; const route = useRoute(); const { t } = useI18n(); const router = useRouter(); - +const disabilityGradesOptions = ref(); const toCustomerAddressCreate = () => { router.push({ name: 'CustomerAddressCreate' }); }; @@ -21,11 +21,16 @@ const toCustomerAddressCreate = () => {