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(); @@ -165,4 +194,13 @@ es: Education level: Nivel educación SSN: NSS Locker: Taquilla + fiDueDate: Fecha de caducidad del DNI + seniority: Antigüedad + hasMachineryAuthorized: Autorizado para llevar maquinaria + isFreelance: Autónomo + isDisable: Trabajador desactivado + fi: DNI/NIE/NIF + sex: Sexo + birth: Cumpleaños + isSsDiscounted: Bonificación SS diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 5b25fe335..129e0ce8c 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -2,7 +2,7 @@ import { ref, onMounted, computed } from 'vue'; import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; -import { dashIfEmpty } from 'src/filters'; +import { dashIfEmpty, toDate } from 'src/filters'; import { getUrl } from 'src/composables/getUrl'; import VnLv from 'src/components/ui/VnLv.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; @@ -111,6 +111,47 @@ const filter = { + + + + + + + + + + + +