diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 7d680c681..0e6edeab2 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -830,6 +830,7 @@ worker: calendar: Calendar timeControl: Time control locker: Locker + list: name: Name email: Email @@ -861,6 +862,15 @@ worker: role: Role sipExtension: Extension locker: Locker + fiDueDate: Fecha de caducidad del DNI + sex: Sexo + seniority: Antigüedad + fi: DNI/NIE/NIF + birth: Cumpleaños + isFreelance: Autónomo + isSsDiscounted: Bonificación SS + hasMachineryAuthorized: Autorizado para llevar maquinaria + isDisable: Trabajador desactivado notificationsManager: activeNotifications: Active notifications availableNotifications: Available notifications diff --git a/src/pages/Department/Card/DepartmentDescriptor.vue b/src/pages/Department/Card/DepartmentDescriptor.vue index e60a8c91b..70c578fc2 100644 --- a/src/pages/Department/Card/DepartmentDescriptor.vue +++ b/src/pages/Department/Card/DepartmentDescriptor.vue @@ -3,7 +3,7 @@ import { computed, ref } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { useI18n } from 'vue-i18n'; import { useQuasar } from 'quasar'; - +import { useVnConfirm } from 'composables/useVnConfirm'; import VnLv from 'src/components/ui/VnLv.vue'; import CardDescriptor from 'src/components/ui/CardDescriptor.vue'; import useCardDescription from 'src/composables/useCardDescription'; @@ -43,30 +43,17 @@ const setData = (entity) => { data.value = useCardDescription(entity.name, entity.id); }; -const removeDepartment = () => { - quasar - .dialog({ - title: 'Are you sure you want to delete it?', - message: 'Delete department', - ok: { - push: true, - color: 'primary', - }, - cancel: true, - }) - .onOk(async () => { - try { - await axios.post( - `/Departments/${entityId.value}/removeChild`, - entityId.value - ); - router.push({ name: 'WorkerDepartment' }); - notify('department.departmentRemoved', 'positive'); - } catch (err) { - console.error('Error removing department'); - } - }); +const removeDepartment = async () => { + try { + await axios.post(`/Departments/${entityId.value}/removeChild`, entityId.value); + router.push({ name: 'WorkerDepartment' }); + notify('department.departmentRemoved', 'positive'); + } catch (err) { + console.error('Error removing department'); + } }; + +const { openConfirmationModal } = useVnConfirm();