forked from verdnatura/salix-front
feat: refs #7323 delete btn
This commit is contained in:
parent
37545b4cab
commit
7bbad14f53
|
@ -472,6 +472,7 @@ function handleOnDataSaved(_) {
|
||||||
auto-width
|
auto-width
|
||||||
class="no-margin q-px-xs"
|
class="no-margin q-px-xs"
|
||||||
:class="[getColAlign(col), col.columnClass]"
|
:class="[getColAlign(col), col.columnClass]"
|
||||||
|
:style="col.style"
|
||||||
v-if="col.visible ?? true"
|
v-if="col.visible ?? true"
|
||||||
@click.ctrl="
|
@click.ctrl="
|
||||||
($event) =>
|
($event) =>
|
||||||
|
@ -500,6 +501,7 @@ function handleOnDataSaved(_) {
|
||||||
:class="getColAlign(col)"
|
:class="getColAlign(col)"
|
||||||
class="sticky no-padding"
|
class="sticky no-padding"
|
||||||
@click="stopEventPropagation($event)"
|
@click="stopEventPropagation($event)"
|
||||||
|
:style="col.style"
|
||||||
>
|
>
|
||||||
<QBtn
|
<QBtn
|
||||||
v-for="(btn, index) of col.actions"
|
v-for="(btn, index) of col.actions"
|
||||||
|
|
|
@ -57,9 +57,21 @@ const columns = computed(() => [
|
||||||
field: 'concept',
|
field: 'concept',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
name: 'tableActions',
|
||||||
|
style: 'max-width: 20px; text-align: initial;',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('delete'),
|
||||||
|
icon: 'delete',
|
||||||
|
action: async (row) => await tableRef.value.CrudModelRef.remove([row]),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
@ -69,8 +81,8 @@ const columns = computed(() => [
|
||||||
save-url="WorkerIncomes/crud"
|
save-url="WorkerIncomes/crud"
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'workerIncomes',
|
urlCreate: 'workerIncomes',
|
||||||
title: t('Create workerBalance'),
|
title: t('Create balance'),
|
||||||
onDataSaved: () => tableRef.reload(),
|
onDataSaved: () => $refs.tableRef.reload(),
|
||||||
formInitialData: {
|
formInitialData: {
|
||||||
workerFk: entityId,
|
workerFk: entityId,
|
||||||
},
|
},
|
||||||
|
@ -81,10 +93,10 @@ const columns = computed(() => [
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
:default-remove="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Create workerBalance: Crear balance
|
Create balance: Crear balance
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -96,10 +96,23 @@ const columns = computed(() => [
|
||||||
label: t('worker.formation.tableVisibleColumns.hasDiploma'),
|
label: t('worker.formation.tableVisibleColumns.hasDiploma'),
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('delete'),
|
||||||
|
icon: 'delete',
|
||||||
|
action: async (row) => await tableRef.value.CrudModelRef.remove([row]),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<VnTable
|
<VnTable
|
||||||
|
class="worker-formation"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="WorkerFormation"
|
data-key="WorkerFormation"
|
||||||
:url="`Workers/${entityId}/trainingCourse`"
|
:url="`Workers/${entityId}/trainingCourse`"
|
||||||
|
@ -120,8 +133,15 @@ const columns = computed(() => [
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
:default-remove="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:global(.worker-formation thead > tr > th:nth-child(7)),
|
||||||
|
:global(.worker-formation thead > tr > th:nth-child(8)) {
|
||||||
|
max-width: 50px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Create training course: Crear curso de formación
|
Create training course: Crear curso de formación
|
||||||
|
|
|
@ -65,6 +65,18 @@ const columns = [
|
||||||
create: true,
|
create: true,
|
||||||
component: 'input',
|
component: 'input',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('delete'),
|
||||||
|
icon: 'delete',
|
||||||
|
action: async (row) => await tableRef.value.CrudModelRef.remove([row]),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
@ -87,5 +99,6 @@ const columns = [
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
:default-remove="false"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue