0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 7623-fix-redirection

This commit is contained in:
Jorge Penadés 2024-06-26 14:18:57 +02:00
commit 92f9869a36
6 changed files with 122 additions and 1 deletions

View File

@ -849,6 +849,7 @@ worker:
calendar: Calendar
timeControl: Time control
locker: Locker
balance: Balance
formation: Formation
list:
name: Name
@ -930,6 +931,13 @@ worker:
remark: Bonficado
hasDiploma: Diploma
imageNotFound: Image not found
balance:
tableVisibleColumns:
paymentDate: Date
incomeType: Type
debit: Debt
credit: Have
concept: Concept
wagon:
pageTitles:
wagons: Wagons

View File

@ -845,6 +845,7 @@ worker:
calendar: Calendario
timeControl: Control de horario
locker: Taquilla
balance: Balance
formation: Formación
list:
name: Nombre
@ -917,6 +918,13 @@ worker:
remark: Bonficado
hasDiploma: Diploma
imageNotFound: No se ha encontrado la imagen
balance:
tableVisibleColumns:
paymentDate: Fecha
incomeType: Tipo
debit: Debe
credit: Haber
concept: Concepto
wagon:
pageTitles:
wagons: Vagones

View File

@ -0,0 +1,91 @@
<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 columns = computed(() => [
{
align: 'left',
name: 'paymentDate',
label: t('worker.balance.tableVisibleColumns.paymentDate'),
create: true,
component: 'date',
field: 'paymentDate',
cardVisible: true,
},
{
align: 'left',
name: 'incomeTypeFk',
label: t('worker.balance.tableVisibleColumns.incomeType'),
create: true,
component: 'select',
attrs: {
url: 'payrollComponents',
fields: ['id', 'name'],
},
cardVisible: true,
},
{
align: 'left',
name: 'debit',
label: t('worker.balance.tableVisibleColumns.debit'),
create: true,
component: 'input',
field: 'debit',
cardVisible: true,
},
{
align: 'left',
name: 'credit',
label: t('worker.balance.tableVisibleColumns.credit'),
create: true,
component: 'input',
field: 'credit',
cardVisible: true,
},
{
align: 'left',
name: 'concept',
label: t('worker.balance.tableVisibleColumns.concept'),
create: true,
component: 'input',
field: 'concept',
cardVisible: true,
},
]);
</script>
<template>
<VnTable
ref="tableRef"
data-key="WorkerBalance"
:url="`Workers/${entityId}/incomes`"
:url-create="`Workers/${entityId}/incomes`"
save-url="WorkerIncomes/crud"
:create="{
urlCreate: 'workerIncomes',
title: t('Create workerBalance'),
onDataSaved: () => tableRef.reload(),
formInitialData: {
workerFk: entityId,
},
}"
order="paymentDate DESC"
:columns="columns"
default-mode="table"
auto-load
:right-search="false"
:is-editable="true"
:use-model="true"
/>
</template>
<i18n>
es:
Create workerBalance: Crear balance
</i18n>

View File

@ -35,6 +35,7 @@ const columns = computed(() => [
url: 'TrainingCourseTypes',
fields: ['id', 'name'],
},
cardVisible: true,
},
{
align: 'left',
@ -52,6 +53,7 @@ const columns = computed(() => [
component: 'date',
field: 'ended',
create: true,
cardVisible: true,
},
{
align: 'left',
@ -63,6 +65,7 @@ const columns = computed(() => [
url: 'TrainingCenters',
fields: ['id', 'name'],
},
cardVisible: true,
},
{
align: 'left',
@ -78,6 +81,7 @@ const columns = computed(() => [
component: 'input',
field: 'amount',
create: true,
cardVisible: true,
},
{
align: 'left',

View File

@ -274,7 +274,7 @@ export default {
name: 'CustomerBalance',
meta: {
title: 'balance',
icon: 'vn:invoice',
icon: 'balance',
},
component: () =>
import('src/pages/Customer/Card/CustomerBalance.vue'),

View File

@ -23,6 +23,7 @@ export default {
'WorkerDms',
'WorkerTimeControl',
'WorkerLocker',
'WorkerBalance',
'WorkerFormation',
],
},
@ -177,6 +178,15 @@ export default {
},
component: () => import('src/pages/Worker/Card/WorkerLocker.vue'),
},
{
name: 'WorkerBalance',
path: 'balance',
meta: {
title: 'balance',
icon: 'balance',
},
component: () => import('src/pages/Worker/Card/WorkerBalance.vue'),
},
{
name: 'WorkerFormation',
path: 'formation',