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/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index c46ac7752..1117225c7 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -1,5 +1,5 @@ + + + +es: + New expense: Nuevo gasto + It's a withholding: Es una retención + diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index a426ac2b4..4c44d29e2 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -105,7 +105,7 @@ async function setProvince(id, data) { option-label="name" option-value="id" :rules="validate('postcode.city')" - :roles-allowed-to-create="['deliveryAssistant']" + :acls="[{ model: 'Town', props: '*', accessType: 'WRITE' }]" :emit-value="false" clearable > 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/FetchData.vue b/src/components/FetchData.vue index 2a0864d3e..3038aa88e 100644 --- a/src/components/FetchData.vue +++ b/src/components/FetchData.vue @@ -44,7 +44,7 @@ onMounted(async () => { async function fetch(fetchFilter = {}) { try { - const filter = Object.assign(fetchFilter, $props.filter); // eslint-disable-line vue/no-dupe-keys + const filter = { ...fetchFilter, ...$props.filter }; // eslint-disable-line vue/no-dupe-keys if ($props.where && !fetchFilter.where) filter.where = $props.where; if ($props.sortBy) filter.order = $props.sortBy; if ($props.limit) filter.limit = $props.limit; 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) => { />