diff --git a/src/boot/mainShortcutMixin.js b/src/boot/mainShortcutMixin.js index c4d37fd73..3b5c604b7 100644 --- a/src/boot/mainShortcutMixin.js +++ b/src/boot/mainShortcutMixin.js @@ -1,8 +1,10 @@ import routes from 'src/router/modules'; - import { useRouter } from 'vue-router'; + +let isNotified = false; + export default { - mounted: function () { + created: function () { const router = useRouter(); const keyBindingMap = routes .filter((route) => route.meta.keyBinding) @@ -10,14 +12,27 @@ export default { map[route.meta.keyBinding.toLowerCase()] = route.path; return map; }, {}); + const handleKeyDown = (event) => { const { ctrlKey, altKey, key } = event; - event.preventDefault(); - if (ctrlKey && altKey && keyBindingMap[key]) { + + if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) { + event.preventDefault(); router.push(keyBindingMap[key]); + isNotified = true; + } + }; + + const handleKeyUp = (event) => { + const { ctrlKey, altKey } = event; + + // Resetea la bandera cuando se sueltan las teclas ctrl o alt + if (!ctrlKey || !altKey) { + isNotified = false; } }; window.addEventListener('keydown', handleKeyDown); + window.addEventListener('keyup', handleKeyUp); }, }; diff --git a/src/components/ui/FetchedTags.vue b/src/components/ui/FetchedTags.vue index beaa85bfe..a0edf85f8 100644 --- a/src/components/ui/FetchedTags.vue +++ b/src/components/ui/FetchedTags.vue @@ -2,10 +2,6 @@ import { computed } from 'vue'; const $props = defineProps({ - maxLength: { - type: Number, - required: true, - }, item: { type: Object, required: true, diff --git a/src/css/app.scss b/src/css/app.scss index 41d3df795..357c9ecdb 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -253,6 +253,7 @@ input::-webkit-inner-spin-button { } td { font-size: 11pt; + border-top: 1px solid var(--vn-page-color); border-collapse: collapse; } } diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index ef5e02b12..548981de1 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -260,6 +260,7 @@ globals: ticketsMonitor: Tickets monitor clientsActionsMonitor: Clients and actions serial: Serial + medical: Mutual created: Created worker: Worker now: Now @@ -878,6 +879,7 @@ worker: timeControl: Time control locker: Locker balance: Balance + medical: Medical list: name: Name email: Email @@ -957,6 +959,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Date + time: Hour + center: Formation Center + invoice: Invoice + amount: Amount + isFit: Fit + remark: Observations imageNotFound: Image not found balance: tableVisibleColumns: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 7143bf96f..697e6c38c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -264,6 +264,7 @@ globals: ticketsMonitor: Monitor de tickets clientsActionsMonitor: Clientes y acciones serial: Facturas por serie + medical: Mutua created: Fecha creación worker: Trabajador now: Ahora @@ -881,6 +882,8 @@ worker: timeControl: Control de horario locker: Taquilla balance: Balance + formation: Formación + medical: Mutua list: name: Nombre email: Email @@ -951,6 +954,15 @@ worker: amount: Importe remark: Bonficado hasDiploma: Diploma + medical: + tableVisibleColumns: + date: Fecha + time: Hora + center: Centro de Formación + invoice: Factura + amount: Importe + isFit: Apto + remark: Observaciones imageNotFound: No se ha encontrado la imagen balance: tableVisibleColumns: diff --git a/src/pages/Claim/Card/ClaimSummary.vue b/src/pages/Claim/Card/ClaimSummary.vue index 9538e753f..244eb5936 100644 --- a/src/pages/Claim/Card/ClaimSummary.vue +++ b/src/pages/Claim/Card/ClaimSummary.vue @@ -1,11 +1,10 @@ diff --git a/src/pages/Worker/Card/WorkerMedical.vue b/src/pages/Worker/Card/WorkerMedical.vue new file mode 100644 index 000000000..6bca4ae85 --- /dev/null +++ b/src/pages/Worker/Card/WorkerMedical.vue @@ -0,0 +1,91 @@ + + diff --git a/src/pages/Worker/Card/WorkerSummary.vue b/src/pages/Worker/Card/WorkerSummary.vue index 33d949dbb..ab201f964 100644 --- a/src/pages/Worker/Card/WorkerSummary.vue +++ b/src/pages/Worker/Card/WorkerSummary.vue @@ -10,7 +10,6 @@ import CardSummary from 'components/ui/CardSummary.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnTitle from 'src/components/common/VnTitle.vue'; import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue'; -import VnRow from 'src/components/ui/VnRow.vue'; import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue'; const route = useRoute(); diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue index af7cd6c94..d61c61abf 100644 --- a/src/pages/Zone/Card/ZoneCard.vue +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -10,17 +10,7 @@ import ZoneFilterPanel from '../ZoneFilterPanel.vue'; const { t } = useI18n(); const route = useRoute(); const routeName = computed(() => route.name); -const customRouteRedirectName = computed(() => { - if (routeName.value === 'ZoneLocations') return null; - return routeName.value; -}); -const searchbarMakeFetch = computed(() => routeName.value !== 'ZoneEvents'); -const searchBarDataKeys = { - ZoneWarehouses: 'ZoneWarehouses', - ZoneSummary: 'ZoneSummary', - ZoneLocations: 'ZoneLocations', - ZoneEvents: 'ZoneEvents', -}; + function notIsLocations(ifIsFalse, ifIsTrue) { if (routeName.value != 'ZoneLocations') return ifIsFalse; return ifIsTrue; diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js index f80df5e06..2a523e7fe 100644 --- a/src/router/modules/worker.js +++ b/src/router/modules/worker.js @@ -25,6 +25,7 @@ export default { 'WorkerLocker', 'WorkerBalance', 'WorkerFormation', + 'WorkerMedical', ], }, children: [ @@ -196,6 +197,15 @@ export default { }, component: () => import('src/pages/Worker/Card/WorkerFormation.vue'), }, + { + name: 'WorkerMedical', + path: 'medical', + meta: { + title: 'medical', + icon: 'medical_information', + }, + component: () => import('src/pages/Worker/Card/WorkerMedical.vue'), + }, ], }, ],