diff --git a/package.json b/package.json index f25e570a3..eaffd8d85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.36.0", + "version": "24.40.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", @@ -62,4 +62,4 @@ "vite": "^5.1.4", "vitest": "^0.31.1" } -} +} \ No newline at end of file diff --git a/src/boot/mainShortcutMixin.js b/src/boot/mainShortcutMixin.js index 3b5c604b7..8e5f147db 100644 --- a/src/boot/mainShortcutMixin.js +++ b/src/boot/mainShortcutMixin.js @@ -9,16 +9,16 @@ export default { const keyBindingMap = routes .filter((route) => route.meta.keyBinding) .reduce((map, route) => { - map[route.meta.keyBinding.toLowerCase()] = route.path; + map['Key' + route.meta.keyBinding.toUpperCase()] = route.path; return map; }, {}); const handleKeyDown = (event) => { - const { ctrlKey, altKey, key } = event; + const { ctrlKey, altKey, code } = event; - if (ctrlKey && altKey && keyBindingMap[key] && !isNotified) { + if (ctrlKey && altKey && keyBindingMap[code] && !isNotified) { event.preventDefault(); - router.push(keyBindingMap[key]); + router.push(keyBindingMap[code]); isNotified = true; } }; diff --git a/src/components/CreateNewExpenseForm.vue b/src/components/CreateNewExpenseForm.vue new file mode 100644 index 000000000..7088cec03 --- /dev/null +++ b/src/components/CreateNewExpenseForm.vue @@ -0,0 +1,50 @@ + + + + +es: + New expense: Nuevo gasto + It's a withholding: Es una retención + diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 33c831e3f..0386e037b 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -189,11 +189,11 @@ async function saveChanges(data) { }); } -async function insert() { +async function insert(pushData = $props.dataRequired) { const $index = formData.value.length ? formData.value[formData.value.length - 1].$index + 1 : 0; - formData.value.push(Object.assign({ $index }, $props.dataRequired)); + formData.value.push(Object.assign({ $index }, pushData)); hasChanges.value = true; } diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index 743c2c9d1..8449f9354 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -159,8 +159,8 @@ const removeTag = (index, params, search) => { />