forked from verdnatura/salix-front
fix(WorkerBusiness): fix card label
This commit is contained in:
parent
ba57c2fcd9
commit
8d60754682
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
|
||||||
import worker from 'src/router/modules/worker';
|
import worker from 'src/router/modules/worker';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
@ -63,12 +62,12 @@ const businessFilter = {
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
// { Falla
|
||||||
relation: 'workerBusinessAgreement',
|
// relation: 'workerBusinessAgreement',
|
||||||
scope: {
|
// scope: {
|
||||||
fields: ['id', 'name'],
|
// fields: ['id', 'name'],
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -90,67 +89,59 @@ async function reactivateWorker(value) {
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
attrs: {
|
|
||||||
label: t('worker.business.tableVisibleColumns.started'),
|
|
||||||
},
|
|
||||||
name: 'started',
|
name: 'started',
|
||||||
|
label: t('worker.business.tableVisibleColumns.started'),
|
||||||
|
align: 'left',
|
||||||
format: ({ started }) => toDate(started),
|
format: ({ started }) => toDate(started),
|
||||||
component: VnInputDate,
|
component: 'date',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
attrs: {
|
|
||||||
label: t('worker.business.tableVisibleColumns.ended'),
|
|
||||||
'@update:model-value': 'reactivateWorker()',
|
|
||||||
},
|
|
||||||
name: 'ended',
|
name: 'ended',
|
||||||
|
label: t('worker.business.tableVisibleColumns.ended'),
|
||||||
|
align: 'left',
|
||||||
format: ({ ended }) => toDate(ended),
|
format: ({ ended }) => toDate(ended),
|
||||||
component: VnInputDate,
|
component: 'date',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
label: t('worker.business.tableVisibleColumns.company'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'companyCodeFk',
|
name: 'companyCodeFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Companies',
|
url: 'Companies',
|
||||||
fields: ['code'],
|
fields: ['code'],
|
||||||
optionValue: 'id',
|
|
||||||
optionLabel: 'code',
|
optionLabel: 'code',
|
||||||
label: t('worker.business.tableVisibleColumns.company'),
|
optionValue: 'code',
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'reasonEndFk',
|
name: 'reasonEndFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.reasonEnd'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'BusinessReasonEnds',
|
url: 'BusinessReasonEnds',
|
||||||
fields: ['id', 'reason'],
|
fields: ['id', 'reason'],
|
||||||
optionLabel: 'reason',
|
optionLabel: 'reason',
|
||||||
label: t('worker.business.tableVisibleColumns.reasonEnd'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'departmentFk',
|
name: 'departmentFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.department'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Departments',
|
url: 'Departments',
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
optionLabel: 'name',
|
optionLabel: 'name',
|
||||||
label: t('worker.business.tableVisibleColumns.department'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -158,13 +149,12 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'professionalCategoryFk',
|
name: 'professionalCategoryFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.professionalCategory'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'WorkerBusinessProfessionalCategories',
|
url: 'WorkerBusinessProfessionalCategories',
|
||||||
fields: ['id', 'description', 'code'],
|
fields: ['id', 'description', 'code'],
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
label: t('worker.business.tableVisibleColumns.professionalCategory'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -172,13 +162,12 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'calendarTypeFk',
|
name: 'calendarTypeFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.calendarType'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'CalendarTypes',
|
url: 'CalendarTypes',
|
||||||
fields: ['id', 'description'],
|
fields: ['id', 'description'],
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
label: t('worker.business.tableVisibleColumns.calendarType'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -186,13 +175,12 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'workCenterFk',
|
name: 'workCenterFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.workCenter'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'WorkCenters',
|
url: 'WorkCenters',
|
||||||
fields: ['id', 'name'],
|
fields: ['id', 'name'],
|
||||||
optionLabel: 'name',
|
optionLabel: 'name',
|
||||||
label: t('worker.business.tableVisibleColumns.workCenter'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -200,13 +188,12 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'workerBusinessCategoryFk',
|
name: 'workerBusinessCategoryFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.payrollCategories'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'payrollCategories',
|
url: 'payrollCategories',
|
||||||
fields: ['id', 'description'],
|
fields: ['id', 'description'],
|
||||||
optionLabel: 'description',
|
optionLabel: 'description',
|
||||||
label: t('worker.business.tableVisibleColumns.payrollCategories'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
@ -214,69 +201,55 @@ const columns = computed(() => [
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'occupationCodeFk',
|
name: 'occupationCodeFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.occupationCode'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'OccupationCodes',
|
url: 'OccupationCodes',
|
||||||
fields: ['code', 'name'],
|
fields: ['code', 'name'],
|
||||||
optionValue: 'code',
|
optionValue: 'code',
|
||||||
label: t('worker.business.tableVisibleColumns.occupationCode'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'rate',
|
name: 'rate',
|
||||||
attrs: {
|
label: t('worker.business.tableVisibleColumns.rate'),
|
||||||
label: t('worker.business.tableVisibleColumns.rate'),
|
|
||||||
},
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'workerBusinessTypeFk',
|
name: 'workerBusinessTypeFk',
|
||||||
component: 'select',
|
component: 'select',
|
||||||
|
label: t('worker.business.tableVisibleColumns.businessType'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'WorkerBusinessTypes',
|
url: 'WorkerBusinessTypes',
|
||||||
fields: ['code', 'name'],
|
fields: ['code', 'name'],
|
||||||
label: t('worker.business.tableVisibleColumns.businessType'),
|
|
||||||
},
|
},
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
attrs: {
|
label: t('worker.business.tableVisibleColumns.amount'),
|
||||||
label: t('worker.business.tableVisibleColumns.amount'),
|
|
||||||
},
|
|
||||||
name: 'amount',
|
name: 'amount',
|
||||||
component: 'input',
|
component: 'input',
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
attrs: {
|
label: t('worker.business.tableVisibleColumns.basicSalary'),
|
||||||
label: t('worker.business.tableVisibleColumns.basicSalary'),
|
|
||||||
},
|
|
||||||
name: 'basicSalary',
|
name: 'basicSalary',
|
||||||
component: 'input',
|
component: 'input',
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
attrs: {
|
|
||||||
label: t('worker.business.tableVisibleColumns.notes'),
|
|
||||||
},
|
|
||||||
name: 'notes',
|
name: 'notes',
|
||||||
|
label: t('worker.business.tableVisibleColumns.notes'),
|
||||||
|
align: 'left',
|
||||||
component: 'input',
|
component: 'input',
|
||||||
disable: false,
|
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
@ -287,20 +260,22 @@ const columns = computed(() => [
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="WorkerBusiness"
|
data-key="WorkerBusiness"
|
||||||
:url="`Workers/${entityId}/Business`"
|
:url="`Workers/${entityId}/Business`"
|
||||||
|
save-url="/Businesses/crud"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: `Workers/${entityId}/Business`,
|
urlCreate: `Workers/${entityId}/Business`,
|
||||||
title: 'Create business',
|
title: 'Create business',
|
||||||
onDataSaved: ({ id }) => tableRef.redirect(id),
|
onDataSaved: () => tableRef.reload(),
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
order="id DESC"
|
order="id DESC"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:user-filter="businessFilter"
|
:filter="businessFilter"
|
||||||
default-mode="card"
|
default-mode="card"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
card-class="grid-two q-gutter-x-md"
|
card-class="grid-two q-gutter-x-md"
|
||||||
></VnTable>
|
:is-editable="true"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
Loading…
Reference in New Issue