diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 2b46649e1..0a27312a4 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -830,7 +830,7 @@ worker: calendar: Calendar timeControl: Time control locker: Locker - + business: Business list: name: Name email: Email diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index a8b9ecd51..03eb708c5 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -828,6 +828,7 @@ worker: calendar: Calendario timeControl: Control de horario locker: Taquilla + business: Contrato list: name: Nombre email: Email diff --git a/src/pages/Worker/Card/WorkerBusiness.vue b/src/pages/Worker/Card/WorkerBusiness.vue new file mode 100644 index 000000000..2c3eb459b --- /dev/null +++ b/src/pages/Worker/Card/WorkerBusiness.vue @@ -0,0 +1,120 @@ +<script setup> +import { ref, computed } from 'vue'; +import { useI18n } from 'vue-i18n'; +import { useRouter } from 'vue-router'; +import VnTable from 'components/VnTable/VnTable.vue'; +import { toDate } from 'src/filters'; +import VnInputDate from './common/VnInputDate.vue'; +const { t } = useI18n(); +const tableRef = ref(); +const columns = computed(() => [ + { + align: 'left', + label: t('worker.business.tableVisibleColumns.started'), + name: 'started', + format: ({ started }) => toDate(started), + component: VnInputDate, + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.ended'), + name: 'ended', + format: ({ ended }) => toDate(ended), + component: VnInputDate, + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.company'), + name: 'companyCodeFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.reasondEnd'), + name: 'reasondEndFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.reasondEnd'), + name: 'reasondEndFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.department'), + name: 'departmentFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.professionalCategory'), + name: 'professionalCategoryFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.calendarType'), + name: 'calendarTypeFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.workCenter'), + name: 'workCenterFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.payrollCategories'), + name: 'payrollCategoriesFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.occupationCode'), + name: 'occupationCodeFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.rate'), + name: 'rate', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.businessType'), + name: 'workerBusinessTypeFk', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.amount'), + name: 'amount', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.basicSalary'), + name: 'basicSalary', + }, + { + align: 'left', + label: t('worker.business.tableVisibleColumns.notes'), + name: 'notes', + }, +]); +</script> + +<template> + <VnTable + ref="tableRef" + data-key="WorkerBusiness" + url="Clients/Business" + url-create="Clients/Business" + :create="{ + urlCreate: 'Clients/createWithUser', + title: 'Create client', + onDataSaved: ({ id }) => tableRef.redirect(id), + formInitialData: {}, + }" + order="id DESC" + :columns="columns" + default-mode="table" + redirect="customer" + auto-load + ></VnTable> +</template> +<style lang="scss" scoped></style> +<i18n> + +</i18n> diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index 384978d13..02ec255da 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -14,6 +14,7 @@ export default { main: ['WorkerList', 'WorkerDepartment'], card: [ 'WorkerBasicData', + 'WorkerBusiness', 'WorkerNotes', 'WorkerPda', 'WorkerNotificationsManager', @@ -86,6 +87,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'), }, + { + path: 'business', + name: 'WorkerBusiness', + meta: { + title: 'business', + icon: 'handshake', + }, + component: () => import('src/pages/Worker/Card/WorkerBusiness.vue'), + }, { path: 'notes', name: 'NotesCard',