diff --git a/CHANGELOG.md b/CHANGELOG.md index dbf6bdcc3..51dd2010c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- (Tickets) => Se añade la opción de clonar ticket. #6951 + ### Changed ### Fixed diff --git a/quasar.config.js b/quasar.config.js index 2d8289508..80ddc3759 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files - boot: ['i18n', 'axios', 'vnDate', 'validations'], + boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js new file mode 100644 index 000000000..8c89c9202 --- /dev/null +++ b/src/boot/qformMixin.js @@ -0,0 +1,21 @@ +import { getCurrentInstance } from 'vue'; + +const filterAvailableInput = element => element.classList.contains('q-field__native') && !element.disabled +const filterAvailableText = element => element.__vueParentComponent.type.name === 'QInput' && element.__vueParentComponent?.attrs?.class !== 'vn-input-date'; + + +export default { + mounted: function () { + const vm = getCurrentInstance(); + if (vm.type.name === 'QForm') + if (!['searchbarForm','filterPanelForm'].includes(this.$el?.id)) { + // AUTOFOCUS + const elementsArray = Array.from(this.$el.elements); + const firstInputElement = elementsArray.filter(filterAvailableInput).find(filterAvailableText); + + if (firstInputElement) { + firstInputElement.focus(); + } + } + }, +}; diff --git a/src/boot/quasar.js b/src/boot/quasar.js new file mode 100644 index 000000000..a8d9b7ad9 --- /dev/null +++ b/src/boot/quasar.js @@ -0,0 +1,6 @@ +import { boot } from 'quasar/wrappers'; +import qFormMixin from './qformMixin'; + +export default boot(({ app }) => { + app.mixin(qFormMixin); +}); diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index 007d595cc..8b3731478 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -7,12 +7,16 @@ import axios from 'axios'; import { useState } from 'src/composables/useState'; import { useSession } from 'src/composables/useSession'; import { localeEquivalence } from 'src/i18n/index'; +import VnSelectFilter from 'src/components/common/VnSelectFilter.vue'; +import VnRow from 'components/ui/VnRow.vue'; +import FetchData from 'components/FetchData.vue'; const state = useState(); const session = useSession(); const router = useRouter(); const { t, locale } = useI18n(); import { useClipboard } from 'src/composables/useClipboard'; +import { ref } from 'vue'; const { copyText } = useClipboard(); const userLocale = computed({ get() { @@ -45,6 +49,9 @@ const darkMode = computed({ const user = state.getUser(); const token = session.getTokenMultimedia(); +const warehousesData = ref(); +const companiesData = ref(); +const accountBankData = ref(); onMounted(async () => { updatePreferences(); @@ -87,10 +94,28 @@ function copyUserToken() { + + + en: + localWarehouse: Local warehouse + localBank: Local bank + localCompany: Local company + userWarehouse: User warehouse + userCompany: User company + es: + localWarehouse: Almacén local + localBank: Banco local + localCompany: Empresa local + userWarehouse: Almacén del usuario + userCompany: Empresa del usuario + diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index 722462d4a..96d097191 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -164,7 +164,7 @@ function formatValue(value) {