forked from verdnatura/salix-front
refs #6553 fix front trad
This commit is contained in:
parent
81e6870f71
commit
0e691436e9
|
@ -901,6 +901,24 @@ worker:
|
|||
iban: IBAN
|
||||
bankEntity: Swift / BIC
|
||||
imageNotFound: Image not found
|
||||
business:
|
||||
tableVisibleColumns:
|
||||
started: Start Date
|
||||
ended: End Date
|
||||
company: Company
|
||||
reasondEnd: Reason for Termination
|
||||
department: Department
|
||||
professionalCategory: Professional Category
|
||||
calendarType: Work Calendar
|
||||
workCenter: Work Center
|
||||
payrollCategories: Contract Category
|
||||
occupationCode: Contribution Code
|
||||
rate: Rate
|
||||
businessType: Contract Type
|
||||
amount: Salary
|
||||
basicSalary: Transport Workers Salary
|
||||
notes: Notes
|
||||
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Wagons
|
||||
|
|
|
@ -890,6 +890,23 @@ worker:
|
|||
iban: IBAN
|
||||
bankEntity: Swift / BIC
|
||||
imageNotFound: No se ha encontrado la imagen
|
||||
business:
|
||||
tableVisibleColumns:
|
||||
started: Fecha inicio
|
||||
ended: Fecha fin
|
||||
company: Empresa
|
||||
reasondEnd: Motivo finalización
|
||||
department: Departamento
|
||||
professionalCategory: Categoria profesional
|
||||
calendarType: Calendario laboral
|
||||
workCenter: Centro
|
||||
payrollCategories: Categoria contrato
|
||||
occupationCode: Cotización
|
||||
rate: Tarifa
|
||||
businessType: Contrato
|
||||
amount: Salario
|
||||
basicSalary: Salario transportistas
|
||||
notes: Notas
|
||||
wagon:
|
||||
pageTitles:
|
||||
wagons: Vagones
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import VnInputDate from './common/VnInputDate.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const tableRef = ref();
|
||||
const entityId = computed(() => route.params.id);
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -14,6 +16,7 @@ const columns = computed(() => [
|
|||
name: 'started',
|
||||
format: ({ started }) => toDate(started),
|
||||
component: VnInputDate,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -21,76 +24,147 @@ const columns = computed(() => [
|
|||
name: 'ended',
|
||||
format: ({ ended }) => toDate(ended),
|
||||
component: VnInputDate,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.company'),
|
||||
name: 'companyCodeFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Companies',
|
||||
fields: ['code'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.reasondEnd'),
|
||||
name: 'reasondEndFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'BusinessReasonEnds',
|
||||
fields: ['id', 'reason'],
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.reasondEnd'),
|
||||
name: 'reasondEndFk',
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.department'),
|
||||
name: 'departmentFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Departments',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.professionalCategory'),
|
||||
name: 'professionalCategoryFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'WorkerBusinessProfessionalCategories',
|
||||
fields: ['id', 'description', 'code'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.calendarType'),
|
||||
name: 'calendarTypeFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'CalendarTypes',
|
||||
fields: ['id', 'description'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.workCenter'),
|
||||
name: 'workCenterFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'WorkCenters',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.payrollCategories'),
|
||||
name: 'payrollCategoriesFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'BusinessReasonEnd',
|
||||
fields: ['id', 'description'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.occupationCode'),
|
||||
name: 'occupationCodeFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'OccupationCodes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.rate'),
|
||||
name: 'rate',
|
||||
component: 'input',
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.businessType'),
|
||||
name: 'workerBusinessTypeFk',
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'WorkerBusinessTypes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.amount'),
|
||||
name: 'amount',
|
||||
component: 'input',
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.basicSalary'),
|
||||
name: 'basicSalary',
|
||||
component: 'input',
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('worker.business.tableVisibleColumns.notes'),
|
||||
name: 'notes',
|
||||
component: 'input',
|
||||
disable: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
@ -99,19 +173,12 @@ const columns = computed(() => [
|
|||
<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: {},
|
||||
}"
|
||||
:url="`Workers/${entityId}/Business`"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
redirect="customer"
|
||||
default-mode="card"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
></VnTable>
|
||||
</template>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
Loading…
Reference in New Issue