0
0
Fork 0

refs #7406 fix Tb components create

This commit is contained in:
Carlos Satorres 2024-05-28 12:09:03 +02:00
parent ffe15da7cf
commit 264d887fb4
2 changed files with 32 additions and 11 deletions

View File

@ -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,

View File

@ -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"