diff --git a/Jenkinsfile b/Jenkinsfile index 0f3bc47a9..05ef34791 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,6 +115,7 @@ pipeline { steps { script { sh 'rm -f junit/e2e-*.xml' + sh 'rm -rf test/cypress/screenshots' env.COMPOSE_TAG = PROTECTED_BRANCH.contains(env.CHANGE_TARGET) ? env.CHANGE_TARGET : 'dev' def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs') @@ -132,6 +133,7 @@ pipeline { post { always { sh "docker-compose ${env.COMPOSE_PARAMS} down -v" + archiveArtifacts artifacts: 'test/cypress/screenshots/**/*', allowEmptyArchive: true junit( testResults: 'junit/e2e-*.xml', allowEmptyResults: true diff --git a/README.md b/README.md index d280e29ce..8eff99137 100644 --- a/README.md +++ b/README.md @@ -49,3 +49,9 @@ pnpm run test:e2e:summary ```bash quasar build ``` + +### Serve the app for production + +```bash +quasar build quasar serve dist/spa --host 0.0.0.0 --proxy=./proxy-serve.js +``` diff --git a/package.json b/package.json index 076cbbb14..017412ef2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "25.12.0", + "version": "25.14.0", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/boot/vnDate.js b/src/boot/vnDate.js index 33d5ac27f..8f18e2400 100644 --- a/src/boot/vnDate.js +++ b/src/boot/vnDate.js @@ -1,4 +1,6 @@ import { boot } from 'quasar/wrappers'; +import { date as quasarDate } from 'quasar'; +const { formatDate } = quasarDate; export default boot(() => { Date.vnUTC = () => { @@ -25,4 +27,34 @@ export default boot(() => { const date = new Date(Date.vnUTC()); return new Date(date.getFullYear(), date.getMonth() + 1, 0); }; + + Date.getCurrentDateTimeFormatted = ( + options = { + startOfDay: false, + endOfDay: true, + iso: true, + mask: 'DD-MM-YYYY HH:mm', + }, + ) => { + const date = Date.vnUTC(); + if (options.startOfDay) { + date.setHours(0, 0, 0); + } + if (options.endOfDay) { + date.setHours(23, 59, 0); + } + if (options.iso) { + return date.toISOString(); + } + return formatDate(date, options.mask); + }; + + Date.convertToISODateTime = (dateTimeStr) => { + const [datePart, timePart] = dateTimeStr.split(' '); + const [day, month, year] = datePart.split('-'); + const [hours, minutes] = timePart.split(':'); + + const isoDate = new Date(year, month - 1, day, hours, minutes); + return isoDate.toISOString(); + }; }); diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index 6303f48ae..e0182a6b5 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -83,7 +83,7 @@ const isLoading = ref(false); const hasChanges = ref(false); const originalData = ref(); const vnPaginateRef = ref(); -const formData = ref([]); +const formData = ref(); const saveButtonRef = ref(null); const watchChanges = ref(); const formUrl = computed(() => $props.url); @@ -298,6 +298,10 @@ watch(formUrl, async () => { }); - diff --git a/src/components/EditPictureForm.vue b/src/components/EditPictureForm.vue index 1f158e785..29377b559 100644 --- a/src/components/EditPictureForm.vue +++ b/src/components/EditPictureForm.vue @@ -140,7 +140,7 @@ const updatePhotoPreview = (value) => { img.onerror = () => { notify( t("This photo provider doesn't allow remote downloads"), - 'negative' + 'negative', ); }; } @@ -219,11 +219,7 @@ const makeRequest = async () => { color="primary" class="cursor-pointer" @click="rotateLeft()" - > - - + />
@@ -233,11 +229,7 @@ const makeRequest = async () => { color="primary" class="cursor-pointer" @click="rotateRight()" - > - - + />
@@ -265,7 +257,6 @@ const makeRequest = async () => { class="cursor-pointer q-mr-sm" @click="openInputFile()" > - {{ diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index f73753a6b..0f1e3f1eb 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -198,8 +198,7 @@ const setCategoryList = (data) => { v-model="params.typeFk" :options="itemTypesOptions" dense - outlined - rounded + filled use-input :disable="!selectedCategoryFk" @update:model-value=" @@ -235,8 +234,7 @@ const setCategoryList = (data) => { v-model="value.selectedTag" :options="tagOptions" dense - outlined - rounded + filled :emit-value="false" use-input :is-clearable="false" @@ -252,8 +250,7 @@ const setCategoryList = (data) => { option-value="value" option-label="value" dense - outlined - rounded + filled emit-value use-input :disable="!value" @@ -265,7 +262,6 @@ const setCategoryList = (data) => { v-model="value.value" :label="t('components.itemsFilterPanel.value')" :disable="!value" - is-outlined :is-clearable="false" @keyup.enter="applyTags(params, searchFn)" /> diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index dbb6f1fe6..7329ddae2 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -1,5 +1,5 @@