forked from verdnatura/salix-front
refs #6553 fix reactivateWorker
This commit is contained in:
parent
db3ff0416c
commit
8490f24438
|
@ -915,7 +915,7 @@ worker:
|
||||||
started: Start Date
|
started: Start Date
|
||||||
ended: End Date
|
ended: End Date
|
||||||
company: Company
|
company: Company
|
||||||
reasondEnd: Reason for Termination
|
reasonEnd: Reason for Termination
|
||||||
department: Department
|
department: Department
|
||||||
professionalCategory: Professional Category
|
professionalCategory: Professional Category
|
||||||
calendarType: Work Calendar
|
calendarType: Work Calendar
|
||||||
|
|
|
@ -913,7 +913,7 @@ worker:
|
||||||
started: Fecha inicio
|
started: Fecha inicio
|
||||||
ended: Fecha fin
|
ended: Fecha fin
|
||||||
company: Empresa
|
company: Empresa
|
||||||
reasondEnd: Motivo finalización
|
reasonEnd: Motivo finalización
|
||||||
department: Departamento
|
department: Departamento
|
||||||
professionalCategory: Categoria profesional
|
professionalCategory: Categoria profesional
|
||||||
calendarType: Calendario laboral
|
calendarType: Calendario laboral
|
||||||
|
|
|
@ -5,7 +5,11 @@ import { useRoute } from 'vue-router';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
import worker from 'src/router/modules/worker';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const quasar = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const entityId = computed(() => route.params.id);
|
const entityId = computed(() => route.params.id);
|
||||||
|
@ -68,6 +72,22 @@ const businessFilter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function reactivateWorker(value) {
|
||||||
|
if (value === null) return;
|
||||||
|
quasar
|
||||||
|
.dialog({
|
||||||
|
message: t('Do you want to reactivate the user?'),
|
||||||
|
ok: {
|
||||||
|
push: true,
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
cancel: true,
|
||||||
|
})
|
||||||
|
.onOk(async () => {
|
||||||
|
worker.isDisable = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -80,10 +100,12 @@ const columns = computed(() => [
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
attrs: {
|
attrs: {
|
||||||
label: t('worker.business.tableVisibleColumns.ended'),
|
label: t('worker.business.tableVisibleColumns.ended'),
|
||||||
|
'@update:model-value': 'reactivateWorker()',
|
||||||
},
|
},
|
||||||
name: 'ended',
|
name: 'ended',
|
||||||
format: ({ ended }) => toDate(ended),
|
format: ({ ended }) => toDate(ended),
|
||||||
|
@ -98,13 +120,12 @@ const columns = computed(() => [
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'Companies',
|
url: 'Companies',
|
||||||
fields: ['code'],
|
fields: ['code'],
|
||||||
|
optionValue: 'id',
|
||||||
optionLabel: 'code',
|
optionLabel: 'code',
|
||||||
label: t('worker.business.tableVisibleColumns.company'),
|
label: t('worker.business.tableVisibleColumns.company'),
|
||||||
},
|
},
|
||||||
event: { 'update:modelValue': (a, b) => console.log(a, b) },
|
|
||||||
disable: false,
|
disable: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -114,7 +135,7 @@ const columns = computed(() => [
|
||||||
url: 'BusinessReasonEnds',
|
url: 'BusinessReasonEnds',
|
||||||
fields: ['id', 'reason'],
|
fields: ['id', 'reason'],
|
||||||
optionLabel: 'reason',
|
optionLabel: 'reason',
|
||||||
label: t('worker.business.tableVisibleColumns.reasondEnd'),
|
label: t('worker.business.tableVisibleColumns.reasonEnd'),
|
||||||
},
|
},
|
||||||
disable: false,
|
disable: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
@ -187,6 +208,7 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
disable: false,
|
disable: false,
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -218,8 +240,7 @@ const columns = computed(() => [
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'WorkerBusinessTypes',
|
url: 'WorkerBusinessTypes',
|
||||||
fields: ['id', 'name'],
|
fields: ['code', 'name'],
|
||||||
optionValue: 'name',
|
|
||||||
label: t('worker.business.tableVisibleColumns.businessType'),
|
label: t('worker.business.tableVisibleColumns.businessType'),
|
||||||
},
|
},
|
||||||
disable: false,
|
disable: false,
|
||||||
|
@ -278,10 +299,11 @@ const columns = computed(() => [
|
||||||
default-mode="card"
|
default-mode="card"
|
||||||
auto-load
|
auto-load
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
card-class="grid-two"
|
card-class="grid-two q-gutter-x-md"
|
||||||
></VnTable>
|
></VnTable>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
es:
|
||||||
|
Do you want to reactivate the user?: desea reactivar el usuario?
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
Loading…
Reference in New Issue