0
0
Fork 0

refs #6553 filterBusiness

This commit is contained in:
Carlos Satorres 2024-05-31 10:32:51 +02:00
parent 6205feaca4
commit 8f1ddb08b3
1 changed files with 59 additions and 0 deletions

View File

@ -9,6 +9,64 @@ const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const tableRef = ref(); const tableRef = ref();
const entityId = computed(() => route.params.id); const entityId = computed(() => route.params.id);
const businessFilter = {
include: [
{
relation: 'department',
scope: {
fields: ['id', 'name'],
},
},
{
relation: 'workCenter',
scope: {
fields: ['id', 'name'],
},
},
{
relation: 'companyCode',
scope: {
fields: ['id', 'code'],
},
},
{
relation: 'reasonEnd',
scope: {
fields: ['id', 'reason'],
},
},
{
relation: 'occupationCode',
scope: {
fields: ['code', 'name'],
},
},
{
relation: 'workerBusinessProfessionalCategory',
scope: {
fields: ['id', 'description'],
},
},
{
relation: 'calendarType',
scope: {
fields: ['id', 'description'],
},
},
{
relation: 'workerBusinessType',
scope: {
fields: ['id', 'name'],
},
},
{
relation: 'workerBusinessAgreement',
scope: {
fields: ['id', 'name'],
},
},
],
};
const columns = computed(() => [ const columns = computed(() => [
{ {
align: 'left', align: 'left',
@ -176,6 +234,7 @@ const columns = computed(() => [
:url="`Workers/${entityId}/Business`" :url="`Workers/${entityId}/Business`"
order="id DESC" order="id DESC"
:columns="columns" :columns="columns"
:user-filter="businessFilter"
default-mode="card" default-mode="card"
auto-load auto-load
:right-search="false" :right-search="false"