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