Merge branch 'test' into warmfix_8556_excludeDates
This commit is contained in:
commit
6fd247badd
|
@ -108,7 +108,6 @@ pipeline {
|
|||
}
|
||||
stage('E2E') {
|
||||
environment {
|
||||
CREDS = credentials('docker-registry')
|
||||
COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}"
|
||||
COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ."
|
||||
}
|
||||
|
@ -118,23 +117,24 @@ pipeline {
|
|||
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')
|
||||
|
||||
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} pull back"
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} pull db"
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} up -d"
|
||||
|
||||
def modules = sh(script: "node test/cypress/docker/find/find.js ${env.COMPOSE_TAG}", returnStdout: true).trim()
|
||||
def modules = sh(
|
||||
script: "node test/cypress/docker/find/find.js ${env.COMPOSE_TAG}",
|
||||
returnStdout: true
|
||||
).trim()
|
||||
echo "E2E MODULES: ${modules}"
|
||||
|
||||
script {
|
||||
def image = docker.build('lilium-dev', '-f docs/Dockerfile.dev docs')
|
||||
sh "docker compose ${env.COMPOSE_PARAMS} up -d"
|
||||
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ --init") {
|
||||
sh "sh test/cypress/docker/cypressParallel.sh 1 '${modules}'"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
sh "docker-compose ${env.COMPOSE_PARAMS} down -v"
|
||||
sh "docker compose ${env.COMPOSE_PARAMS} down -v"
|
||||
archiveArtifacts artifacts: 'test/cypress/screenshots/**/*', allowEmptyArchive: true
|
||||
junit(
|
||||
testResults: 'junit/e2e-*.xml',
|
||||
|
@ -153,17 +153,8 @@ pipeline {
|
|||
VERSION = readFile 'VERSION.txt'
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
sh 'quasar build'
|
||||
|
||||
def baseImage = "salix-frontend:${env.VERSION}"
|
||||
def image = docker.build(baseImage, ".")
|
||||
docker.withRegistry("https://${env.REGISTRY}", 'docker-registry') {
|
||||
image.push()
|
||||
image.push(env.BRANCH_NAME)
|
||||
if (IS_LATEST) image.push('latest')
|
||||
}
|
||||
}
|
||||
dockerBuild 'salix-frontend', '.'
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
|
@ -186,3 +177,53 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
def dockerBuild(imageName, context, dockerfile = null) {
|
||||
if (dockerfile == null)
|
||||
dockerfile = "${context}/Dockerfile"
|
||||
|
||||
def certDir = '/home/jenkins/.buildkit/certs'
|
||||
def buildxArgs = [
|
||||
"--name=buildkitd",
|
||||
"--driver=remote",
|
||||
"--driver-opt="
|
||||
+ "cacert=${certDir}/ca.pem,"
|
||||
+ "cert=${certDir}/cert.pem,"
|
||||
+ "key=${certDir}/key.pem,"
|
||||
+ "servername=buildkitd",
|
||||
"tcp://buildkitd:1234"
|
||||
]
|
||||
|
||||
def cacheImage = "${env.REGISTRY_CACHE}/${imageName}"
|
||||
def pushImage = "${env.REGISTRY}/${imageName}"
|
||||
def baseImage = "${pushImage}:${env.VERSION}"
|
||||
|
||||
def buildArgs = [
|
||||
context,
|
||||
"--push",
|
||||
"--builder=buildkitd",
|
||||
"--file=${dockerfile}",
|
||||
"--cache-from=type=registry,ref=${cacheImage}:cache-${env.BRANCH_NAME}",
|
||||
"--cache-from=type=registry,ref=${cacheImage}:cache-dev",
|
||||
"--cache-to=type=registry,ref=${cacheImage}:cache-${env.BRANCH_NAME},mode=max",
|
||||
"--tag=${pushImage}:${env.BRANCH_NAME}"
|
||||
]
|
||||
|
||||
def isLatest = ['master', 'main'].contains(env.BRANCH_NAME)
|
||||
if (isLatest)
|
||||
buildArgs.push("--tag=${pushImage}:latest")
|
||||
|
||||
// FIXME: Nested docker.withRegistry() does not work
|
||||
// https://issues.jenkins.io/browse/JENKINS-59777
|
||||
withCredentials([usernamePassword(
|
||||
credentialsId: 'registry-cache',
|
||||
usernameVariable: 'CACHE_USR',
|
||||
passwordVariable: 'CACHE_PSW')
|
||||
]) {
|
||||
docker.withRegistry("https://${env.REGISTRY}", 'docker-registry') {
|
||||
sh 'echo "$CACHE_PSW" | docker login --username "$CACHE_USR" --password-stdin "http://$REGISTRY_CACHE"'
|
||||
sh "docker buildx create ${buildxArgs.join(' ')}"
|
||||
docker.build(baseImage, buildArgs.join(' '))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,227 +0,0 @@
|
|||
/* eslint-disable */
|
||||
/**
|
||||
* THIS FILE IS GENERATED AUTOMATICALLY.
|
||||
* 1. DO NOT edit this file directly as it won't do anything.
|
||||
* 2. EDIT the original quasar.config file INSTEAD.
|
||||
* 3. DO NOT git commit this file. It should be ignored.
|
||||
*
|
||||
* This file is still here because there was an error in
|
||||
* the original quasar.config file and this allows you to
|
||||
* investigate the Node.js stack error.
|
||||
*
|
||||
* After you fix the original file, this file will be
|
||||
* deleted automatically.
|
||||
**/
|
||||
|
||||
|
||||
// quasar.config.js
|
||||
import { configure } from "quasar/wrappers";
|
||||
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
|
||||
import path from "path";
|
||||
var __quasar_inject_dirname__ = "/home/jsegarra/Projects/salix-front";
|
||||
var target = `http://${process.env.CI ? "back" : "localhost"}:3000`;
|
||||
var quasar_config_default = configure(function() {
|
||||
return {
|
||||
eslint: {
|
||||
// fix: true,
|
||||
// include = [],
|
||||
// exclude = [],
|
||||
// rawOptions = {},
|
||||
warnings: true,
|
||||
errors: true
|
||||
},
|
||||
// https://v2.quasar.dev/quasar-cli/prefetch-feature
|
||||
// preFetch: true,
|
||||
// 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", "quasar.defaults"],
|
||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
|
||||
css: ["app.scss"],
|
||||
// https://github.com/quasarframework/quasar/tree/dev/extras
|
||||
extras: [
|
||||
// 'ionicons-v4',
|
||||
// 'mdi-v5',
|
||||
// 'fontawesome-v6',
|
||||
// 'eva-icons',
|
||||
// 'themify',
|
||||
// 'line-awesome',
|
||||
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
||||
"roboto-font",
|
||||
"material-icons-outlined",
|
||||
"material-symbols-outlined"
|
||||
],
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||
build: {
|
||||
target: {
|
||||
browser: ["es2022", "edge88", "firefox78", "chrome87", "safari13.1"],
|
||||
node: "node20"
|
||||
},
|
||||
vueRouterMode: "hash",
|
||||
// available values: 'hash', 'history'
|
||||
// vueRouterBase,
|
||||
// vueDevtools,
|
||||
// vueOptionsAPI: false,
|
||||
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
|
||||
// publicPath: '/',
|
||||
// analyze: true,
|
||||
// env: {},
|
||||
rawDefine: {
|
||||
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV)
|
||||
},
|
||||
// ignorePublicFolder: true,
|
||||
// minify: false,
|
||||
// polyfillModulePreload: true,
|
||||
// distDir
|
||||
extendViteConf(viteConf) {
|
||||
delete viteConf.build.polyfillModulePreload;
|
||||
viteConf.build.modulePreload = {
|
||||
polyfill: false
|
||||
};
|
||||
},
|
||||
// viteVuePluginOptions: {},
|
||||
alias: {
|
||||
composables: path.join(__quasar_inject_dirname__, "./src/composables"),
|
||||
filters: path.join(__quasar_inject_dirname__, "./src/filters")
|
||||
},
|
||||
vitePlugins: [
|
||||
[
|
||||
VueI18nPlugin({
|
||||
strictMessage: false,
|
||||
runtimeOnly: false,
|
||||
include: [
|
||||
path.resolve(__quasar_inject_dirname__, "./src/i18n/locale/**"),
|
||||
path.resolve(__quasar_inject_dirname__, "./src/pages/**/locale/**")
|
||||
]
|
||||
})
|
||||
]
|
||||
]
|
||||
},
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#devServer
|
||||
devServer: {
|
||||
server: {
|
||||
type: "http"
|
||||
},
|
||||
proxy: {
|
||||
"/api": {
|
||||
target,
|
||||
logLevel: "debug",
|
||||
changeOrigin: true,
|
||||
secure: false
|
||||
}
|
||||
},
|
||||
open: false,
|
||||
allowedHosts: [
|
||||
"front",
|
||||
// Agrega este nombre de host
|
||||
"localhost"
|
||||
// Opcional, para pruebas locales
|
||||
]
|
||||
},
|
||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||
framework: {
|
||||
config: {
|
||||
config: {
|
||||
dark: "auto"
|
||||
}
|
||||
},
|
||||
lang: "en-GB",
|
||||
// iconSet: 'material-icons', // Quasar icon set
|
||||
// lang: 'en-US', // Quasar language pack
|
||||
// For special cases outside of where the auto-import strategy can have an impact
|
||||
// (like functional components as one of the examples),
|
||||
// you can manually specify Quasar components/directives to be available everywhere:
|
||||
//
|
||||
// components: [],
|
||||
// directives: [],
|
||||
// Quasar plugins
|
||||
plugins: ["Notify", "Dialog"],
|
||||
all: "auto",
|
||||
autoImportComponentCase: "pascal"
|
||||
},
|
||||
// animations: 'all', // --- includes all animations
|
||||
// https://v2.quasar.dev/options/animations
|
||||
animations: [],
|
||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#property-sourcefiles
|
||||
// sourceFiles: {
|
||||
// rootComponent: 'src/App.vue',
|
||||
// router: 'src/router/index',
|
||||
// store: 'src/store/index',
|
||||
// registerServiceWorker: 'src-pwa/register-service-worker',
|
||||
// serviceWorker: 'src-pwa/custom-service-worker',
|
||||
// pwaManifestFile: 'src-pwa/manifest.json',
|
||||
// electronMain: 'src-electron/electron-main',
|
||||
// electronPreload: 'src-electron/electron-preload'
|
||||
// },
|
||||
// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
|
||||
ssr: {
|
||||
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
|
||||
// will mess up SSR
|
||||
// extendSSRWebserverConf (esbuildConf) {},
|
||||
// extendPackageJson (json) {},
|
||||
pwa: false,
|
||||
// manualStoreHydration: true,
|
||||
// manualPostHydrationTrigger: true,
|
||||
prodPort: 3e3,
|
||||
// The default port that the production server should use
|
||||
// (gets superseded if process.env.PORT is specified at runtime)
|
||||
middlewares: [
|
||||
"render"
|
||||
// keep this as last one
|
||||
]
|
||||
},
|
||||
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
||||
pwa: {
|
||||
workboxMode: "generateSW",
|
||||
// or 'injectManifest'
|
||||
injectPwaMetaTags: true,
|
||||
swFilename: "sw.js",
|
||||
manifestFilename: "manifest.json",
|
||||
useCredentialsForManifestTag: false
|
||||
// useFilenameHashes: true,
|
||||
// extendGenerateSWOptions (cfg) {}
|
||||
// extendInjectManifestOptions (cfg) {},
|
||||
// extendManifestJson (json) {}
|
||||
// extendPWACustomSWConf (esbuildConf) {}
|
||||
},
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
|
||||
cordova: {
|
||||
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
|
||||
},
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
|
||||
capacitor: {
|
||||
hideSplashscreen: true
|
||||
},
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
|
||||
electron: {
|
||||
// extendElectronMainConf (esbuildConf)
|
||||
// extendElectronPreloadConf (esbuildConf)
|
||||
inspectPort: 5858,
|
||||
bundler: "packager",
|
||||
// 'packager' or 'builder'
|
||||
packager: {
|
||||
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
|
||||
// OS X / Mac App Store
|
||||
// appBundleId: '',
|
||||
// appCategoryType: '',
|
||||
// osxSign: '',
|
||||
// protocol: 'myapp://path',
|
||||
// Windows only
|
||||
// win32metadata: { ... }
|
||||
},
|
||||
builder: {
|
||||
// https://www.electron.build/configuration/configuration
|
||||
appId: "salix-frontend"
|
||||
}
|
||||
},
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
|
||||
bex: {
|
||||
contentScripts: ["my-content-script"]
|
||||
// extendBexScriptsConf (esbuildConf) {}
|
||||
// extendBexManifestJson (json) {}
|
||||
}
|
||||
};
|
||||
});
|
||||
export {
|
||||
quasar_config_default as default
|
||||
};
|
|
@ -102,6 +102,10 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
customMethod: {
|
||||
type: String,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(['onFetch', 'onDataSaved', 'submit']);
|
||||
const modelValue = computed(
|
||||
|
@ -237,7 +241,9 @@ async function save() {
|
|||
const url =
|
||||
$props.urlCreate || $props.urlUpdate || $props.url || arrayData.store.url;
|
||||
const response = await Promise.resolve(
|
||||
$props.saveFn ? $props.saveFn(body) : axios[method](url, body),
|
||||
$props.saveFn
|
||||
? $props.saveFn(body)
|
||||
: axios[$props.customMethod ?? method](url, body),
|
||||
);
|
||||
|
||||
if ($props.urlCreate) notify('globals.dataCreated', 'positive');
|
||||
|
|
|
@ -182,8 +182,8 @@ const col = computed(() => {
|
|||
if ($props.default && !newColumn.component) newColumn.component = $props.default;
|
||||
|
||||
if (typeof newColumn.component !== 'string') {
|
||||
newColumn.attrs = { ...newColumn.component.attrs, autofocus: $props.autofocus };
|
||||
newColumn.event = { ...newColumn.component.event, ...$props?.eventHandlers };
|
||||
newColumn.attrs = { ...newColumn.component?.attrs, autofocus: $props.autofocus };
|
||||
newColumn.event = { ...newColumn.component?.event, ...$props?.eventHandlers };
|
||||
}
|
||||
return newColumn;
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useRoute } from 'vue-router';
|
||||
import axios from 'axios';
|
||||
import { date } from 'quasar';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
@ -21,7 +21,6 @@ const stateStore = useStateStore();
|
|||
const validationsStore = useValidator();
|
||||
const { models } = validationsStore;
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
model: {
|
||||
|
@ -273,7 +272,7 @@ onUnmounted(() => {
|
|||
:data-key
|
||||
:url="dataKey + 's'"
|
||||
:user-filter="filter"
|
||||
:filter="{ where: { and: [{ originFk: route.params.id }] } }"
|
||||
:user-params="{ originFk: route.params.id }"
|
||||
:skeleton="false"
|
||||
auto-load
|
||||
@on-fetch="setLogTree"
|
||||
|
|
|
@ -313,6 +313,7 @@ export function useArrayData(key, userOptions) {
|
|||
const { params, limit } = getCurrentFilter();
|
||||
store.currentFilter = JSON.parse(JSON.stringify(params));
|
||||
delete store.currentFilter.filter.include;
|
||||
delete store.currentFilter.filter.fields;
|
||||
store.currentFilter.filter = JSON.stringify(store.currentFilter.filter);
|
||||
return { params, limit };
|
||||
}
|
||||
|
|
|
@ -896,6 +896,7 @@ components:
|
|||
rate3: Packing price
|
||||
minPrice: Min. Price
|
||||
itemFk: Item id
|
||||
date: Date
|
||||
userPanel:
|
||||
copyToken: Token copied to clipboard
|
||||
settings: Settings
|
||||
|
|
|
@ -980,6 +980,7 @@ components:
|
|||
rate3: Precio packing
|
||||
minPrice: Precio mínimo
|
||||
itemFk: Id item
|
||||
date: Fecha
|
||||
userPanel:
|
||||
copyToken: Token copiado al portapapeles
|
||||
settings: Configuración
|
||||
|
|
|
@ -80,7 +80,6 @@ function isRequired({ isTaxDataChecked: taxDataChecked }) {
|
|||
@on-data-saved="checkEtChanges"
|
||||
>
|
||||
<template #form="{ data, validate, validations }">
|
||||
{{ isTaxDataChecked }} {{ data.isTaxDataChecked }}
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('Social name')"
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<script setup>
|
||||
import { onMounted, ref, onUnmounted, computed, watch } from 'vue';
|
||||
import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useState } from 'src/composables/useState';
|
||||
|
||||
import { beforeSave } from 'src/composables/updateMinPriceBeforeSave';
|
||||
|
||||
import FetchedTags from 'components/ui/FetchedTags.vue';
|
||||
|
@ -14,13 +16,13 @@ import RightMenu from 'src/components/common/RightMenu.vue';
|
|||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnColor from 'src/components/common/VnColor.vue';
|
||||
|
||||
import { toDate } from 'src/filters';
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
import { isLower, isBigger } from 'src/filters/date.js';
|
||||
import ItemFixedPriceFilter from './ItemFixedPriceFilter.vue';
|
||||
import ItemDescriptorProxy from './Card/ItemDescriptorProxy.vue';
|
||||
import { toCurrency } from 'src/filters';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const quasar = useQuasar();
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const editFixedPriceForm = ref(null);
|
||||
|
@ -218,11 +220,36 @@ const dateStyle = (date) =>
|
|||
}
|
||||
: { color: dateColor, 'background-color': 'transparent' };
|
||||
|
||||
const onDataSaved = () => {
|
||||
tableRef.value.CrudModelRef.saveChanges();
|
||||
const onDataSaved = async (data) => {
|
||||
for (const row of data) {
|
||||
await axios.patch('FixedPrices/upsertFixedPrice', row);
|
||||
}
|
||||
selectedRows.value = [];
|
||||
tableRef.value.reload();
|
||||
tableRef.value.CrudModelRef.reset();
|
||||
};
|
||||
|
||||
async function saveData(data, getChanges) {
|
||||
const changes = getChanges();
|
||||
if (changes?.updates?.length) {
|
||||
for (const change of changes.updates) {
|
||||
const row = data.find((row) => row.id === change.where.id);
|
||||
await axios.patch('FixedPrices/upsertFixedPrice', row);
|
||||
}
|
||||
}
|
||||
|
||||
if (data?.deletes?.length) {
|
||||
for (const deleteItem of data.deletes) {
|
||||
await axios.delete(`FixedPrices/${deleteItem}`);
|
||||
quasar.notify({
|
||||
message: t('globals.dataDeleted'),
|
||||
color: 'positive',
|
||||
});
|
||||
}
|
||||
}
|
||||
tableRef.value.reload();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (tableRef.value) {
|
||||
tableRef.value.showForm = false;
|
||||
|
@ -273,7 +300,8 @@ watch(
|
|||
data-key="ItemFixedPrices"
|
||||
url="FixedPrices/filter"
|
||||
:order="'name DESC'"
|
||||
save-url="FixedPrices/crud"
|
||||
save-url="FixedPrices/upsertFixedPrice"
|
||||
:saveFn="saveData"
|
||||
:columns="columns"
|
||||
:is-editable="true"
|
||||
:right-search="false"
|
||||
|
@ -283,7 +311,8 @@ watch(
|
|||
}"
|
||||
v-model:selected="selectedRows"
|
||||
:create="{
|
||||
urlCreate: 'FixedPrices',
|
||||
urlCreate: 'FixedPrices/upsertFixedPrice',
|
||||
customMethod: 'patch',
|
||||
title: t('Create fixed price'),
|
||||
formInitialData: { warehouseFk: warehouse },
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
|
|
|
@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnSelect from 'components/common/VnSelect.vue';
|
||||
import VnCheckbox from 'src/components/common/VnCheckbox.vue';
|
||||
import ItemsFilterPanel from 'src/components/ItemsFilterPanel.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -51,42 +52,41 @@ const props = defineProps({
|
|||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QSeparator />
|
||||
<QItemSection>
|
||||
<QIcon name="info" size="sm" class="info-icon cursor-pointer">
|
||||
<QTooltip>{{ t('params.incompatibleFilters') }}</QTooltip>
|
||||
</QIcon>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.started"
|
||||
:label="t('params.started')"
|
||||
v-model="params.dated"
|
||||
:label="t('params.date')"
|
||||
filled
|
||||
@update:model-value="searchFn()"
|
||||
/>
|
||||
</QItemSection>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.ended"
|
||||
:label="t('params.ended')"
|
||||
filled
|
||||
@update:model-value="searchFn()"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
<VnCheckbox
|
||||
v-model="params.showBadDates"
|
||||
:label="t(`params.showBadDates`)"
|
||||
toggle-indeterminate
|
||||
@update:model-value="searchFn()"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</QItemSection>
|
||||
<QSeparator />
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnCheckbox
|
||||
:label="t('params.mine')"
|
||||
v-model="params.mine"
|
||||
toggle-indeterminate
|
||||
@update:model-value="searchFn()"
|
||||
/>
|
||||
|
||||
<QCheckbox
|
||||
v-model="params.showBadDates"
|
||||
:label="t(`params.showBadDates`)"
|
||||
toggle-indeterminate
|
||||
@update:model-value="searchFn()"
|
||||
>
|
||||
</QCheckbox>
|
||||
|
||||
<QCheckbox
|
||||
<VnCheckbox
|
||||
:label="t('params.hasMinPrice')"
|
||||
v-model="params.hasMinPrice"
|
||||
toggle-indeterminate
|
||||
|
@ -97,6 +97,13 @@ const props = defineProps({
|
|||
</template>
|
||||
</ItemsFilterPanel>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.info-icon {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 90%;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
|
@ -107,6 +114,8 @@ en:
|
|||
mine: Mine
|
||||
showBadDates: Show future items
|
||||
hasMinPrice: Has Min Price
|
||||
date: Date
|
||||
incompatibleFilters: Cannot select "Date" and "Show future items" at the same time
|
||||
es:
|
||||
params:
|
||||
buyerFk: Comprador
|
||||
|
@ -116,4 +125,6 @@ es:
|
|||
mine: Para mi
|
||||
showBadDates: Ver items a futuro
|
||||
hasMinPrice: Precio mínimo
|
||||
date: Fecha
|
||||
incompatibleFilters: No se puede seleccionar "Fecha" y "Ver items a futuro" a la vez
|
||||
</i18n>
|
||||
|
|
|
@ -26,7 +26,6 @@ const $props = defineProps({
|
|||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
const emit = defineEmits(['onDataSaved']);
|
||||
|
||||
|
@ -38,7 +37,7 @@ const inputs = {
|
|||
select: markRaw(VnSelect),
|
||||
};
|
||||
|
||||
const newValue = ref(null);
|
||||
const newFieldValue = ref(null);
|
||||
const selectedField = ref(null);
|
||||
const closeButton = ref(null);
|
||||
const isLoading = ref(false);
|
||||
|
@ -46,7 +45,11 @@ const isLoading = ref(false);
|
|||
const onSubmit = async () => {
|
||||
isLoading.value = true;
|
||||
$props.rows.forEach((row) => {
|
||||
row[selectedField.value.name] = newValue.value;
|
||||
const newValue =
|
||||
selectedField.value.component === 'number'
|
||||
? parseInt(newFieldValue.value)
|
||||
: newFieldValue.value;
|
||||
row[selectedField.value.name] = newValue;
|
||||
});
|
||||
emit('onDataSaved', $props.rows);
|
||||
closeForm();
|
||||
|
@ -77,11 +80,19 @@ const closeForm = () => {
|
|||
data-cy="EditFixedPriceSelectOption"
|
||||
@update:model-value="newValue = null"
|
||||
:class="{ 'is-select': selectedField?.component === 'select' }"
|
||||
/>
|
||||
>
|
||||
<template #option="{ opt, itemProps }">
|
||||
<QItem v-bind="itemProps" class="q-pa-xs row items-center">
|
||||
<QItemSection class="col-9 justify-center">
|
||||
<span>{{ opt?.label }}</span>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<component
|
||||
:is="inputs[selectedField?.component || 'input']"
|
||||
v-bind="selectedField?.attrs || {}"
|
||||
v-model="newValue"
|
||||
v-model="newFieldValue"
|
||||
:label="t('Value')"
|
||||
data-cy="EditFixedPriceValueOption"
|
||||
style="width: 200px"
|
||||
|
|
|
@ -46,6 +46,28 @@ const { openConfirmationModal } = useVnConfirm();
|
|||
:summary="$props.summary"
|
||||
:to-module="{ name: 'WorkerDepartment' }"
|
||||
data-key="Department"
|
||||
:filter="{
|
||||
include: [
|
||||
{
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
include: {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}"
|
||||
>
|
||||
<template #menu="{}">
|
||||
<QItem
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
version: '3.7'
|
||||
services:
|
||||
back:
|
||||
image: 'registry.verdnatura.es/salix-back:${COMPOSE_TAG:-dev}'
|
||||
|
|
|
@ -7,7 +7,7 @@ function checkSageFields(isRequired = false) {
|
|||
describe('Client fiscal data', () => {
|
||||
describe('#1008', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit('#/customer/1108/fiscal-data');
|
||||
});
|
||||
|
@ -27,12 +27,12 @@ describe('Client fiscal data', () => {
|
|||
});
|
||||
describe('#1007', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('developer');
|
||||
cy.visit('#/customer/1107/fiscal-data');
|
||||
});
|
||||
|
||||
it('check as equalizated', () => {
|
||||
it.skip('check as equalizated', () => {
|
||||
cy.dataCy('vnCheckboxIs equalizated').click();
|
||||
cy.get('.q-btn-group > .q-btn--standard > .q-btn__content').click();
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ describe('ZoneCalendar', { testIsolation: true }, () => {
|
|||
it('should exclude an event', () => {
|
||||
cy.get('.q-mb-sm > .q-radio__inner').click();
|
||||
cy.get('.q-current-day > .q-calendar-month__day--label__wrapper').click();
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
cy.get(submitBtn).click();
|
||||
cy.get(
|
||||
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
|
||||
).click();
|
||||
|
@ -48,19 +48,15 @@ describe('ZoneCalendar', { testIsolation: true }, () => {
|
|||
cy.dataCy('VnConfirm_confirm').click();
|
||||
});
|
||||
|
||||
it(
|
||||
'should not exclude an event if there are tickets for that zone and day',
|
||||
{ testIsoaltion: true },
|
||||
() => {
|
||||
cy.visit(`/#/zone/3/events`);
|
||||
cy.get('.q-mb-sm > .q-radio__inner').click();
|
||||
it('should not exclude an event if there are tickets for that zone and day', () => {
|
||||
cy.get('[data-cy="vn-searchbar_input"]').type('3{enter}');
|
||||
cy.get('[aria-label="Exclude"] > .q-radio__label').click();
|
||||
cy.get(
|
||||
'.q-current-day > .q-calendar-month__day--content > [data-cy="ZoneCalendarDay"]',
|
||||
).click();
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
cy.get(submitBtn).click();
|
||||
cy.checkNotification(
|
||||
'Can not close this zone because there are tickets programmed for that day',
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue