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 @@ @@ -84,6 +88,7 @@ const loadVolumes = async (rows) => { @on-fetch="(data) => loadVolumes(data)" :right-search="false" :column-search="false" + :disable-option="{ card: true }" > @@ -92,7 +97,13 @@ const loadVolumes = async (rows) => { - + + {{ row?.item?.name }} + + {{ row?.item?.subName.toUpperCase() }} + + + {{ volumes?.[rowIndex]?.volume }} @@ -121,6 +132,11 @@ const loadVolumes = async (rows) => { } } } + +.subName { + color: var(--vn-label-color); + text-transform: uppercase; +} en: diff --git a/src/pages/Order/OrderList.vue b/src/pages/Order/OrderList.vue index 9870be9b3..d96a33ef5 100644 --- a/src/pages/Order/OrderList.vue +++ b/src/pages/Order/OrderList.vue @@ -11,6 +11,9 @@ import VnSelect from 'src/components/common/VnSelect.vue'; import OrderSearchbar from './Card/OrderSearchbar.vue'; import RightMenu from 'src/components/common/RightMenu.vue'; import OrderFilter from './Card/OrderFilter.vue'; +import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue'; +import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue'; +import { toDateTimeFormat } from 'src/filters/date'; const { t } = useI18n(); const { viewSummary } = useSummaryDialog(); @@ -75,7 +78,7 @@ const columns = computed(() => [ label: t('module.created'), component: 'date', cardVisible: true, - format: (row) => toDate(row?.landed), + format: (row) => toDateTimeFormat(row?.landed), columnField: { component: null, }, @@ -115,6 +118,7 @@ const columns = computed(() => [ }, }, cardVisible: true, + columnClass: 'expand', }, { align: 'left', @@ -132,6 +136,7 @@ const columns = computed(() => [ title: t('InvoiceOutSummary'), icon: 'preview', action: (row) => viewSummary(row.id, OrderSummary), + isPrimary: true, }, ], }, @@ -154,6 +159,16 @@ async function fetchAgencies({ landed, addressId }) { }); agencyList.value = data; } + +const getDateColor = (date) => { + const today = Date.vnNew(); + today.setHours(0, 0, 0, 0); + const timeTicket = new Date(date); + timeTicket.setHours(0, 0, 0, 0); + const comparation = today - timeTicket; + if (comparation == 0) return 'bg-warning'; + if (comparation < 0) return 'bg-success'; +}; @@ -183,6 +198,25 @@ async function fetchAgencies({ landed, addressId }) { :columns="columns" redirect="order" > + + + {{ row?.clientName }} + + + + + + {{ row?.name }} + + + + + + + {{ toDate(row?.landed) }} + + + { {{ buy.subName }} - + {{ dashIfEmpty(buy.quantity) }} {{ dashIfEmpty(buy.price) }} diff --git a/src/pages/Ticket/Card/BasicData/BasicDataTable.vue b/src/pages/Ticket/Card/BasicData/BasicDataTable.vue index 48b8c882f..7f2f100ad 100644 --- a/src/pages/Ticket/Card/BasicData/BasicDataTable.vue +++ b/src/pages/Ticket/Card/BasicData/BasicDataTable.vue @@ -245,7 +245,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); {{ row.item.name }} {{ row.item.subName }} - + diff --git a/src/pages/Ticket/Card/TicketComponents.vue b/src/pages/Ticket/Card/TicketComponents.vue index 3954b5a62..6131c92db 100644 --- a/src/pages/Ticket/Card/TicketComponents.vue +++ b/src/pages/Ticket/Card/TicketComponents.vue @@ -310,7 +310,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); {{ row.item.name }} {{ row.item.subName }} - + diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index bd7297b56..2ea12bb05 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -656,7 +656,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); {{ row.concept }} {{ row.item?.subName }} - + diff --git a/src/pages/Ticket/Card/TicketSaleTracking.vue b/src/pages/Ticket/Card/TicketSaleTracking.vue index e699d2bfd..6978d92c8 100644 --- a/src/pages/Ticket/Card/TicketSaleTracking.vue +++ b/src/pages/Ticket/Card/TicketSaleTracking.vue @@ -412,7 +412,7 @@ const qCheckBoxController = (sale, action) => { {{ row.subName }} - + diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 177384663..bc160846a 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -399,7 +399,6 @@ async function changeState(value) { {{ props.row.price }} € diff --git a/src/pages/Ticket/Card/TicketVolume.vue b/src/pages/Ticket/Card/TicketVolume.vue index 93da31e53..68d2a1f73 100644 --- a/src/pages/Ticket/Card/TicketVolume.vue +++ b/src/pages/Ticket/Card/TicketVolume.vue @@ -145,7 +145,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); {{ row.item.name }} {{ row.item.subName }} - + 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'), + }, ], }, ],