diff --git a/README.md b/README.md index a053cdff..d72bfd68 100644 --- a/README.md +++ b/README.md @@ -6,31 +6,30 @@ Hedera is the main web page for Verdnatura. Required dependencies. - * PHP >= 7.0 - * Node.js >= 18.0 +- PHP >= 7.0 +- Node.js >= 18.0 Launch application for development. + ``` $ quasar dev ``` Launch Salix backend. -``` -npm run salix + ``` -Launch legacy PHP backend. -``` -npm run back +pnpm run back ``` Run server side method from command line. + ``` php hedera-web.php -m method_path ``` ## Built with - * [Webpack](https://webpack.js.org/) - * [MooTools](https://mootools.net/) - * [TinyMCE](https://www.tinymce.com/) +- [Webpack](https://webpack.js.org/) +- [MooTools](https://mootools.net/) +- [TinyMCE](https://www.tinymce.com/) diff --git a/src/boot/axios.js b/src/boot/axios.js index b923ccdc..6a2db124 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -3,6 +3,7 @@ import { Connection } from '../js/db/connection'; import { useUserStore } from 'stores/user'; import axios from 'axios'; import useNotify from 'src/composables/useNotify.js'; +import { useAppStore } from 'src/stores/app'; const { notify } = useNotify(); // Be careful when using SSR for cross-request state pollution @@ -37,9 +38,11 @@ const onResponseError = error => { export default boot(({ app }) => { const userStore = useUserStore(); + const appStore = useAppStore(); function addToken(config) { if (userStore.token) { config.headers.Authorization = userStore.token; + config.headers['Accept-Language'] = appStore.siteLang; } return config; } diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 24b82017..c4a3e1df 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -129,17 +129,20 @@ async function filterHandler(val, update) { if (!$props.defaultFilter) return update(); const newOptions = filter(val, myOptionsOriginal.value); - update( - () => { - myOptions.value = newOptions; - }, - ref => { - if (val !== '' && ref.options.length > 0) { - ref.setOptionIndex(-1); - ref.moveOptionSelection(1, true); + + setTimeout(() => { + update( + () => { + myOptions.value = newOptions; + }, + ref => { + if (val !== '' && ref.options.length > 0) { + ref.setOptionIndex(-1); + ref.moveOptionSelection(1, true); + } } - } - ); + ); + }, 300); } @@ -178,6 +181,13 @@ async function filterHandler(val, update) { > + diff --git a/src/components/ui/ImageEditor.vue b/src/components/ui/ImageEditor.vue index 046c0ca7..8d1c610f 100644 --- a/src/components/ui/ImageEditor.vue +++ b/src/components/ui/ImageEditor.vue @@ -100,26 +100,21 @@ const onSubmit = async () => { en-US: name: Name file: File - send: Send imageAdded: Image added successfully es-ES: name: Nombre file: Archivo - send: Enviar imageAdded: Imagen añadida correctamente ca-ES: name: Nom file: Arxiu - send: Enviar imageAdded: Imatge afegida correctament fr-FR: name: Nom file: Fichier - send: Envoyer imageAdded: Image ajoutée correctement pt-PT: name: Nome file: Arquivo - send: Enviar imageAdded: Imagen adicionada corretamente diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue index fb468dc1..7c8addc3 100644 --- a/src/components/ui/VnImg.vue +++ b/src/components/ui/VnImg.vue @@ -67,6 +67,10 @@ const url = computed(() => { return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.size}/${props.id}`; }); +const zoomUrl = computed(() => { + return `${props.baseURL ?? app.imageUrl}/${props.storage}/${props.zoomSize}/${props.id}`; +}); + const rounded = computed(() => { const roundedMap = { none: '', @@ -114,7 +118,7 @@ const rounded = computed(() => { [] @@ -29,7 +25,6 @@ const { t } = useI18n(); v-if="!rows?.length" class="flex items-center q-pa-md justify-center items-center" > - {{ t(emptyMessage) }} diff --git a/src/components/ui/VnSearchBar.vue b/src/components/ui/VnSearchBar.vue index be15f6c9..214a8cff 100644 --- a/src/components/ui/VnSearchBar.vue +++ b/src/components/ui/VnSearchBar.vue @@ -40,6 +40,11 @@ const search = async () => { query: searchTerm.value ? { search: searchTerm.value } : {} }); + if (!searchTerm.value) { + emit('onSearchError'); + return; + } + if (props.sqlQuery) { data = await jApi.query(props.sqlQuery, { [props.searchField]: searchTerm.value diff --git a/src/i18n/ca-ES/index.js b/src/i18n/ca-ES/index.js index 20b088cf..3a09fc17 100644 --- a/src/i18n/ca-ES/index.js +++ b/src/i18n/ca-ES/index.js @@ -134,6 +134,7 @@ export default { minQuantity: 'Quantitat mínima', introduceSearchTerm: 'Introdueix un terme de cerca', noOrdersFound: `No s'han trobat comandes`, + send: 'Enviar', // Image related translations 'Cant lock cache': 'No es pot bloquejar la memòria cau', 'Bad file format': 'Format de fitxer no reconegut', diff --git a/src/i18n/en-US/index.js b/src/i18n/en-US/index.js index e68add91..668ebcf9 100644 --- a/src/i18n/en-US/index.js +++ b/src/i18n/en-US/index.js @@ -168,6 +168,7 @@ export default { minQuantity: 'Minimum quantity', introduceSearchTerm: 'Enter a search term', noOrdersFound: 'No orders found', + send: 'Send', // Image related translations 'Cant lock cache': 'The cache could not be blocked', 'Bad file format': 'Unrecognized file format', diff --git a/src/i18n/es-ES/index.js b/src/i18n/es-ES/index.js index b30f3ed4..6cd7f59d 100644 --- a/src/i18n/es-ES/index.js +++ b/src/i18n/es-ES/index.js @@ -167,6 +167,7 @@ export default { minQuantity: 'Cantidad mínima', introduceSearchTerm: 'Introduce un término de búsqueda', noOrdersFound: 'No se encontrado pedidos', + send: 'Enviar', // Image related translations 'Cant lock cache': 'La caché no pudo ser bloqueada', 'Bad file format': 'Formato de archivo no reconocido', diff --git a/src/i18n/fr-FR/index.js b/src/i18n/fr-FR/index.js index 4ad3ec06..1550c61f 100644 --- a/src/i18n/fr-FR/index.js +++ b/src/i18n/fr-FR/index.js @@ -135,6 +135,7 @@ export default { minQuantity: 'Quantité minimum', introduceSearchTerm: 'Entrez un terme de recherche', noOrdersFound: 'Aucune commande trouvée', + send: 'Envoyer', // Image related translations 'Cant lock cache': "Le cache n'a pas pu être verrouillé", 'Bad file format': 'Format de fichier non reconnu', diff --git a/src/i18n/pt-PT/index.js b/src/i18n/pt-PT/index.js index 7a193eb7..ce5a4f5a 100644 --- a/src/i18n/pt-PT/index.js +++ b/src/i18n/pt-PT/index.js @@ -133,6 +133,7 @@ export default { minQuantity: 'Quantidade mínima', introduceSearchTerm: 'Digite um termo de pesquisa', noOrdersFound: 'Nenhum pedido encontrado', + send: 'Enviar', // Image related translations 'Cant lock cache': 'O cache não pôde ser bloqueado', 'Bad file format': 'Formato de arquivo inválido', diff --git a/src/layouts/LoginLayout.vue b/src/layouts/LoginLayout.vue index 197e7499..3e414f0c 100644 --- a/src/layouts/LoginLayout.vue +++ b/src/layouts/LoginLayout.vue @@ -3,13 +3,11 @@ id="bg" class="fullscreen row justify-center items-center layout-view scroll" > -
- - - - - -
+ + + + + diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 3e9b3430..3ec01a91 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -47,7 +47,7 @@ const logoutSupplantedUser = async () => {