forked from verdnatura/salix-front
refs #7406 fix Tb components create
This commit is contained in:
parent
ffe15da7cf
commit
264d887fb4
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue