From d4fbd99473d75b94b2b7444294558217376f40eb Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 May 2024 09:40:48 +0200 Subject: [PATCH 01/12] refs #7406 table formation --- src/pages/Worker/Card/WorkerFormation.vue | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 src/pages/Worker/Card/WorkerFormation.vue diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue new file mode 100644 index 0000000000..f8e458e1b7 --- /dev/null +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -0,0 +1,84 @@ + + From c865bc2ed45331d4083aad3d0eaf7ec0bcc1c8aa Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 May 2024 10:07:32 +0200 Subject: [PATCH 02/12] refs #7406 fix props --- src/pages/Worker/Card/WorkerFormation.vue | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index f8e458e1b7..312acf4f2a 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -58,6 +58,44 @@ const columns = computed(() => [ { align: 'left', name: 'invoice', + label: t('worker.formation.tableVisibleColumns.invoice'), + isTitle: true, + component: 'input', + }, + { + align: 'left', + name: 'amount', + label: t('worker.formation.tableVisibleColumns.amount'), + isTitle: true, + component: 'input', + props: (prop) => ({ + disable: true, + 'model-value': prop.row.amount, + }), + create: true, + }, + { + align: 'left', + name: 'remark', + label: t('worker.formation.tableVisibleColumns.remark'), + isTitle: true, + component: 'checkbox', + props: (prop) => ({ + disable: true, + 'model-value': prop.row.remark, + }), + create: true, + }, + { + align: 'left', + name: 'hasDiploma', + label: t('worker.formation.tableVisibleColumns.hasDiploma'), + isTitle: true, + props: (prop) => ({ + disable: true, + 'model-value': prop.row.hasDiploma, + }), + create: true, }, ]); From ef52c9b0c0a6920c0dfd9d89c6beb18edc39f9a5 Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 May 2024 10:42:47 +0200 Subject: [PATCH 03/12] refs #7406 routes trad --- src/i18n/locale/en.yml | 2 +- src/i18n/locale/es.yml | 1 + src/router/modules/worker.js | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 3853e3ab6a..3eb4649372 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -830,7 +830,7 @@ worker: calendar: Calendar timeControl: Time control locker: Locker - + formation: Formation list: name: Name email: Email diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index a8b9ecd51e..652fb7e6e6 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -828,6 +828,7 @@ worker: calendar: Calendario timeControl: Control de horario locker: Taquilla + formation: Formación list: name: Nombre email: Email diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 384978d13a..281ee08a08 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -23,6 +23,7 @@ export default { 'WorkerDms', 'WorkerTimeControl', 'WorkerLocker', + 'WorkerFormation', ], departmentCard: ['BasicData'], }, @@ -177,6 +178,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerLocker.vue'), }, + { + name: 'WorkerFormation', + path: 'formation', + meta: { + title: 'formation', + icon: 'clinical_notes', + }, + component: () => import('src/pages/Worker/Card/WorkerFormation.vue'), + }, ], }, ], From d207482e3aae69529994c681f126a78650662caa Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 27 May 2024 11:27:33 +0200 Subject: [PATCH 04/12] refs #7406 fix url --- src/pages/Worker/Card/WorkerFormation.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index 312acf4f2a..2e27a2a96d 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -103,8 +103,8 @@ const columns = computed(() => [ From ffe15da7cfe5bcc47b75b083c56726cea9acd847 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 28 May 2024 10:41:24 +0200 Subject: [PATCH 07/12] refs #7406 fix VnTable columns --- src/pages/Travel/Card/TravelThermographs.vue | 6 +- src/pages/Worker/Card/WorkerFormation.vue | 64 +++++++++----------- 2 files changed, 33 insertions(+), 37 deletions(-) diff --git a/src/pages/Travel/Card/TravelThermographs.vue b/src/pages/Travel/Card/TravelThermographs.vue index d2195beb44..1898a58d62 100644 --- a/src/pages/Travel/Card/TravelThermographs.vue +++ b/src/pages/Travel/Card/TravelThermographs.vue @@ -13,7 +13,7 @@ import useNotify from 'src/composables/useNotify.js'; import { toDate } from 'src/filters'; import { downloadFile } from 'src/composables/downloadFile'; -const route = useRoute(); +const {{id}} = useRoute(); const quasar = useQuasar(); const router = useRouter(); const { t } = useI18n(); @@ -29,7 +29,7 @@ const thermographFilter = { fields: ['id', 'name'], }, }, - where: { travelFk: route.params.id }, + where: { travelFk: id }, order: ['created'], }; @@ -137,7 +137,7 @@ const removeThermograph = async (id) => { data-key="TravelThermographs" url="TravelThermographs" :filter="thermographFilter" - :params="{ travelFk: route.params.id }" + :params="{ travelFk: id }" auto-load > From d7237463ea6ad0902fc300e4884c7f00564f4f19 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 12 Jun 2024 11:00:10 +0200 Subject: [PATCH 11/12] feat(WorkerFormation): is-editable and use-model --- src/pages/Worker/Card/WorkerFormation.vue | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index e2486a1682..52b22a2950 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -3,7 +3,6 @@ import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; -import VnInputDate from 'components/common/VnInputDate.vue'; const tableRef = ref(); const { t } = useI18n(); const route = useRoute(); @@ -36,16 +35,12 @@ const columns = computed(() => [ url: 'TrainingCourseTypes', fields: ['id', 'name'], }, - disable: false, - columnFilter: { - inWhere: true, - }, }, { align: 'left', name: 'started', label: t('worker.formation.tableVisibleColumns.startDate'), - component: VnInputDate, + component: 'date', field: 'started', create: true, cardVisible: true, @@ -54,7 +49,7 @@ const columns = computed(() => [ align: 'left', name: 'ended', label: t('worker.formation.tableVisibleColumns.endDate'), - component: VnInputDate, + component: 'date', field: 'ended', create: true, }, @@ -68,10 +63,6 @@ const columns = computed(() => [ url: 'TrainingCenters', fields: ['id', 'name'], }, - disable: false, - columnFilter: { - inWhere: true, - }, }, { align: 'left', @@ -92,8 +83,8 @@ const columns = computed(() => [ align: 'left', name: 'remark', label: t('worker.formation.tableVisibleColumns.remark'), - create: true, component: 'checkbox', + create: true, }, { align: 'left', @@ -124,5 +115,7 @@ const columns = computed(() => [ default-mode="table" auto-load :right-search="false" + :is-editable="true" + :use-model="true" /> From a70524578392c26ffebddd65367ba957f708e24b Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 25 Jun 2024 12:18:02 +0200 Subject: [PATCH 12/12] refs #7406 fix pr --- src/components/ui/VnPaginate.vue | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 9af69fdbb0..9a2c06b0cd 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -26,10 +26,6 @@ const props = defineProps({ type: Object, default: null, }, - userFilter: { - type: Object, - default: null, - }, where: { type: Object, default: null, @@ -87,7 +83,6 @@ const arrayData = useArrayData(props.dataKey, { where: props.where, limit: props.limit, order: props.order, - userFilter: props.userFilter, userParams: props.userParams, exprBuilder: props.exprBuilder, keepOpts: props.keepOpts,