From d4fbd99473d75b94b2b7444294558217376f40eb Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 000000000..f8e458e1b --- /dev/null +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -0,0 +1,84 @@ +<script setup> +import { ref, computed, onMounted } from 'vue'; +import { useI18n } from 'vue-i18n'; +import { useRouter } from 'vue-router'; +import VnTable from 'components/VnTable/VnTable.vue'; +import VnInputDate from 'components/common/VnInputDate.vue'; +const tableRef = ref(); +const { t } = useI18n(); +const columns = computed(() => [ + { + align: 'left', + name: 'course', + label: t('worker.formation.tableVisibleColumns.course'), + isTitle: true, + component: 'select', + attrs: { + url: 'Workers/trainingCourse', + fields: ['id', 'name'], + }, + create: true, + }, + { + align: 'left', + name: 'startDate', + label: t('worker.formation.tableVisibleColumns.startDate'), + isTitle: true, + component: VnInputDate, + props: (prop) => ({ + disable: true, + 'model-value': prop.row.started, + }), + create: true, + }, + { + align: 'left', + name: 'endDate', + label: t('worker.formation.tableVisibleColumns.endDate'), + isTitle: true, + component: VnInputDate, + props: (prop) => ({ + disable: true, + 'model-value': prop.row.ended, + }), + create: true, + }, + { + align: 'left', + name: 'center', + label: t('worker.formation.tableVisibleColumns.center'), + isTitle: true, + component: 'select', + attrs: { + url: 'Workers/trainingCenter', + fields: ['id', 'name'], + }, + create: true, + }, + { + align: 'left', + name: 'invoice', + }, +]); +</script> +<template> + <VnTable + ref="tableRef" + data-key="WorkerFormation" + url="Workers/trainingCourse" + url-create="Workers/trainingCourse" + :create="{ + urlCreate: 'Workers/trainingCourse', + title: 'Create trainingCourse', + onDataSaved: ({ id }) => tableRef.redirect(id), + formInitialData: { + active: true, + isEqualizated: false, + }, + }" + order="id DESC" + :columns="columns" + default-mode="table" + auto-load + ></VnTable> +</template> -- 2.40.1 From c865bc2ed45331d4083aad3d0eaf7ec0bcc1c8aa Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 f8e458e1b..312acf4f2 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, }, ]); </script> -- 2.40.1 From ef52c9b0c0a6920c0dfd9d89c6beb18edc39f9a5 Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 3853e3ab6..3eb464937 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 a8b9ecd51..652fb7e6e 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 384978d13..281ee08a0 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'), + }, ], }, ], -- 2.40.1 From d207482e3aae69529994c681f126a78650662caa Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 312acf4f2..2e27a2a96 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -103,8 +103,8 @@ const columns = computed(() => [ <VnTable ref="tableRef" data-key="WorkerFormation" - url="Workers/trainingCourse" - url-create="Workers/trainingCourse" + url="`Workers/${entityId}/trainingCourse`" + url-create="`Workers/${entityId}/trainingCourse`" :create="{ urlCreate: 'Workers/trainingCourse', title: 'Create trainingCourse', -- 2.40.1 From 947496e0a1b5efe32999e4b5438a1e20b2b0b11a Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> Date: Mon, 27 May 2024 14:43:03 +0200 Subject: [PATCH 05/12] refs #7406 fix components --- src/pages/Worker/Card/WorkerFormation.vue | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index 2e27a2a96..8485f4a5b 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -2,10 +2,13 @@ import { ref, computed, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; +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(); +const entityId = computed(() => route.params.id); const columns = computed(() => [ { align: 'left', @@ -23,7 +26,6 @@ const columns = computed(() => [ align: 'left', name: 'startDate', label: t('worker.formation.tableVisibleColumns.startDate'), - isTitle: true, component: VnInputDate, props: (prop) => ({ disable: true, @@ -35,7 +37,6 @@ const columns = computed(() => [ align: 'left', name: 'endDate', label: t('worker.formation.tableVisibleColumns.endDate'), - isTitle: true, component: VnInputDate, props: (prop) => ({ disable: true, @@ -47,7 +48,6 @@ const columns = computed(() => [ align: 'left', name: 'center', label: t('worker.formation.tableVisibleColumns.center'), - isTitle: true, component: 'select', attrs: { url: 'Workers/trainingCenter', @@ -59,14 +59,12 @@ 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, @@ -78,7 +76,6 @@ const columns = computed(() => [ align: 'left', name: 'remark', label: t('worker.formation.tableVisibleColumns.remark'), - isTitle: true, component: 'checkbox', props: (prop) => ({ disable: true, @@ -90,7 +87,6 @@ const columns = computed(() => [ align: 'left', name: 'hasDiploma', label: t('worker.formation.tableVisibleColumns.hasDiploma'), - isTitle: true, props: (prop) => ({ disable: true, 'model-value': prop.row.hasDiploma, @@ -103,8 +99,8 @@ const columns = computed(() => [ <VnTable ref="tableRef" data-key="WorkerFormation" - url="`Workers/${entityId}/trainingCourse`" - url-create="`Workers/${entityId}/trainingCourse`" + :url="`Workers/${entityId}/trainingCourse`" + :url-create="`Workers/${entityId}/trainingCourse`" :create="{ urlCreate: 'Workers/trainingCourse', title: 'Create trainingCourse', -- 2.40.1 From d8512e2033cf9377485b72e232b142bb140848e3 Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> Date: Mon, 27 May 2024 18:23:33 +0200 Subject: [PATCH 06/12] refs #7406 fix trad --- src/i18n/locale/en.yml | 10 ++++++++++ src/i18n/locale/es.yml | 10 ++++++++++ src/pages/Worker/Card/WorkerFormation.vue | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 3eb464937..91d88f252 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -900,6 +900,16 @@ worker: payMethods: Pay method iban: IBAN bankEntity: Swift / BIC + formation: + tableVisibleColumns: + course: Curso + startDate: Fecha Inicio + endDate: Fecha Fin + center: Centro Formación + invoice: Factura + amount: Importe + remark: Bonficado + hasDiploma: Diploma imageNotFound: Image not found wagon: pageTitles: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 652fb7e6e..29fe52508 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -889,6 +889,16 @@ worker: payMethods: Método de pago iban: IBAN bankEntity: Swift / BIC + formation: + tableVisibleColumns: + course: Curso + startDate: Fecha Inicio + endDate: Fecha Fin + center: Centro Formación + invoice: Factura + amount: Importe + remark: Bonficado + hasDiploma: Diploma imageNotFound: No se ha encontrado la imagen wagon: pageTitles: diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index 8485f4a5b..e68f7abf9 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -17,7 +17,7 @@ const columns = computed(() => [ isTitle: true, component: 'select', attrs: { - url: 'Workers/trainingCourse', + url: 'TrainingCourse/trainingCourseType', fields: ['id', 'name'], }, create: true, @@ -114,5 +114,6 @@ const columns = computed(() => [ :columns="columns" default-mode="table" auto-load + :right-search="false" ></VnTable> </template> -- 2.40.1 From ffe15da7cfe5bcc47b75b083c56726cea9acd847 Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 d2195beb4..1898a58d6 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 > <template #body="{ rows }"> diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index e68f7abf9..c8fd50303 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -1,7 +1,6 @@ <script setup> -import { ref, computed, onMounted } from 'vue'; +import { ref, computed } from 'vue'; import { useI18n } from 'vue-i18n'; -import { useRouter } from 'vue-router'; import { useRoute } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; @@ -9,50 +8,54 @@ const tableRef = ref(); const { t } = useI18n(); const route = useRoute(); const entityId = computed(() => route.params.id); +const courseFilter = { + include: [ + { + relation: 'trainingCourseType', + scope: { + fields: ['id', 'name'], + }, + }, + { + relation: 'trainingCenter', + scope: { + fields: ['id', 'name'], + }, + }, + ], +}; const columns = computed(() => [ { align: 'left', - name: 'course', + name: 'trainingCourseTypeFk', label: t('worker.formation.tableVisibleColumns.course'), isTitle: true, component: 'select', - attrs: { - url: 'TrainingCourse/trainingCourseType', - fields: ['id', 'name'], - }, + field: 'trainingCourseTypeFk', create: true, }, { align: 'left', - name: 'startDate', + name: 'started', label: t('worker.formation.tableVisibleColumns.startDate'), component: VnInputDate, - props: (prop) => ({ - disable: true, - 'model-value': prop.row.started, - }), + field: 'started', create: true, }, { align: 'left', - name: 'endDate', + name: 'ended', label: t('worker.formation.tableVisibleColumns.endDate'), component: VnInputDate, - props: (prop) => ({ - disable: true, - 'model-value': prop.row.ended, - }), + field: 'ended', create: true, }, { align: 'left', - name: 'center', + name: 'centerFk', label: t('worker.formation.tableVisibleColumns.center'), component: 'select', - attrs: { - url: 'Workers/trainingCenter', - fields: ['id', 'name'], - }, + field: 'centerFk', create: true, }, { @@ -60,16 +63,14 @@ const columns = computed(() => [ name: 'invoice', label: t('worker.formation.tableVisibleColumns.invoice'), component: 'input', + field: 'invoice', }, { align: 'left', name: 'amount', label: t('worker.formation.tableVisibleColumns.amount'), component: 'input', - props: (prop) => ({ - disable: true, - 'model-value': prop.row.amount, - }), + field: 'amount', create: true, }, { @@ -77,20 +78,14 @@ const columns = computed(() => [ name: 'remark', label: t('worker.formation.tableVisibleColumns.remark'), component: 'checkbox', - props: (prop) => ({ - disable: true, - 'model-value': prop.row.remark, - }), + field: 'remark', create: true, }, { align: 'left', name: 'hasDiploma', label: t('worker.formation.tableVisibleColumns.hasDiploma'), - props: (prop) => ({ - disable: true, - 'model-value': prop.row.hasDiploma, - }), + field: 'hasDiploma', create: true, }, ]); @@ -101,6 +96,7 @@ const columns = computed(() => [ data-key="WorkerFormation" :url="`Workers/${entityId}/trainingCourse`" :url-create="`Workers/${entityId}/trainingCourse`" + :filter="courseFilter" :create="{ urlCreate: 'Workers/trainingCourse', title: 'Create trainingCourse', -- 2.40.1 From 264d887fb454c59cef294bb0b39cdb4e5c0e0eac Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> Date: Tue, 28 May 2024 12:09:03 +0200 Subject: [PATCH 08/12] refs #7406 fix Tb components create --- src/components/ui/VnPaginate.vue | 5 +++ src/pages/Worker/Card/WorkerFormation.vue | 38 ++++++++++++++++------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue index 58dd0d313..d3000bc64 100644 --- a/src/components/ui/VnPaginate.vue +++ b/src/components/ui/VnPaginate.vue @@ -26,6 +26,10 @@ const props = defineProps({ type: Object, default: null, }, + userFilter: { + type: Object, + default: null, + }, where: { type: Object, default: null, @@ -78,6 +82,7 @@ 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, diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index c8fd50303..02a3cdba2 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -30,9 +30,14 @@ const columns = computed(() => [ name: 'trainingCourseTypeFk', label: t('worker.formation.tableVisibleColumns.course'), isTitle: true, - component: 'select', - field: 'trainingCourseTypeFk', create: true, + component: 'select', + attrs: { + url: 'TrainingCourseTypes', + fields: ['id', 'name'], + }, + disable: false, + inWhere: true, }, { align: 'left', @@ -41,6 +46,7 @@ const columns = computed(() => [ component: VnInputDate, field: 'started', create: true, + cardVisible: true, }, { align: 'left', @@ -54,9 +60,15 @@ const columns = computed(() => [ align: 'left', name: 'centerFk', label: t('worker.formation.tableVisibleColumns.center'), - component: 'select', field: 'centerFk', create: true, + component: 'select', + attrs: { + url: 'TrainingCenters', + fields: ['id', 'name'], + }, + disable: false, + inWhere: true, }, { align: 'left', @@ -77,16 +89,21 @@ const columns = computed(() => [ align: 'left', name: 'remark', label: t('worker.formation.tableVisibleColumns.remark'), - component: 'checkbox', - field: 'remark', create: true, + chip: { + color: null, + condition: (value) => value, + }, }, { align: 'left', name: 'hasDiploma', label: t('worker.formation.tableVisibleColumns.hasDiploma'), - field: 'hasDiploma', create: true, + chip: { + color: null, + condition: (value) => value, + }, }, ]); </script> @@ -96,14 +113,13 @@ const columns = computed(() => [ data-key="WorkerFormation" :url="`Workers/${entityId}/trainingCourse`" :url-create="`Workers/${entityId}/trainingCourse`" - :filter="courseFilter" + :user-filter="courseFilter" :create="{ - urlCreate: 'Workers/trainingCourse', + urlCreate: 'trainingCourses', title: 'Create trainingCourse', - onDataSaved: ({ id }) => tableRef.redirect(id), + onDataSaved: () => tableRef.reload(), formInitialData: { - active: true, - isEqualizated: false, + workerFk: entityId, }, }" order="id DESC" -- 2.40.1 From aa2601ac456b35d1f991649e27288bd46f7b4a79 Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Mon, 10 Jun 2024 09:15:17 +0200 Subject: [PATCH 09/12] feat(WorkerFormation): add columnFilter --- src/pages/Worker/Card/WorkerFormation.vue | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index 02a3cdba2..97d829140 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -37,7 +37,9 @@ const columns = computed(() => [ fields: ['id', 'name'], }, disable: false, - inWhere: true, + columnFilter: { + inWhere: true, + }, }, { align: 'left', @@ -60,7 +62,6 @@ const columns = computed(() => [ align: 'left', name: 'centerFk', label: t('worker.formation.tableVisibleColumns.center'), - field: 'centerFk', create: true, component: 'select', attrs: { @@ -68,7 +69,9 @@ const columns = computed(() => [ fields: ['id', 'name'], }, disable: false, - inWhere: true, + columnFilter: { + inWhere: true, + }, }, { align: 'left', @@ -90,20 +93,13 @@ const columns = computed(() => [ name: 'remark', label: t('worker.formation.tableVisibleColumns.remark'), create: true, - chip: { - color: null, - condition: (value) => value, - }, + component: 'checkbox', }, { align: 'left', name: 'hasDiploma', label: t('worker.formation.tableVisibleColumns.hasDiploma'), create: true, - chip: { - color: null, - condition: (value) => value, - }, }, ]); </script> @@ -113,7 +109,7 @@ const columns = computed(() => [ data-key="WorkerFormation" :url="`Workers/${entityId}/trainingCourse`" :url-create="`Workers/${entityId}/trainingCourse`" - :user-filter="courseFilter" + :filter="courseFilter" :create="{ urlCreate: 'trainingCourses', title: 'Create trainingCourse', -- 2.40.1 From 14e27f193e0c69e68d00b98c32677afb1be9f901 Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> Date: Tue, 11 Jun 2024 15:00:03 +0200 Subject: [PATCH 10/12] =?UTF-8?q?feat:=20adapt=20tu=20VnTable=20=E2=86=92?= =?UTF-8?q?=20CrudModel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Worker/Card/WorkerFormation.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Worker/Card/WorkerFormation.vue b/src/pages/Worker/Card/WorkerFormation.vue index 97d829140..e2486a168 100644 --- a/src/pages/Worker/Card/WorkerFormation.vue +++ b/src/pages/Worker/Card/WorkerFormation.vue @@ -109,6 +109,7 @@ const columns = computed(() => [ data-key="WorkerFormation" :url="`Workers/${entityId}/trainingCourse`" :url-create="`Workers/${entityId}/trainingCourse`" + save-url="TrainingCourses/crud" :filter="courseFilter" :create="{ urlCreate: 'trainingCourses', @@ -123,5 +124,5 @@ const columns = computed(() => [ default-mode="table" auto-load :right-search="false" - ></VnTable> + /> </template> -- 2.40.1 From d7237463ea6ad0902fc300e4884c7f00564f4f19 Mon Sep 17 00:00:00 2001 From: alexm <alexm@verdnatura.es> 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 e2486a168..52b22a295 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" /> </template> -- 2.40.1 From a70524578392c26ffebddd65367ba957f708e24b Mon Sep 17 00:00:00 2001 From: carlossa <carlossa@verdnatura.es> 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 9af69fdbb..9a2c06b0c 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, -- 2.40.1