7658-devToTest_2428 #508

Merged
alexm merged 392 commits from 7658-devToTest_2428 into test 2024-07-02 10:38:20 +00:00
1 changed files with 5 additions and 9 deletions
Showing only changes of commit 947496e0a1 - Show all commits

View File

@ -2,10 +2,13 @@
import { ref, computed, onMounted } from 'vue'; import { ref, computed, onMounted } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue'; import VnTable from 'components/VnTable/VnTable.vue';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
const tableRef = ref(); const tableRef = ref();
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute();
const entityId = computed(() => route.params.id);
const columns = computed(() => [ const columns = computed(() => [
{ {
align: 'left', align: 'left',
@ -23,7 +26,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'startDate', name: 'startDate',
label: t('worker.formation.tableVisibleColumns.startDate'), label: t('worker.formation.tableVisibleColumns.startDate'),
isTitle: true,
component: VnInputDate, component: VnInputDate,
props: (prop) => ({ props: (prop) => ({
disable: true, disable: true,
@ -35,7 +37,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'endDate', name: 'endDate',
label: t('worker.formation.tableVisibleColumns.endDate'), label: t('worker.formation.tableVisibleColumns.endDate'),
isTitle: true,
component: VnInputDate, component: VnInputDate,
props: (prop) => ({ props: (prop) => ({
disable: true, disable: true,
@ -47,7 +48,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'center', name: 'center',
label: t('worker.formation.tableVisibleColumns.center'), label: t('worker.formation.tableVisibleColumns.center'),
isTitle: true,
component: 'select', component: 'select',
attrs: { attrs: {
url: 'Workers/trainingCenter', url: 'Workers/trainingCenter',
@ -59,14 +59,12 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'invoice', name: 'invoice',
label: t('worker.formation.tableVisibleColumns.invoice'), label: t('worker.formation.tableVisibleColumns.invoice'),
isTitle: true,
component: 'input', component: 'input',
}, },
{ {
align: 'left', align: 'left',
name: 'amount', name: 'amount',
label: t('worker.formation.tableVisibleColumns.amount'), label: t('worker.formation.tableVisibleColumns.amount'),
isTitle: true,
component: 'input', component: 'input',
props: (prop) => ({ props: (prop) => ({
disable: true, disable: true,
@ -78,7 +76,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'remark', name: 'remark',
label: t('worker.formation.tableVisibleColumns.remark'), label: t('worker.formation.tableVisibleColumns.remark'),
isTitle: true,
component: 'checkbox', component: 'checkbox',
props: (prop) => ({ props: (prop) => ({
disable: true, disable: true,
@ -90,7 +87,6 @@ const columns = computed(() => [
align: 'left', align: 'left',
name: 'hasDiploma', name: 'hasDiploma',
label: t('worker.formation.tableVisibleColumns.hasDiploma'), label: t('worker.formation.tableVisibleColumns.hasDiploma'),
isTitle: true,
props: (prop) => ({ props: (prop) => ({
disable: true, disable: true,
'model-value': prop.row.hasDiploma, 'model-value': prop.row.hasDiploma,
@ -103,8 +99,8 @@ const columns = computed(() => [
<VnTable <VnTable
ref="tableRef" ref="tableRef"
data-key="WorkerFormation" data-key="WorkerFormation"
url="`Workers/${entityId}/trainingCourse`" :url="`Workers/${entityId}/trainingCourse`"
url-create="`Workers/${entityId}/trainingCourse`" :url-create="`Workers/${entityId}/trainingCourse`"
:create="{ :create="{
urlCreate: 'Workers/trainingCourse', urlCreate: 'Workers/trainingCourse',
title: 'Create trainingCourse', title: 'Create trainingCourse',