forked from verdnatura/salix-front
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into dev
This commit is contained in:
commit
10a663b400
|
@ -845,7 +845,7 @@ worker:
|
|||
calendar: Calendar
|
||||
timeControl: Time control
|
||||
locker: Locker
|
||||
|
||||
formation: Formation
|
||||
list:
|
||||
name: Name
|
||||
email: Email
|
||||
|
@ -915,6 +915,16 @@ worker:
|
|||
payMethods: Pay method
|
||||
iban: IBAN
|
||||
bankEntity: Swift / BIC
|
||||
formation:
|
||||
tableVisibleColumns:
|
||||
course: Curso
|
||||
startDate: Fecha Inicio
|
||||
endDate: Fecha Fin
|
||||
center: Centro Formación
|
||||
invoice: Factura
|
||||
amount: Importe
|
||||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
imageNotFound: Image not found
|
||||
wagon:
|
||||
pageTitles:
|
||||
|
|
|
@ -841,6 +841,7 @@ worker:
|
|||
calendar: Calendario
|
||||
timeControl: Control de horario
|
||||
locker: Taquilla
|
||||
formation: Formación
|
||||
list:
|
||||
name: Nombre
|
||||
email: Email
|
||||
|
@ -901,6 +902,16 @@ worker:
|
|||
payMethods: Método de pago
|
||||
iban: IBAN
|
||||
bankEntity: Swift / BIC
|
||||
formation:
|
||||
tableVisibleColumns:
|
||||
course: Curso
|
||||
startDate: Fecha Inicio
|
||||
endDate: Fecha Fin
|
||||
center: Centro Formación
|
||||
invoice: Factura
|
||||
amount: Importe
|
||||
remark: Bonficado
|
||||
hasDiploma: Diploma
|
||||
imageNotFound: No se ha encontrado la imagen
|
||||
wagon:
|
||||
pageTitles:
|
||||
|
|
|
@ -13,7 +13,7 @@ import useNotify from 'src/composables/useNotify.js';
|
|||
import { toDate } from 'src/filters';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
|
||||
const route = useRoute();
|
||||
const {{id}} = useRoute();
|
||||
const quasar = useQuasar();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
@ -29,7 +29,7 @@ const thermographFilter = {
|
|||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
where: { travelFk: route.params.id },
|
||||
where: { travelFk: id },
|
||||
order: ['created'],
|
||||
};
|
||||
|
||||
|
@ -137,7 +137,7 @@ const removeThermograph = async (id) => {
|
|||
data-key="TravelThermographs"
|
||||
url="TravelThermographs"
|
||||
:filter="thermographFilter"
|
||||
:params="{ travelFk: route.params.id }"
|
||||
:params="{ travelFk: id }"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
|
|
|
@ -0,0 +1,121 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
const tableRef = ref();
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const entityId = computed(() => route.params.id);
|
||||
const courseFilter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'trainingCourseType',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'trainingCenter',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
name: 'trainingCourseTypeFk',
|
||||
label: t('worker.formation.tableVisibleColumns.course'),
|
||||
isTitle: true,
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'TrainingCourseTypes',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'started',
|
||||
label: t('worker.formation.tableVisibleColumns.startDate'),
|
||||
component: 'date',
|
||||
field: 'started',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'ended',
|
||||
label: t('worker.formation.tableVisibleColumns.endDate'),
|
||||
component: 'date',
|
||||
field: 'ended',
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'centerFk',
|
||||
label: t('worker.formation.tableVisibleColumns.center'),
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'TrainingCenters',
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'invoice',
|
||||
label: t('worker.formation.tableVisibleColumns.invoice'),
|
||||
component: 'input',
|
||||
field: 'invoice',
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'amount',
|
||||
label: t('worker.formation.tableVisibleColumns.amount'),
|
||||
component: 'input',
|
||||
field: 'amount',
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'remark',
|
||||
label: t('worker.formation.tableVisibleColumns.remark'),
|
||||
component: 'checkbox',
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'hasDiploma',
|
||||
label: t('worker.formation.tableVisibleColumns.hasDiploma'),
|
||||
create: true,
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
<template>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="WorkerFormation"
|
||||
:url="`Workers/${entityId}/trainingCourse`"
|
||||
:url-create="`Workers/${entityId}/trainingCourse`"
|
||||
save-url="TrainingCourses/crud"
|
||||
:filter="courseFilter"
|
||||
:create="{
|
||||
urlCreate: 'trainingCourses',
|
||||
title: 'Create trainingCourse',
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: entityId,
|
||||
},
|
||||
}"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
default-mode="table"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
:use-model="true"
|
||||
/>
|
||||
</template>
|
|
@ -23,6 +23,7 @@ export default {
|
|||
'WorkerDms',
|
||||
'WorkerTimeControl',
|
||||
'WorkerLocker',
|
||||
'WorkerFormation',
|
||||
],
|
||||
},
|
||||
children: [
|
||||
|
@ -176,6 +177,15 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
|
||||
},
|
||||
{
|
||||
name: 'WorkerFormation',
|
||||
path: 'formation',
|
||||
meta: {
|
||||
title: 'formation',
|
||||
icon: 'clinical_notes',
|
||||
},
|
||||
component: () => import('src/pages/Worker/Card/WorkerFormation.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue