diff --git a/Jenkinsfile b/Jenkinsfile index 7d2957a1c..7cad5ef41 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') { @@ -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 } - sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}" + withKubeConfig([ + serverUrl: "$KUBERNETES_API", + credentialsId: 'kubernetes', + namespace: 'lilium' + ]) { + sh 'kubectl set image deployment/lilium-$BRANCH_NAME lilium-$BRANCH_NAME=$REGISTRY/salix-frontend:$VERSION' + } } } } 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 38a1d06a3..742fbf276 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salix-front", - "version": "24.24.0", + "version": "24.24.1", "description": "Salix frontend", "productName": "Salix", "author": "Verdnatura", diff --git a/src/components/CreateManualInvoiceForm.vue b/src/components/CreateManualInvoiceForm.vue index f3d4de605..92399c20c 100644 --- a/src/components/CreateManualInvoiceForm.vue +++ b/src/components/CreateManualInvoiceForm.vue @@ -48,7 +48,11 @@ const onDataSaved = async (formData, requestResponse) => { /> diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue index d8cd25033..c8a9a97b7 100644 --- a/src/components/VnTable/VnColumn.vue +++ b/src/components/VnTable/VnColumn.vue @@ -53,7 +53,9 @@ const defaultComponents = { date: { component: markRaw(VnInputDate), attrs: { + readonly: true, disable: !$props.isEditable, + style: 'min-width: 125px', }, }, checkbox: { diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index ba573f612..d572b8be0 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -40,6 +40,7 @@ const components = { class: 'q-px-sm q-pb-xs q-pt-none', dense: true, filled: !$props.showTitle, + clearable: true, }, forceAttrs: { label: $props.showTitle ? '' : $props.column.label, @@ -50,7 +51,12 @@ const components = { event: enterEvent, attrs: { dense: true, - class: 'q-px-md q-pb-xs q-pt-none', + class: 'q-px-sm q-pb-xs q-pt-none', + clearable: true, + filled: !$props.showTitle, + }, + forceAttrs: { + label: $props.showTitle ? '' : $props.column.label, }, }, date: { @@ -58,7 +64,12 @@ const components = { event: updateEvent, attrs: { dense: true, - class: 'q-px-md q-pb-xs q-pt-none', + class: 'q-px-sm q-pb-xs q-pt-none', + filled: !$props.showTitle, + style: 'min-width: 150px', + }, + forceAttrs: { + label: $props.showTitle ? '' : $props.column.label, }, }, checkbox: { @@ -94,8 +105,8 @@ async function addFilter(value) { let params = { [field]: value }; if (columnFilter.value?.inWhere) { - if (columnFilter.value.prefix) field = columnFilter.value.prefix + '.' + field; - params = { filter: { where: params } }; + if (columnFilter.value.alias) field = columnFilter.value.alias + '.' + field; + return await arrayData.addFilterWhere(params); } await arrayData.addFilter({ params }); } diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 044444c44..7488f0db9 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -130,6 +130,13 @@ function reload() { VnPaginateRef.value.fetch(); } +function columnName(col) { + const column = Object.assign({}, col, col.columnFilter); + let name = column.name; + if (column.alias) name = column.alias + '.' + name; + return name; +} + defineExpose({ reload, redirect: redirectFn, @@ -156,7 +163,7 @@ defineExpose({ :data-key="$attrs['data-key']" v-for="col of splittedColumns.columns" :key="col.id" - v-model="params[col.columnFilter?.name ?? col.name]" + v-model="params[columnName(col)]" /> @@ -243,7 +250,11 @@ defineExpose({ diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index fe0866292..3c1a12f24 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -97,7 +97,7 @@ const styleAttrs = computed(() => { diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index 4bd75eeaf..0b271dee7 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -2,6 +2,7 @@ import { computed, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import isValidDate from 'filters/isValidDate'; +import VnInput from 'components/common/VnInput.vue'; const props = defineProps({ modelValue: { @@ -74,7 +75,7 @@ const styleAttrs = computed(() => { @click="isPopupOpen = true" >