diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 100% rename from .eslintrc.js rename to .eslintrc.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md index e34523545..119f702f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,100 @@ +# Version 24.24 - 2024-06-11 + +### Added 🆕 + +- feat: 6942 hashtag in key : value summary by:jgallego +- feat: #6957: Rename FetchedTags instance tag by:Javier Segarra +- feat: refactor template by:Javier Segarra +- feat: refs #6600 Add option to add comment for photo motivation by:jorgep +- feat: refs #6942 test e2e tobook & toUnbook by:jorgep +- feat: refs #6942 to book summary button & reactive value by:jorgep +- feat: refs #6942 to unbook by:jorgep +- feat: refs #6942 url update by:jorgep +- feat: refs #6942 use correct currency in InvoiceIn components by:jorgep +- feat: refs #6942 vat rate total by:jorgep +- feat: refs #7494 new icons (7494-icons) by:alexm +- feat: refs #7494 new icons by:alexm +- feat: refs #7542 drop space by:jorgep +- feat: refs #7542 empty by:jorgep +- fix: refs #6942 changes and new features by:jorgep +- fix: style by:Javier Segarra +- style: color transparent when is fetive by:Javier Segarra +- style: fix color when is empty by:Javier Segarra +- style: reset poc style (6957_refactorFetechedTags) by:Javier Segarra +- style: reset poc style by:Javier Segarra +- style updates by:Javier Segarra + +### Changed 📦 + +- feat: refactor template by:Javier Segarra +- perf: 6957 add color as new shared variable by:Javier Segarra +- perf: 6957 change fetchedTags color by:Javier Segarra +- perf: remove local tree variable by:Javier Segarra +- refactor: add flat by:alexm +- refactor: refs #6600 replace QInput to VnInput by:jorgep +- refactor: refs #6652 improved defaulter section by:Jon +- refactor: refs #6942 Fix getTotalAmount function to correctly calculate the total amount in InvoiceInDueDay.vue by:jorgep +- refactor: refs #6942 new summary layout by:jorgep +- refactor: refs #6942 store key & actions by:jorgep +- refactor: refs #6942 summary by:jorgep +- refactor: refs #6942 use router hook by:jorgep +- refactor: refs #6942 WIP summary layout by:jorgep + +### Fixed 🛠️ + +- fix: 9-12 by:Javier Segarra +- fix: defaulter icon by:alexm +- fix: refs #5186 validation by:jorgep +- fix: refs #6095 add reFfk null on search by:pablone +- fix: refs #6942 cardDescriptor use store if its popup or different source data by:jorgep +- fix: refs #6942 changes and new features by:jorgep +- fix: refs #6942 drop comments by:jorgep +- fix: refs #6942 drop console by:jorgep +- fix: refs #6942 drop console.log by:jorgep +- fix: refs #6942 e2e test (origin/6942-warmfix-fixFormModel) by:jorgep +- fix: refs #6942 e2e tests by:jorgep +- fix: refs #6942 e2e tests by:jorgep +- fix: refs #6942 fix emit on data saved by:jorgep +- fix: refs #6942 fix emit on reset by:jorgep +- fix: refs #6942 fix vncard by:jorgep +- fix: refs #6942 formModel & CardDescriptor by:jorgep +- fix: refs #6942 formModel watch changes & invoiceInCreate by:jorgep +- fix: refs #6942 import by:jorgep +- fix: refs #6942 reloading by:jorgep +- fix: refs #6942 rollback by:jorgep +- fix: refs #6942 selectable expense by:jorgep +- fix: refs #6942 skip e2e tests by:jorgep +- fix: refs #6942 table bottom highlight & drop isBooked field by:jorgep +- fix: refs #6942 tests e2e by:jorgep +- fix: refs #6942 tests & summary table spacing by:jorgep +- fix: refs #6942 unit tests by:jorgep +- fix: refs #6942 vnLocation by:jorgep +- fix: refs #6942 wip: formModel by:jorgep +- fix: refs #7542 use right panel by:jorgep +- fix: searchbar redirect by:alexm +- fix: style by:Javier Segarra +- fix: WorkerCalendarItem by:Javier Segarra +- mini fix by:wbuezas +- refs #6111 clean code fix changes by:carlossa +- refs #6111 fix merge, fix column by:carlossa +- refs #6111 fix qtable, actions, scroll by:carlossa +- refs #6111 fix routeList by:carlossa +- refs #6111 fix sticky by:carlossa +- refs #6111 fix trad remove logs by:carlossa +- refs #6111 fix visibleColumns by:carlossa +- refs #6111 routeList fix by:carlossa +- refs #6332 fix calendar by:carlossa +- refs #6332 fix colors by:carlossa +- refs #6332 fix festive by:carlossa +- refs #6820 fix BasicData Tickets by:carlossa +- refs #6820 fix error front by:carlossa +- refs #6820 fix traduction by:carlossa +- refs #7391 fix textarea by:carlossa +- refs #7396 fix summary by:carlossa +- Search childs fix by:wbuezas +- small fix by:wbuezas +- style: fix color when is empty by:Javier Segarra + # Changelog All notable changes to this project will be documented in this file. @@ -7,12 +104,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2420.01] +### Added + +- (Item) => Se añade la opción de añadir un comentario del motivo de hacer una foto +- (Worker) => Se añade la opción de crear un trabajador ajeno a la empresa +- (Route) => Ahora se muestran todos los cmrs + ## [2418.01] ## [2416.01] - 2024-04-18 ### Added +- (Worker) => Se crea la sección Taquilla +- (General) => Se mantiene el filtro lateral en cualquier parte de la seccíon. + ### Fixed - (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro diff --git a/Jenkinsfile b/Jenkinsfile index 7d2957a1c..1766e3aea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -54,7 +54,6 @@ pipeline { } environment { PROJECT_NAME = 'lilium' - STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { stage('Install') { @@ -95,7 +94,7 @@ pipeline { sh 'quasar build' script { def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version + env.VERSION = "${packageJson.version}-build${env.BUILD_ID}" } dockerBuild() } @@ -104,15 +103,18 @@ pipeline { when { expression { PROTECTED_BRANCH } } - environment { - DOCKER_HOST = "${env.SWARM_HOST}" - } steps { script { def packageJson = readJSON file: 'package.json' - env.VERSION = packageJson.version + env.VERSION = "${packageJson.version}-build${env.BUILD_ID}" + } + withKubeConfig([ + serverUrl: "$KUBERNETES_API", + credentialsId: 'kubernetes', + namespace: 'lilium' + ]) { + sh 'kubectl set image deployment/lilium-$BRANCH_NAME lilium-$BRANCH_NAME=$REGISTRY/salix-frontend:$VERSION' } - sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" } } } diff --git a/changelog.sh b/changelog.sh new file mode 100644 index 000000000..8cd7b4716 --- /dev/null +++ b/changelog.sh @@ -0,0 +1,34 @@ +features_types=(chore feat style) +changes_types=(refactor perf) +fix_types=(fix revert) +file="CHANGELOG.md" +file_tmp="temp_log.txt" +file_current_tmp="temp_current_log.txt" + +setType(){ + echo "### $1" >> $file_tmp + arr=("$@") + echo "" > $file_current_tmp + for i in "${arr[@]}" + do + git log --grep="$i" --oneline --no-merges --format="- %s %d by:%an" master..test >> $file_current_tmp + done + # remove duplicates + sort -o $file_current_tmp -u $file_current_tmp + cat $file_current_tmp >> $file_tmp + echo "" >> $file_tmp + # remove tmp current file + [ -e $file_current_tmp ] && rm $file_current_tmp +} + +echo "# Version XX.XX - XXXX-XX-XX" >> $file_tmp +echo "" >> $file_tmp + +setType "Added 🆕" "${features_types[@]}" +setType "Changed 📦" "${changes_types[@]}" +setType "Fixed 🛠️" "${fix_types[@]}" + +cat $file >> $file_tmp +mv $file_tmp $file + + diff --git a/docker-compose.yml b/docker-compose.yml index 6494739f2..df793fc75 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,7 @@ version: '3.7' services: main: - image: registry.verdnatura.es/salix-frontend:${BRANCH_NAME:?} + image: registry.verdnatura.es/salix-frontend:${VERSION:?} build: context: . dockerfile: ./Dockerfile - ports: - - 4000 - deploy: - replicas: ${FRONT_REPLICAS:?} - placement: - constraints: - - node.role == worker - resources: - limits: - memory: 1G diff --git a/package.json b/package.json index 063cf6de4..71d80d401 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.20.0", + "version": "24.30.1", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/public/no-image-dark.png b/public/no-image-dark.png new file mode 100644 index 000000000..2a20d7eb4 Binary files /dev/null and b/public/no-image-dark.png differ diff --git a/public/no-image.png b/public/no-image.png new file mode 100644 index 000000000..11d5317a9 Binary files /dev/null and b/public/no-image.png differ diff --git a/public/no-user.png b/public/no-user.png new file mode 100644 index 000000000..e090bc2eb Binary files /dev/null and b/public/no-user.png differ diff --git a/quasar.config.js b/quasar.config.js index dd7a91002..b59c62eeb 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', 'quasar.defaults'], + boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar', 'quasar.defaults'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css css: ['app.scss'], diff --git a/src/boot/axios.js b/src/boot/axios.js index e3e7289af..4fd83ddea 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -1,11 +1,10 @@ import axios from 'axios'; -import { Notify } from 'quasar'; import { useSession } from 'src/composables/useSession'; import { Router } from 'src/router'; -import { i18n } from './i18n'; +import useNotify from 'src/composables/useNotify.js'; const session = useSession(); -const { t } = i18n.global; +const { notify } = useNotify(); axios.defaults.baseURL = '/api/'; @@ -27,10 +26,7 @@ const onResponse = (response) => { const isSaveRequest = method === 'patch'; if (isSaveRequest) { - Notify.create({ - message: t('globals.dataSaved'), - type: 'positive', - }); + notify('globals.dataSaved', 'positive'); } return response; @@ -67,10 +63,7 @@ const onResponseError = (error) => { return Promise.reject(error); } - Notify.create({ - message: t(message), - type: 'negative', - }); + notify(message, 'negative'); return Promise.reject(error); }; diff --git a/src/boot/qformMixin.js b/src/boot/qformMixin.js index 8c89c9202..0bf1f9795 100644 --- a/src/boot/qformMixin.js +++ b/src/boot/qformMixin.js @@ -1,21 +1,47 @@ 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'; - +const filterAvailableInput = (element) => { + return element.classList.contains('q-field__native') && !element.disabled; +}; +const filterAvailableText = (element) => { + return ( + 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)) { + 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); + const availableInputs = elementsArray.filter(filterAvailableInput); + const firstInputElement = availableInputs.find(filterAvailableText); if (firstInputElement) { firstInputElement.focus(); } + const that = this; + this.$el.addEventListener('keyup', function (evt) { + if (evt.key === 'Enter') { + const input = evt.target; + if (input.type == 'textarea' && evt.shiftKey) { + evt.preventDefault(); + let { selectionStart, selectionEnd } = input; + input.value = + input.value.substring(0, selectionStart) + + '\n' + + input.value.substring(selectionEnd); + selectionStart = selectionEnd = selectionStart + 1; + return; + } + evt.preventDefault(); + that.onSubmit(); + } + }); } + } }, }; diff --git a/src/components/CreateBankEntityForm.vue b/src/components/CreateBankEntityForm.vue index 4acc7b749..b2c5226e6 100644 --- a/src/components/CreateBankEntityForm.vue +++ b/src/components/CreateBankEntityForm.vue @@ -8,12 +8,7 @@ import FetchData from 'components/FetchData.vue'; import VnRow from 'components/ui/VnRow.vue'; import FormModelPopup from './FormModelPopup.vue'; -const props = defineProps({ - showEntityField: { - type: Boolean, - default: true, - }, -}); +defineProps({ showEntityField: { type: Boolean, default: true } }); const emit = defineEmits(['onDataSaved']); const { t } = useI18n(); @@ -26,7 +21,7 @@ const bankEntityFormData = reactive({ }); const countriesFilter = { - fields: ['id', 'country', 'code'], + fields: ['id', 'name', 'code'], }; const countriesOptions = ref([]); @@ -58,23 +53,19 @@ onMounted(async () => { > diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue index d38ff94df..2d626ed99 100644 --- a/src/components/CreateNewProvinceForm.vue +++ b/src/components/CreateNewProvinceForm.vue @@ -40,24 +40,20 @@ const onDataSaved = (dataSaved) => { > diff --git a/src/components/CreateThermographForm.vue b/src/components/CreateThermographForm.vue index 60c531529..061c47712 100644 --- a/src/components/CreateThermographForm.vue +++ b/src/components/CreateThermographForm.vue @@ -54,51 +54,42 @@ const onDataSaved = (dataSaved) => { > diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index de4724e55..d5d8e2a91 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -1,6 +1,7 @@