8714-devToTest #1547
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
def PROTECTED_BRANCH
|
def PROTECTED_BRANCH
|
||||||
|
def IS_LATEST
|
||||||
|
|
||||||
def BRANCH_ENV = [
|
def BRANCH_ENV = [
|
||||||
test: 'test',
|
test: 'test',
|
||||||
|
@ -10,19 +11,22 @@ def BRANCH_ENV = [
|
||||||
|
|
||||||
node {
|
node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
env.FRONT_REPLICAS = 1
|
|
||||||
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
env.NODE_ENV = BRANCH_ENV[env.BRANCH_NAME] ?: 'dev'
|
||||||
|
|
||||||
PROTECTED_BRANCH = [
|
PROTECTED_BRANCH = [
|
||||||
'dev',
|
'dev',
|
||||||
'test',
|
'test',
|
||||||
'master',
|
'master',
|
||||||
|
'main',
|
||||||
'beta'
|
'beta'
|
||||||
].contains(env.BRANCH_NAME)
|
]
|
||||||
|
|
||||||
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
IS_PROTECTED_BRANCH = PROTECTED_BRANCH.contains(env.BRANCH_NAME)
|
||||||
|
IS_LATEST = ['master', 'main'].contains(env.BRANCH_NAME)
|
||||||
|
|
||||||
|
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
||||||
echo "NODE_NAME: ${env.NODE_NAME}"
|
echo "NODE_NAME: ${env.NODE_NAME}"
|
||||||
echo "WORKSPACE: ${env.WORKSPACE}"
|
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||||
|
echo "CHANGE_TARGET: ${env.CHANGE_TARGET}"
|
||||||
|
|
||||||
configFileProvider([
|
configFileProvider([
|
||||||
configFile(fileId: 'salix-front.properties',
|
configFile(fileId: 'salix-front.properties',
|
||||||
|
@ -33,7 +37,7 @@ node {
|
||||||
props.each {key, value -> echo "${key}: ${value}" }
|
props.each {key, value -> echo "${key}: ${value}" }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PROTECTED_BRANCH) {
|
if (IS_PROTECTED_BRANCH) {
|
||||||
configFileProvider([
|
configFileProvider([
|
||||||
configFile(fileId: "salix-front.branch.${env.BRANCH_NAME}",
|
configFile(fileId: "salix-front.branch.${env.BRANCH_NAME}",
|
||||||
variable: 'BRANCH_PROPS_FILE')
|
variable: 'BRANCH_PROPS_FILE')
|
||||||
|
@ -58,6 +62,19 @@ pipeline {
|
||||||
PROJECT_NAME = 'lilium'
|
PROJECT_NAME = 'lilium'
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage('Version') {
|
||||||
|
when {
|
||||||
|
expression { IS_PROTECTED_BRANCH }
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
def packageJson = readJSON file: 'package.json'
|
||||||
|
def version = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
|
writeFile(file: 'VERSION.txt', text: version)
|
||||||
|
echo "VERSION: ${version}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Install') {
|
stage('Install') {
|
||||||
environment {
|
environment {
|
||||||
NODE_ENV = ""
|
NODE_ENV = ""
|
||||||
|
@ -68,48 +85,85 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
when {
|
when {
|
||||||
expression { !PROTECTED_BRANCH }
|
expression { !IS_PROTECTED_BRANCH }
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
NODE_ENV = ""
|
NODE_ENV = ''
|
||||||
|
CI = 'true'
|
||||||
|
TZ = 'Europe/Madrid'
|
||||||
}
|
}
|
||||||
steps {
|
parallel {
|
||||||
sh 'pnpm run test:unit:ci'
|
stage('Unit') {
|
||||||
}
|
steps {
|
||||||
post {
|
sh 'pnpm run test:front:ci'
|
||||||
always {
|
}
|
||||||
junit(
|
post {
|
||||||
testResults: 'junitresults.xml',
|
always {
|
||||||
allowEmptyResults: true
|
junit(
|
||||||
)
|
testResults: 'junit/vitest.xml',
|
||||||
|
allowEmptyResults: true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('E2E') {
|
||||||
|
environment {
|
||||||
|
CREDENTIALS = credentials('docker-registry')
|
||||||
|
COMPOSE_PROJECT = "${PROJECT_NAME}-${env.BUILD_ID}"
|
||||||
|
COMPOSE_PARAMS = "-p ${env.COMPOSE_PROJECT} -f test/cypress/docker-compose.yml --project-directory ."
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sh 'rm junit/e2e-*.xml || true'
|
||||||
|
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-compose ${env.COMPOSE_PARAMS} up -d"
|
||||||
|
image.inside("--network ${env.COMPOSE_PROJECT}_default -e CI -e TZ") {
|
||||||
|
sh 'cypress run --browser chromium || true'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
sh "docker-compose ${env.COMPOSE_PARAMS} down -v"
|
||||||
|
junit(
|
||||||
|
testResults: 'junit/e2e-*.xml',
|
||||||
|
allowEmptyResults: true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
when {
|
when {
|
||||||
expression { PROTECTED_BRANCH }
|
expression { IS_PROTECTED_BRANCH }
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
CREDENTIALS = credentials('docker-registry')
|
VERSION = readFile 'VERSION.txt'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'quasar build'
|
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
sh 'quasar build'
|
||||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
|
||||||
|
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()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
when {
|
when {
|
||||||
expression { PROTECTED_BRANCH }
|
expression { IS_PROTECTED_BRANCH }
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
VERSION = readFile 'VERSION.txt'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
|
||||||
def packageJson = readJSON file: 'package.json'
|
|
||||||
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
|
||||||
}
|
|
||||||
withKubeConfig([
|
withKubeConfig([
|
||||||
serverUrl: "$KUBERNETES_API",
|
serverUrl: "$KUBERNETES_API",
|
||||||
credentialsId: 'kubernetes',
|
credentialsId: 'kubernetes',
|
||||||
|
|
|
@ -23,7 +23,7 @@ quasar dev
|
||||||
### Run unit tests
|
### Run unit tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pnpm run test:unit
|
pnpm run test:front
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run e2e tests
|
### Run e2e tests
|
||||||
|
|
|
@ -1,12 +1,37 @@
|
||||||
import { defineConfig } from 'cypress';
|
import { defineConfig } from 'cypress';
|
||||||
// https://docs.cypress.io/app/tooling/reporters
|
|
||||||
// https://docs.cypress.io/app/references/configuration
|
let urlHost, reporter, reporterOptions;
|
||||||
// https://www.npmjs.com/package/cypress-mochawesome-reporter
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
urlHost = 'front';
|
||||||
|
reporter = 'junit';
|
||||||
|
reporterOptions = {
|
||||||
|
mochaFile: 'junit/e2e-[hash].xml',
|
||||||
|
toConsole: false,
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
urlHost = 'localhost';
|
||||||
|
reporter = 'cypress-mochawesome-reporter';
|
||||||
|
reporterOptions = {
|
||||||
|
charts: true,
|
||||||
|
reportPageTitle: 'Cypress Inline Reporter',
|
||||||
|
reportFilename: '[status]_[datetime]-report',
|
||||||
|
embeddedScreenshots: true,
|
||||||
|
reportDir: 'test/cypress/reports',
|
||||||
|
inlineAssets: true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
e2e: {
|
e2e: {
|
||||||
baseUrl: 'http://localhost:9000/',
|
baseUrl: `http://${urlHost}:9000`,
|
||||||
experimentalStudio: true,
|
experimentalStudio: false,
|
||||||
|
defaultCommandTimeout: 10000,
|
||||||
|
trashAssetsBeforeRuns: false,
|
||||||
|
requestTimeout: 10000,
|
||||||
|
responseTimeout: 30000,
|
||||||
|
pageLoadTimeout: 60000,
|
||||||
|
defaultBrowser: 'chromium',
|
||||||
fixturesFolder: 'test/cypress/fixtures',
|
fixturesFolder: 'test/cypress/fixtures',
|
||||||
screenshotsFolder: 'test/cypress/screenshots',
|
screenshotsFolder: 'test/cypress/screenshots',
|
||||||
supportFile: 'test/cypress/support/index.js',
|
supportFile: 'test/cypress/support/index.js',
|
||||||
|
@ -14,29 +39,19 @@ export default defineConfig({
|
||||||
downloadsFolder: 'test/cypress/downloads',
|
downloadsFolder: 'test/cypress/downloads',
|
||||||
video: false,
|
video: false,
|
||||||
specPattern: 'test/cypress/integration/**/*.spec.js',
|
specPattern: 'test/cypress/integration/**/*.spec.js',
|
||||||
experimentalRunAllSpecs: false,
|
experimentalRunAllSpecs: true,
|
||||||
watchForFileChanges: false,
|
watchForFileChanges: true,
|
||||||
reporter: 'cypress-mochawesome-reporter',
|
reporter,
|
||||||
reporterOptions: {
|
reporterOptions,
|
||||||
charts: true,
|
|
||||||
reportPageTitle: 'Cypress Inline Reporter',
|
|
||||||
reportFilename: '[status]_[datetime]-report',
|
|
||||||
embeddedScreenshots: true,
|
|
||||||
reportDir: 'test/cypress/reports',
|
|
||||||
inlineAssets: true,
|
|
||||||
},
|
|
||||||
component: {
|
component: {
|
||||||
componentFolder: 'src',
|
componentFolder: 'src',
|
||||||
testFiles: '**/*.spec.js',
|
testFiles: '**/*.spec.js',
|
||||||
supportFile: 'test/cypress/support/unit.js',
|
supportFile: 'test/cypress/support/unit.js',
|
||||||
},
|
},
|
||||||
setupNodeEvents: async (on, config) => {
|
|
||||||
const plugin = await import('cypress-mochawesome-reporter/plugin');
|
|
||||||
plugin.default(on);
|
|
||||||
|
|
||||||
return config;
|
|
||||||
},
|
|
||||||
viewportWidth: 1280,
|
viewportWidth: 1280,
|
||||||
viewportHeight: 720,
|
viewportHeight: 720,
|
||||||
},
|
},
|
||||||
|
experimentalMemoryManagement: true,
|
||||||
|
defaultCommandTimeout: 10000,
|
||||||
|
numTestsKeptInMemory: 2,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: '3.7'
|
|
||||||
services:
|
|
||||||
main:
|
|
||||||
image: registry.verdnatura.es/salix-frontend:${VERSION:?}
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: ./Dockerfile
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
FROM debian:12.9-slim
|
||||||
|
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg2 \
|
||||||
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y --no-install-recommends nodejs \
|
||||||
|
&& npm install -g corepack@0.31.0 \
|
||||||
|
&& corepack enable pnpm \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y --no-install-recommends install \
|
||||||
|
apt-utils \
|
||||||
|
chromium \
|
||||||
|
libasound2 \
|
||||||
|
libgbm-dev \
|
||||||
|
libgtk-3-0 \
|
||||||
|
libgtk2.0-0 \
|
||||||
|
libnotify-dev \
|
||||||
|
libnss3 \
|
||||||
|
libxss1 \
|
||||||
|
libxtst6 \
|
||||||
|
xauth \
|
||||||
|
xvfb \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN groupadd -r -g 1000 app \
|
||||||
|
&& useradd -r -u 1000 -g app -m -d /home/app app
|
||||||
|
USER app
|
||||||
|
|
||||||
|
ENV SHELL=bash
|
||||||
|
ENV PNPM_HOME="/home/app/.local/share/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
|
||||||
|
RUN pnpm setup \
|
||||||
|
&& pnpm install --global cypress@13.6.6 \
|
||||||
|
&& cypress install
|
||||||
|
|
||||||
|
WORKDIR /app
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "25.08.0",
|
"version": "25.10.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
@ -14,8 +14,8 @@
|
||||||
"test:e2e": "cypress open",
|
"test:e2e": "cypress open",
|
||||||
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
"test:e2e:ci": "npm run resetDatabase && cd ../salix-front && cypress run",
|
||||||
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
"test": "echo \"See package.json => scripts for available tests.\" && exit 0",
|
||||||
"test:unit": "vitest",
|
"test:front": "vitest",
|
||||||
"test:unit:ci": "vitest run",
|
"test:front:ci": "vitest run",
|
||||||
"commitlint": "commitlint --edit",
|
"commitlint": "commitlint --edit",
|
||||||
"prepare": "npx husky install",
|
"prepare": "npx husky install",
|
||||||
"addReferenceTag": "node .husky/addReferenceTag.js",
|
"addReferenceTag": "node .husky/addReferenceTag.js",
|
||||||
|
@ -71,4 +71,4 @@
|
||||||
"vite": "^6.0.11",
|
"vite": "^6.0.11",
|
||||||
"vitest": "^0.31.1"
|
"vitest": "^0.31.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: '/api',
|
path: '/api',
|
||||||
rule: { target: 'http://0.0.0.0:3000' },
|
rule: { target: 'http://127.0.0.1:3000' },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
import { configure } from 'quasar/wrappers';
|
import { configure } from 'quasar/wrappers';
|
||||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
const target = `http://${process.env.CI ? 'back' : 'localhost'}:3000`;
|
||||||
|
|
||||||
export default configure(function (/* ctx */) {
|
export default configure(function (/* ctx */) {
|
||||||
return {
|
return {
|
||||||
|
@ -108,13 +109,17 @@ export default configure(function (/* ctx */) {
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://0.0.0.0:3000',
|
target: target,
|
||||||
logLevel: 'debug',
|
logLevel: 'debug',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
open: 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
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework
|
||||||
|
|
|
@ -12,6 +12,7 @@ import SkeletonForm from 'components/ui/SkeletonForm.vue';
|
||||||
import VnConfirm from './ui/VnConfirm.vue';
|
import VnConfirm from './ui/VnConfirm.vue';
|
||||||
import { tMobile } from 'src/composables/tMobile';
|
import { tMobile } from 'src/composables/tMobile';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
|
import { getDifferences, getUpdatedValues } from 'src/filters';
|
||||||
|
|
||||||
const { push } = useRouter();
|
const { push } = useRouter();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
@ -288,7 +289,12 @@ function trimData(data) {
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
function onBeforeSave(formData, originalData) {
|
||||||
|
return getUpdatedValues(
|
||||||
|
Object.keys(getDifferences(formData, originalData)),
|
||||||
|
formData,
|
||||||
|
);
|
||||||
|
}
|
||||||
async function onKeyup(evt) {
|
async function onKeyup(evt) {
|
||||||
if (evt.key === 'Enter' && !('prevent-submit' in attrs)) {
|
if (evt.key === 'Enter' && !('prevent-submit' in attrs)) {
|
||||||
const input = evt.target;
|
const input = evt.target;
|
||||||
|
@ -325,6 +331,7 @@ defineExpose({
|
||||||
class="q-pa-md"
|
class="q-pa-md"
|
||||||
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
||||||
id="formModel"
|
id="formModel"
|
||||||
|
:mapper="onBeforeSave"
|
||||||
>
|
>
|
||||||
<QCard>
|
<QCard>
|
||||||
<slot
|
<slot
|
||||||
|
|
|
@ -85,7 +85,15 @@ const refresh = () => window.location.reload();
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
<PinnedModules ref="pinnedModulesRef" />
|
<PinnedModules ref="pinnedModulesRef" />
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn class="q-pa-none" rounded dense flat no-wrap id="user">
|
<QBtn
|
||||||
|
class="q-pa-none"
|
||||||
|
rounded
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
no-wrap
|
||||||
|
id="user"
|
||||||
|
data-cy="userPanel_btn"
|
||||||
|
>
|
||||||
<VnAvatar
|
<VnAvatar
|
||||||
:worker-id="user.id"
|
:worker-id="user.id"
|
||||||
:title="user.name"
|
:title="user.name"
|
||||||
|
|
|
@ -51,10 +51,6 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
rightSearchIcon: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
rowClick: {
|
rowClick: {
|
||||||
type: [Function, Boolean],
|
type: [Function, Boolean],
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -689,6 +685,7 @@ const rowCtrlClickFunction = computed(() => {
|
||||||
@update:selected="emit('update:selected', $event)"
|
@update:selected="emit('update:selected', $event)"
|
||||||
@selection="(details) => handleSelection(details, rows)"
|
@selection="(details) => handleSelection(details, rows)"
|
||||||
:hide-selected-banner="true"
|
:hide-selected-banner="true"
|
||||||
|
:data-cy="$props.dataCy ?? 'vnTable'"
|
||||||
>
|
>
|
||||||
<template #top-left v-if="!$props.withoutHeader">
|
<template #top-left v-if="!$props.withoutHeader">
|
||||||
<slot name="top-left"> </slot>
|
<slot name="top-left"> </slot>
|
||||||
|
@ -948,6 +945,7 @@ const rowCtrlClickFunction = computed(() => {
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="btn.title"
|
:title="btn.title"
|
||||||
:icon="btn.icon"
|
:icon="btn.icon"
|
||||||
|
data-cy="cardBtn"
|
||||||
class="q-pa-xs"
|
class="q-pa-xs"
|
||||||
:class="
|
:class="
|
||||||
btn.isPrimary
|
btn.isPrimary
|
||||||
|
|
|
@ -107,6 +107,7 @@ const manageDate = (date) => {
|
||||||
@click="isPopupOpen = !isPopupOpen"
|
@click="isPopupOpen = !isPopupOpen"
|
||||||
@keydown="isPopupOpen = false"
|
@keydown="isPopupOpen = false"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
|
:data-cy="$attrs.dataCy ?? $attrs.label + '_inputDate'"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon
|
<QIcon
|
||||||
|
|
|
@ -641,15 +641,7 @@ watch(
|
||||||
>
|
>
|
||||||
{{ prop.nameI18n }}:
|
{{ prop.nameI18n }}:
|
||||||
</span>
|
</span>
|
||||||
<VnJsonValue :value="prop.val.val" />
|
|
||||||
<span
|
|
||||||
v-if="prop.val.id"
|
|
||||||
class="id-value"
|
|
||||||
>
|
|
||||||
#{{ prop.val.id }}
|
|
||||||
</span>
|
|
||||||
<span v-if="log.action == 'update'">
|
<span v-if="log.action == 'update'">
|
||||||
←
|
|
||||||
<VnJsonValue
|
<VnJsonValue
|
||||||
:value="prop.old.val"
|
:value="prop.old.val"
|
||||||
/>
|
/>
|
||||||
|
@ -659,6 +651,26 @@ watch(
|
||||||
>
|
>
|
||||||
#{{ prop.old.id }}
|
#{{ prop.old.id }}
|
||||||
</span>
|
</span>
|
||||||
|
→
|
||||||
|
<VnJsonValue
|
||||||
|
:value="prop.val.val"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
v-if="prop.val.id"
|
||||||
|
class="id-value"
|
||||||
|
>
|
||||||
|
#{{ prop.val.id }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span v-else="prop.old.val">
|
||||||
|
<VnJsonValue
|
||||||
|
:value="prop.val.val"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
v-if="prop.old.id"
|
||||||
|
class="id-value"
|
||||||
|
>#{{ prop.old.id }}</span
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -225,7 +225,7 @@ const toModule = computed(() =>
|
||||||
<div class="icons">
|
<div class="icons">
|
||||||
<slot name="icons" :entity="entity" />
|
<slot name="icons" :entity="entity" />
|
||||||
</div>
|
</div>
|
||||||
<div class="actions justify-center">
|
<div class="actions justify-center" data-cy="descriptor_actions">
|
||||||
<slot name="actions" :entity="entity" />
|
<slot name="actions" :entity="entity" />
|
||||||
</div>
|
</div>
|
||||||
<slot name="after" />
|
<slot name="after" />
|
||||||
|
|
|
@ -335,3 +335,7 @@ input::-webkit-inner-spin-button {
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
box-shadow: 0 4px 6px #00000000;
|
box-shadow: 0 4px 6px #00000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.containerShrinked {
|
||||||
|
width: 80%;
|
||||||
|
}
|
||||||
|
|
|
@ -790,7 +790,7 @@ worker:
|
||||||
notes: Notas
|
notes: Notas
|
||||||
operator:
|
operator:
|
||||||
numberOfWagons: Número de vagones
|
numberOfWagons: Número de vagones
|
||||||
train: tren
|
train: Tren
|
||||||
itemPackingType: Tipo de embalaje
|
itemPackingType: Tipo de embalaje
|
||||||
warehouse: Almacén
|
warehouse: Almacén
|
||||||
sector: Sector
|
sector: Sector
|
||||||
|
|
|
@ -27,6 +27,7 @@ const claimActionsForm = ref();
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const destinationTypes = ref([]);
|
const destinationTypes = ref([]);
|
||||||
|
const shelvings = ref([]);
|
||||||
const totalClaimed = ref(null);
|
const totalClaimed = ref(null);
|
||||||
const DEFAULT_MAX_RESPONSABILITY = 5;
|
const DEFAULT_MAX_RESPONSABILITY = 5;
|
||||||
const DEFAULT_MIN_RESPONSABILITY = 1;
|
const DEFAULT_MIN_RESPONSABILITY = 1;
|
||||||
|
@ -56,6 +57,12 @@ const columns = computed(() => [
|
||||||
field: (row) => row.claimDestinationFk,
|
field: (row) => row.claimDestinationFk,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'shelving',
|
||||||
|
label: t('shelvings.shelving'),
|
||||||
|
field: (row) => row.shelvingFk,
|
||||||
|
align: 'left',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Landed',
|
name: 'Landed',
|
||||||
label: t('Landed'),
|
label: t('Landed'),
|
||||||
|
@ -125,6 +132,10 @@ async function updateDestination(claimDestinationFk, row, options = {}) {
|
||||||
options.reload && claimActionsForm.value.reload();
|
options.reload && claimActionsForm.value.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
async function updateShelving(shelvingFk, row) {
|
||||||
|
await axios.patch(`ClaimEnds/${row.id}`, { shelvingFk });
|
||||||
|
claimActionsForm.value.reload();
|
||||||
|
}
|
||||||
|
|
||||||
async function regularizeClaim() {
|
async function regularizeClaim() {
|
||||||
await post(`Claims/${claimId}/regularizeClaim`);
|
await post(`Claims/${claimId}/regularizeClaim`);
|
||||||
|
@ -200,6 +211,7 @@ async function post(query, params) {
|
||||||
auto-load
|
auto-load
|
||||||
@on-fetch="(data) => (destinationTypes = data)"
|
@on-fetch="(data) => (destinationTypes = data)"
|
||||||
/>
|
/>
|
||||||
|
<FetchData url="Shelvings" auto-load @on-fetch="(data) => (shelvings = data)" />
|
||||||
<RightMenu v-if="claim">
|
<RightMenu v-if="claim">
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
<QCard class="totalClaim q-my-md q-pa-sm no-box-shadow">
|
<QCard class="totalClaim q-my-md q-pa-sm no-box-shadow">
|
||||||
|
@ -312,6 +324,20 @@ async function post(query, params) {
|
||||||
/>
|
/>
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
|
<template #body-cell-shelving="{ row }">
|
||||||
|
<QTd>
|
||||||
|
<VnSelect
|
||||||
|
v-model="row.shelvingFk"
|
||||||
|
:options="shelvings"
|
||||||
|
option-label="code"
|
||||||
|
option-value="id"
|
||||||
|
style="width: 100px"
|
||||||
|
hide-selected
|
||||||
|
@update:model-value="(value) => updateShelving(value, row)"
|
||||||
|
/>
|
||||||
|
</QTd>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #body-cell-price="{ value }">
|
<template #body-cell-price="{ value }">
|
||||||
<QTd align="center">
|
<QTd align="center">
|
||||||
{{ toCurrency(value) }}
|
{{ toCurrency(value) }}
|
||||||
|
@ -354,7 +380,7 @@ async function post(query, params) {
|
||||||
(value) =>
|
(value) =>
|
||||||
updateDestination(
|
updateDestination(
|
||||||
value,
|
value,
|
||||||
props.row
|
props.row,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
|
@ -371,6 +397,17 @@ async function post(query, params) {
|
||||||
</QTable>
|
</QTable>
|
||||||
</template>
|
</template>
|
||||||
<template #moreBeforeActions>
|
<template #moreBeforeActions>
|
||||||
|
<QBtn
|
||||||
|
color="primary"
|
||||||
|
text-color="white"
|
||||||
|
:unelevated="true"
|
||||||
|
:label="tMobile('Import claim')"
|
||||||
|
:title="t('Import claim')"
|
||||||
|
icon="Download"
|
||||||
|
@click="importToNewRefundTicket"
|
||||||
|
:disable="claim.claimStateFk == resolvedStateId"
|
||||||
|
:loading="loading"
|
||||||
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
|
@ -394,17 +431,6 @@ async function post(query, params) {
|
||||||
@click="dialogDestination = !dialogDestination"
|
@click="dialogDestination = !dialogDestination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
|
||||||
color="primary"
|
|
||||||
text-color="white"
|
|
||||||
:unelevated="true"
|
|
||||||
:label="tMobile('Import claim')"
|
|
||||||
:title="t('Import claim')"
|
|
||||||
icon="Upload"
|
|
||||||
@click="importToNewRefundTicket"
|
|
||||||
:disable="claim.claimStateFk == resolvedStateId"
|
|
||||||
:loading="loading"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QDialog v-model="dialogDestination">
|
<QDialog v-model="dialogDestination">
|
||||||
|
|
|
@ -40,7 +40,7 @@ const workersOptions = ref([]);
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('claim.assignedTo')"
|
:label="t('claim.attendedBy')"
|
||||||
v-model="data.workerFk"
|
v-model="data.workerFk"
|
||||||
:options="workersOptions"
|
:options="workersOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
|
|
@ -233,20 +233,27 @@ function claimUrl(section) {
|
||||||
<ClaimDescriptorMenu :claim="entity.claim" />
|
<ClaimDescriptorMenu :claim="entity.claim" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
<template #body="{ entity: { claim, salesClaimed, developments } }">
|
||||||
<QCard class="vn-one" v-if="$route.name != 'ClaimSummary'">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="claimUrl('basic-data')"
|
:url="claimUrl('basic-data')"
|
||||||
:text="t('globals.pageTitles.basicData')"
|
:text="t('globals.pageTitles.basicData')"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('claim.created')" :value="toDate(claim.created)" />
|
<VnLv
|
||||||
<VnLv :label="t('claim.state')">
|
v-if="$route.name != 'ClaimSummary'"
|
||||||
|
:label="t('claim.created')"
|
||||||
|
:value="toDate(claim.created)"
|
||||||
|
/>
|
||||||
|
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.state')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<QChip :color="stateColor(claim.claimState.code)" dense>
|
<QChip :color="stateColor(claim.claimState.code)" dense>
|
||||||
{{ claim.claimState.description }}
|
{{ claim.claimState.description }}
|
||||||
</QChip>
|
</QChip>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('globals.salesPerson')">
|
<VnLv
|
||||||
|
v-if="$route.name != 'ClaimSummary'"
|
||||||
|
:label="t('globals.salesPerson')"
|
||||||
|
>
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<VnUserLink
|
||||||
:name="claim.client?.salesPersonUser?.name"
|
:name="claim.client?.salesPersonUser?.name"
|
||||||
|
@ -254,7 +261,7 @@ function claimUrl(section) {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('claim.attendedBy')">
|
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.attendedBy')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<VnUserLink
|
<VnUserLink
|
||||||
:name="claim.worker?.user?.nickname"
|
:name="claim.worker?.user?.nickname"
|
||||||
|
@ -262,7 +269,7 @@ function claimUrl(section) {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('claim.customer')">
|
<VnLv v-if="$route.name != 'ClaimSummary'" :label="t('claim.customer')">
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="link cursor-pointer">
|
<span class="link cursor-pointer">
|
||||||
{{ claim.client?.name }}
|
{{ claim.client?.name }}
|
||||||
|
@ -274,6 +281,11 @@ function claimUrl(section) {
|
||||||
:label="t('claim.pickup')"
|
:label="t('claim.pickup')"
|
||||||
:value="`${dashIfEmpty(claim.pickup)}`"
|
:value="`${dashIfEmpty(claim.pickup)}`"
|
||||||
/>
|
/>
|
||||||
|
<VnLv
|
||||||
|
:label="t('globals.packages')"
|
||||||
|
:value="`${dashIfEmpty(claim.packages)}`"
|
||||||
|
:translation="(value) => t(`claim.packages`)"
|
||||||
|
/>
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-two">
|
<QCard class="vn-two">
|
||||||
<VnTitle :url="claimUrl('notes')" :text="t('claim.notes')" />
|
<VnTitle :url="claimUrl('notes')" :text="t('claim.notes')" />
|
||||||
|
|
|
@ -19,30 +19,36 @@ const columns = [
|
||||||
name: 'itemFk',
|
name: 'itemFk',
|
||||||
label: t('Id item'),
|
label: t('Id item'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'ticketFk',
|
name: 'ticketFk',
|
||||||
label: t('Ticket'),
|
label: t('Ticket'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'claimDestinationFk',
|
name: 'claimDestinationFk',
|
||||||
label: t('Destination'),
|
label: t('Destination'),
|
||||||
columnFilter: false,
|
columnFilter: false,
|
||||||
align: 'left',
|
align: 'right',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'shelvingCode',
|
||||||
|
label: t('Shelving'),
|
||||||
|
columnFilter: false,
|
||||||
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
label: t('Landed'),
|
label: t('Landed'),
|
||||||
format: (row) => toDate(row.landed),
|
format: (row) => toDate(row.landed),
|
||||||
align: 'left',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'quantity',
|
name: 'quantity',
|
||||||
label: t('Quantity'),
|
label: t('Quantity'),
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'concept',
|
name: 'concept',
|
||||||
|
@ -52,18 +58,18 @@ const columns = [
|
||||||
{
|
{
|
||||||
name: 'price',
|
name: 'price',
|
||||||
label: t('Price'),
|
label: t('Price'),
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'discount',
|
name: 'discount',
|
||||||
label: t('Discount'),
|
label: t('Discount'),
|
||||||
format: ({ discount }) => toPercentage(discount / 100),
|
format: ({ discount }) => toPercentage(discount / 100),
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'total',
|
name: 'total',
|
||||||
label: t('Total'),
|
label: t('Total'),
|
||||||
align: 'left',
|
align: 'right',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -106,7 +106,6 @@ const props = defineProps({
|
||||||
:label="t('claim.zone')"
|
:label="t('claim.zone')"
|
||||||
v-model="params.zoneFk"
|
v-model="params.zoneFk"
|
||||||
url="Zones"
|
url="Zones"
|
||||||
:use-like="false"
|
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
|
|
|
@ -13,7 +13,6 @@ claim:
|
||||||
province: Province
|
province: Province
|
||||||
zone: Zone
|
zone: Zone
|
||||||
customerId: client ID
|
customerId: client ID
|
||||||
assignedTo: Assigned
|
|
||||||
created: Created
|
created: Created
|
||||||
details: Details
|
details: Details
|
||||||
item: Item
|
item: Item
|
||||||
|
|
|
@ -13,7 +13,6 @@ claim:
|
||||||
province: Provincia
|
province: Provincia
|
||||||
zone: Zona
|
zone: Zona
|
||||||
customerId: ID de cliente
|
customerId: ID de cliente
|
||||||
assignedTo: Asignado a
|
|
||||||
created: Creado
|
created: Creado
|
||||||
details: Detalles
|
details: Detalles
|
||||||
item: Artículo
|
item: Artículo
|
||||||
|
|
|
@ -656,7 +656,6 @@ onMounted(() => {
|
||||||
:without-header="!editableMode"
|
:without-header="!editableMode"
|
||||||
:with-filters="editableMode"
|
:with-filters="editableMode"
|
||||||
:right-search="editableMode"
|
:right-search="editableMode"
|
||||||
:right-search-icon="true"
|
|
||||||
:row-click="false"
|
:row-click="false"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:beforeSaveFn="beforeSave"
|
:beforeSaveFn="beforeSave"
|
||||||
|
|
|
@ -65,7 +65,7 @@ const entriesTableColumns = computed(() => [
|
||||||
]);
|
]);
|
||||||
|
|
||||||
function downloadCSV(rows) {
|
function downloadCSV(rows) {
|
||||||
const headers = ['id', 'itemFk', 'name', 'stickers', 'packing', 'comment'];
|
const headers = ['id', 'itemFk', 'name', 'stickers', 'packing', 'grouping', 'comment'];
|
||||||
|
|
||||||
const csvRows = rows.map((row) => {
|
const csvRows = rows.map((row) => {
|
||||||
const buy = row;
|
const buy = row;
|
||||||
|
@ -77,6 +77,7 @@ function downloadCSV(rows) {
|
||||||
item.name || '',
|
item.name || '',
|
||||||
buy.stickers,
|
buy.stickers,
|
||||||
buy.packing,
|
buy.packing,
|
||||||
|
buy.grouping,
|
||||||
item.comment || '',
|
item.comment || '',
|
||||||
].join(',');
|
].join(',');
|
||||||
});
|
});
|
||||||
|
|
|
@ -185,6 +185,7 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
||||||
data-key="InvoiceInSummary"
|
data-key="InvoiceInSummary"
|
||||||
:url="`InvoiceIns/${entityId}/summary`"
|
:url="`InvoiceIns/${entityId}/summary`"
|
||||||
@on-fetch="(data) => init(data)"
|
@on-fetch="(data) => init(data)"
|
||||||
|
module-name="InvoiceIn"
|
||||||
>
|
>
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
<div>{{ entity.id }} - {{ entity.supplier?.name }}</div>
|
<div>{{ entity.id }} - {{ entity.supplier?.name }}</div>
|
||||||
|
|
|
@ -103,7 +103,7 @@ const refundInvoice = async (withWarehouse) => {
|
||||||
t('refundInvoiceSuccessMessage', {
|
t('refundInvoiceSuccessMessage', {
|
||||||
refundTicket: data[0].id,
|
refundTicket: data[0].id,
|
||||||
}),
|
}),
|
||||||
'positive'
|
'positive',
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,6 +124,13 @@ const showRefundInvoiceForm = () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const showExportationLetter = () => {
|
||||||
|
openReport(`InvoiceOuts/${$props.invoiceOutData.ref}/exportation-pdf`, {
|
||||||
|
recipientId: $props.invoiceOutData.client.id,
|
||||||
|
refFk: $props.invoiceOutData.ref,
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -156,10 +163,14 @@ const showRefundInvoiceForm = () => {
|
||||||
<QMenu anchor="top end" self="top start">
|
<QMenu anchor="top end" self="top start">
|
||||||
<QList>
|
<QList>
|
||||||
<QItem v-ripple clickable @click="showSendInvoiceDialog('pdf')">
|
<QItem v-ripple clickable @click="showSendInvoiceDialog('pdf')">
|
||||||
<QItemSection>{{ t('Send PDF') }}</QItemSection>
|
<QItemSection data-cy="InvoiceOutDescriptorMenuSendPdfOption">
|
||||||
|
{{ t('Send PDF') }}
|
||||||
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem v-ripple clickable @click="showSendInvoiceDialog('csv')">
|
<QItem v-ripple clickable @click="showSendInvoiceDialog('csv')">
|
||||||
<QItemSection>{{ t('Send CSV') }}</QItemSection>
|
<QItemSection data-cy="InvoiceOutDescriptorMenuSendCsvOption">
|
||||||
|
{{ t('Send CSV') }}
|
||||||
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
</QList>
|
</QList>
|
||||||
</QMenu>
|
</QMenu>
|
||||||
|
@ -172,7 +183,7 @@ const showRefundInvoiceForm = () => {
|
||||||
t('Confirm deletion'),
|
t('Confirm deletion'),
|
||||||
t('Are you sure you want to delete this invoice?'),
|
t('Are you sure you want to delete this invoice?'),
|
||||||
deleteInvoice,
|
deleteInvoice,
|
||||||
redirectToInvoiceOutList
|
redirectToInvoiceOutList,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -185,7 +196,7 @@ const showRefundInvoiceForm = () => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
'',
|
'',
|
||||||
t('Are you sure you want to book this invoice?'),
|
t('Are you sure you want to book this invoice?'),
|
||||||
bookInvoice
|
bookInvoice,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -198,7 +209,7 @@ const showRefundInvoiceForm = () => {
|
||||||
openConfirmationModal(
|
openConfirmationModal(
|
||||||
t('Generate PDF invoice document'),
|
t('Generate PDF invoice document'),
|
||||||
t('Are you sure you want to generate/regenerate the PDF invoice?'),
|
t('Are you sure you want to generate/regenerate the PDF invoice?'),
|
||||||
generateInvoicePdf
|
generateInvoicePdf,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
@ -226,6 +237,14 @@ const showRefundInvoiceForm = () => {
|
||||||
{{ t('Create a single ticket with all the content of the current invoice') }}
|
{{ t('Create a single ticket with all the content of the current invoice') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem
|
||||||
|
v-if="$props.invoiceOutData.serial === 'E'"
|
||||||
|
v-ripple
|
||||||
|
clickable
|
||||||
|
@click="showExportationLetter()"
|
||||||
|
>
|
||||||
|
<QItemSection>{{ t('Show CITES letter') }}</QItemSection>
|
||||||
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -255,7 +274,7 @@ es:
|
||||||
Create a single ticket with all the content of the current invoice: Crear un ticket único con todo el contenido de la factura actual
|
Create a single ticket with all the content of the current invoice: Crear un ticket único con todo el contenido de la factura actual
|
||||||
refundInvoiceSuccessMessage: Se ha creado el siguiente ticket de abono {refundTicket}
|
refundInvoiceSuccessMessage: Se ha creado el siguiente ticket de abono {refundTicket}
|
||||||
The email can't be empty: El email no puede estar vacío
|
The email can't be empty: El email no puede estar vacío
|
||||||
|
Show CITES letter: Ver carta CITES
|
||||||
en:
|
en:
|
||||||
refundInvoiceSuccessMessage: The following refund ticket have been created {refundTicket}
|
refundInvoiceSuccessMessage: The following refund ticket have been created {refundTicket}
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -22,7 +22,7 @@ const states = ref();
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`invoiceOut.params.${tag.label}`) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -84,15 +84,6 @@ const states = ref();
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
|
||||||
<QItemSection>
|
|
||||||
<VnInputDate
|
|
||||||
v-model="params.issued"
|
|
||||||
:label="t('Issued')"
|
|
||||||
is-outlined
|
|
||||||
/>
|
|
||||||
</QItemSection>
|
|
||||||
</QItem>
|
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
|
@ -110,37 +101,3 @@ const states = ref();
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
|
||||||
en:
|
|
||||||
params:
|
|
||||||
search: Contains
|
|
||||||
clientFk: Customer
|
|
||||||
fi: FI
|
|
||||||
amount: Amount
|
|
||||||
min: Min
|
|
||||||
max: Max
|
|
||||||
hasPdf: Has PDF
|
|
||||||
issued: Issued
|
|
||||||
created: Created
|
|
||||||
dued: Dued
|
|
||||||
es:
|
|
||||||
params:
|
|
||||||
search: Contiene
|
|
||||||
clientFk: Cliente
|
|
||||||
fi: CIF
|
|
||||||
amount: Importe
|
|
||||||
min: Min
|
|
||||||
max: Max
|
|
||||||
hasPdf: Tiene PDF
|
|
||||||
issued: Emitida
|
|
||||||
created: Creada
|
|
||||||
dued: Vencida
|
|
||||||
Customer ID: ID cliente
|
|
||||||
FI: CIF
|
|
||||||
Amount: Importe
|
|
||||||
Has PDF: Tiene PDF
|
|
||||||
Issued: Fecha emisión
|
|
||||||
Created: Fecha creación
|
|
||||||
Dued: Fecha vencimiento
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ import VnSection from 'src/components/common/VnSection.vue';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const invoiceOutSerialsOptions = ref([]);
|
|
||||||
const customerOptions = ref([]);
|
const customerOptions = ref([]);
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const hasSelectedCards = computed(() => selectedRows.value.length > 0);
|
const hasSelectedCards = computed(() => selectedRows.value.length > 0);
|
||||||
|
@ -71,14 +70,6 @@ const columns = computed(() => [
|
||||||
inWhere: true,
|
inWhere: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
align: 'left',
|
|
||||||
name: 'issued',
|
|
||||||
label: t('invoiceOut.summary.issued'),
|
|
||||||
component: 'date',
|
|
||||||
format: (row) => toDate(row.issued),
|
|
||||||
columnField: { component: null },
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
name: 'clientFk',
|
name: 'clientFk',
|
||||||
|
@ -376,7 +367,6 @@ watchEffect(selectedRows);
|
||||||
url="InvoiceOutSerials"
|
url="InvoiceOutSerials"
|
||||||
v-model="data.serial"
|
v-model="data.serial"
|
||||||
:label="t('invoiceOutModule.serial')"
|
:label="t('invoiceOutModule.serial')"
|
||||||
:options="invoiceOutSerialsOptions"
|
|
||||||
option-label="description"
|
option-label="description"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-filter
|
option-filter
|
||||||
|
|
|
@ -10,6 +10,8 @@ import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vu
|
||||||
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
import TicketDescriptorProxy from '../Ticket/Card/TicketDescriptorProxy.vue';
|
||||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
import InvoiceOutNegativeBasesFilter from './InvoiceOutNegativeBasesFilter.vue';
|
||||||
|
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
@ -157,6 +159,11 @@ const downloadCSV = async () => {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</VnSubToolbar>
|
</VnSubToolbar>
|
||||||
|
<RightMenu>
|
||||||
|
<template #right-panel>
|
||||||
|
<InvoiceOutNegativeBasesFilter data-key="negativeFilter" />
|
||||||
|
</template>
|
||||||
|
</RightMenu>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="negativeFilter"
|
data-key="negativeFilter"
|
||||||
|
@ -177,6 +184,7 @@ const downloadCSV = async () => {
|
||||||
auto-load
|
auto-load
|
||||||
:is-editable="false"
|
:is-editable="false"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
:right-search="false"
|
||||||
>
|
>
|
||||||
<template #column-clientId="{ row }">
|
<template #column-clientId="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -24,11 +25,11 @@ const props = defineProps({
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`invoiceOut.params.${tag.label}`) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ params }">
|
<template #body="{ params, searchFn }">
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
|
@ -49,38 +50,70 @@ const props = defineProps({
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnSelect
|
||||||
v-model="params.company"
|
url="Companies"
|
||||||
:label="t('globals.company')"
|
:label="t('globals.company')"
|
||||||
is-outlined
|
v-model="params.company"
|
||||||
/>
|
option-label="code"
|
||||||
|
option-value="code"
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
>
|
||||||
|
<template #option="scope">
|
||||||
|
<QItem v-bind="scope.itemProps">
|
||||||
|
<QItemSection>
|
||||||
|
<QItemLabel>
|
||||||
|
{{ scope.opt?.code }}
|
||||||
|
</QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{ `#${scope.opt?.id}` }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnSelect
|
||||||
|
url="Countries"
|
||||||
|
:label="t('globals.params.countryFk')"
|
||||||
v-model="params.country"
|
v-model="params.country"
|
||||||
:label="t('globals.country')"
|
option-label="name"
|
||||||
is-outlined
|
option-value="name"
|
||||||
/>
|
outlined
|
||||||
</QItemSection>
|
dense
|
||||||
</QItem>
|
rounded
|
||||||
|
@update:model-value="searchFn()"
|
||||||
<QItem>
|
>
|
||||||
<QItemSection>
|
<template #option="scope">
|
||||||
<VnInput
|
<QItem v-bind="scope.itemProps">
|
||||||
v-model="params.clientId"
|
<QItemSection>
|
||||||
:label="t('invoiceOut.negativeBases.clientId')"
|
<QItemLabel>
|
||||||
is-outlined
|
{{ scope.opt?.name }}
|
||||||
/>
|
</QItemLabel>
|
||||||
|
<QItemLabel caption>
|
||||||
|
{{ `#${scope.opt?.id}` }}
|
||||||
|
</QItemLabel>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
</template>
|
||||||
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnSelect
|
||||||
v-model="params.clientSocialName"
|
url="Clients"
|
||||||
:label="t('globals.client')"
|
:label="t('globals.client')"
|
||||||
is-outlined
|
v-model="params.clientId"
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
rounded
|
||||||
|
@update:model-value="searchFn()"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
@ -90,15 +123,18 @@ const props = defineProps({
|
||||||
v-model="params.amount"
|
v-model="params.amount"
|
||||||
:label="t('globals.amount')"
|
:label="t('globals.amount')"
|
||||||
is-outlined
|
is-outlined
|
||||||
|
:positive="false"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnSelectWorker
|
||||||
v-model="params.comercialName"
|
|
||||||
:label="t('invoiceOut.negativeBases.comercial')"
|
:label="t('invoiceOut.negativeBases.comercial')"
|
||||||
|
v-model="params.workerName"
|
||||||
|
option-value="name"
|
||||||
is-outlined
|
is-outlined
|
||||||
|
@update:model-value="searchFn()"
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -2,9 +2,10 @@ invoiceOut:
|
||||||
search: Search invoice
|
search: Search invoice
|
||||||
searchInfo: You can search by invoice reference
|
searchInfo: You can search by invoice reference
|
||||||
params:
|
params:
|
||||||
|
id: ID
|
||||||
company: Company
|
company: Company
|
||||||
country: Country
|
country: Country
|
||||||
clientId: Client ID
|
clientId: Client
|
||||||
clientSocialName: Client
|
clientSocialName: Client
|
||||||
taxableBase: Base
|
taxableBase: Base
|
||||||
ticketFk: Ticket
|
ticketFk: Ticket
|
||||||
|
@ -12,6 +13,19 @@ invoiceOut:
|
||||||
hasToInvoice: Has to invoice
|
hasToInvoice: Has to invoice
|
||||||
hasVerifiedData: Verified data
|
hasVerifiedData: Verified data
|
||||||
workerName: Worker
|
workerName: Worker
|
||||||
|
isTaxDataChecked: Verified data
|
||||||
|
amount: Amount
|
||||||
|
clientFk: Client
|
||||||
|
companyFk: Company
|
||||||
|
created: Created
|
||||||
|
dued: Dued
|
||||||
|
customsAgentFk: Custom Agent
|
||||||
|
ref: Reference
|
||||||
|
fi: FI
|
||||||
|
min: Min
|
||||||
|
max: Max
|
||||||
|
hasPdf: Has PDF
|
||||||
|
search: Contains
|
||||||
card:
|
card:
|
||||||
issued: Issued
|
issued: Issued
|
||||||
customerCard: Customer card
|
customerCard: Customer card
|
||||||
|
@ -53,7 +67,7 @@ invoiceOut:
|
||||||
active: Active
|
active: Active
|
||||||
hasToInvoice: Has to Invoice
|
hasToInvoice: Has to Invoice
|
||||||
verifiedData: Verified Data
|
verifiedData: Verified Data
|
||||||
comercial: Commercial
|
comercial: Sales person
|
||||||
errors:
|
errors:
|
||||||
downloadCsvFailed: CSV download failed
|
downloadCsvFailed: CSV download failed
|
||||||
invoiceOutModule:
|
invoiceOutModule:
|
||||||
|
|
|
@ -2,9 +2,10 @@ invoiceOut:
|
||||||
search: Buscar factura emitida
|
search: Buscar factura emitida
|
||||||
searchInfo: Puedes buscar por referencia de la factura
|
searchInfo: Puedes buscar por referencia de la factura
|
||||||
params:
|
params:
|
||||||
|
id: ID
|
||||||
company: Empresa
|
company: Empresa
|
||||||
country: País
|
country: País
|
||||||
clientId: ID del cliente
|
clientId: Cliente
|
||||||
clientSocialName: Cliente
|
clientSocialName: Cliente
|
||||||
taxableBase: Base
|
taxableBase: Base
|
||||||
ticketFk: Ticket
|
ticketFk: Ticket
|
||||||
|
@ -12,6 +13,19 @@ invoiceOut:
|
||||||
hasToInvoice: Debe facturar
|
hasToInvoice: Debe facturar
|
||||||
hasVerifiedData: Datos verificados
|
hasVerifiedData: Datos verificados
|
||||||
workerName: Comercial
|
workerName: Comercial
|
||||||
|
isTaxDataChecked: Datos comprobados
|
||||||
|
amount: Importe
|
||||||
|
clientFk: Cliente
|
||||||
|
companyFk: Empresa
|
||||||
|
created: Creada
|
||||||
|
dued: Vencida
|
||||||
|
customsAgentFk: Agente aduanas
|
||||||
|
ref: Referencia
|
||||||
|
fi: CIF
|
||||||
|
min: Min
|
||||||
|
max: Max
|
||||||
|
hasPdf: Tiene PDF
|
||||||
|
search: Contiene
|
||||||
card:
|
card:
|
||||||
issued: Fecha emisión
|
issued: Fecha emisión
|
||||||
customerCard: Ficha del cliente
|
customerCard: Ficha del cliente
|
||||||
|
|
|
@ -8,6 +8,7 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import { useArrayData } from 'src/composables/useArrayData';
|
import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||||
|
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
@ -52,7 +53,7 @@ onMounted(async () => {
|
||||||
name: key,
|
name: key,
|
||||||
value,
|
value,
|
||||||
selectedField: { name: key, label: t(`params.${key}`) },
|
selectedField: { name: key, label: t(`params.${key}`) },
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
exprBuilder('state', arrayData.store?.userParams?.state);
|
exprBuilder('state', arrayData.store?.userParams?.state);
|
||||||
|
@ -157,6 +158,32 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInputDate
|
||||||
|
v-model="params.from"
|
||||||
|
:label="t('params.from')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInputDate
|
||||||
|
v-model="params.to"
|
||||||
|
:label="t('params.to')"
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnInput
|
||||||
|
:label="t('params.daysOnward')"
|
||||||
|
v-model="params.daysOnward"
|
||||||
|
lazy-rules
|
||||||
|
is-outlined
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
|
@ -175,11 +202,10 @@ onMounted(async () => {
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<QCheckbox
|
||||||
:label="t('params.daysOnward')"
|
:label="t('params.mine')"
|
||||||
v-model="params.daysOnward"
|
v-model="params.mine"
|
||||||
lazy-rules
|
:toggle-indeterminate="false"
|
||||||
is-outlined
|
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -180,6 +180,7 @@ const onDmsSaved = async (dms, response) => {
|
||||||
rows: dmsDialog.value.rowsToCreateInvoiceIn,
|
rows: dmsDialog.value.rowsToCreateInvoiceIn,
|
||||||
dms: response.data,
|
dms: response.data,
|
||||||
});
|
});
|
||||||
|
notify(t('Data saved'), 'positive');
|
||||||
}
|
}
|
||||||
dmsDialog.value.show = false;
|
dmsDialog.value.show = false;
|
||||||
dmsDialog.value.initialForm = null;
|
dmsDialog.value.initialForm = null;
|
||||||
|
@ -243,7 +244,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</template>
|
</template>
|
||||||
<template #column-invoiceInFk="{ row }">
|
<template #column-invoiceInFk="{ row }">
|
||||||
<span class="link" @click.stop>
|
<span class="link" @click.stop>
|
||||||
{{ row.invoiceInFk }}
|
{{ row.supplierRef }}
|
||||||
<InvoiceInDescriptorProxy v-if="row.invoiceInFk" :id="row.invoiceInFk" />
|
<InvoiceInDescriptorProxy v-if="row.invoiceInFk" :id="row.invoiceInFk" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -280,7 +280,7 @@ const openTicketsDialog = (id) => {
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection class="q-pt-none">
|
<QCardSection class="q-pt-none">
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('route.Stating date')"
|
:label="t('route.Starting date')"
|
||||||
v-model="startingDate"
|
v-model="startingDate"
|
||||||
autofocus
|
autofocus
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -22,7 +22,12 @@ const links = {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<CardSummary data-key="Vehicle" :url="`Vehicles/${entityId}`" :filter="VehicleFilter">
|
<CardSummary
|
||||||
|
data-key="Vehicle"
|
||||||
|
:url="`Vehicles/${entityId}`"
|
||||||
|
module-name="Vehicle"
|
||||||
|
:filter="VehicleFilter"
|
||||||
|
>
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
<div>{{ entity.id }} - {{ entity.numberPlate }}</div>
|
<div>{{ entity.id }} - {{ entity.numberPlate }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -45,8 +45,6 @@ const filter = {
|
||||||
:label="t('parking.sector')"
|
:label="t('parking.sector')"
|
||||||
:value="entity.sector?.description"
|
:value="entity.sector?.description"
|
||||||
/>
|
/>
|
||||||
<VnLv :label="t('parking.row')" :value="entity.row" />
|
|
||||||
<VnLv :label="t('parking.column')" :value="entity.column" />
|
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CardSummary>
|
</CardSummary>
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, onUnmounted } from 'vue';
|
import { computed, onMounted, onUnmounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useStateStore } from 'stores/useStateStore';
|
import { useStateStore } from 'stores/useStateStore';
|
||||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import CardList from 'components/ui/CardList.vue';
|
|
||||||
import VnLv from 'components/ui/VnLv.vue';
|
|
||||||
import ParkingFilter from './ParkingFilter.vue';
|
|
||||||
import ParkingSummary from './Card/ParkingSummary.vue';
|
|
||||||
import exprBuilder from './ParkingExprBuilder.js';
|
|
||||||
import VnSection from 'src/components/common/VnSection.vue';
|
import VnSection from 'src/components/common/VnSection.vue';
|
||||||
|
import ParkingFilter from './ParkingFilter.vue';
|
||||||
|
import exprBuilder from './ParkingExprBuilder.js';
|
||||||
|
import ParkingSummary from './Card/ParkingSummary.vue';
|
||||||
|
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { push } = useRouter();
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const dataKey = 'ParkingList';
|
const dataKey = 'ParkingList';
|
||||||
|
@ -24,7 +20,48 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder'],
|
fields: ['id', 'sectorFk', 'code', 'pickingOrder'],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const columns = computed(() => [
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'code',
|
||||||
|
label: t('globals.code'),
|
||||||
|
isId: true,
|
||||||
|
isTitle: true,
|
||||||
|
columnFilter: false,
|
||||||
|
sortable: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'sector',
|
||||||
|
label: t('parking.sector'),
|
||||||
|
format: (val) => val.sector.description ?? '',
|
||||||
|
sortable: true,
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'left',
|
||||||
|
name: 'pickingOrder',
|
||||||
|
label: t('parking.pickingOrder'),
|
||||||
|
sortable: true,
|
||||||
|
cardVisible: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
align: 'right',
|
||||||
|
label: '',
|
||||||
|
name: 'tableActions',
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
title: t('components.smartCard.viewSummary'),
|
||||||
|
icon: 'preview',
|
||||||
|
action: (row) => viewSummary(row.id, ParkingSummary),
|
||||||
|
isPrimary: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
]);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSection
|
<VnSection
|
||||||
:data-key="dataKey"
|
:data-key="dataKey"
|
||||||
|
@ -40,41 +77,24 @@ const filter = {
|
||||||
<ParkingFilter data-key="ParkingList" />
|
<ParkingFilter data-key="ParkingList" />
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<QPage class="column items-center q-pa-md">
|
<VnTable
|
||||||
<div class="vn-card-list">
|
:data-key="dataKey"
|
||||||
<VnPaginate :data-key="dataKey">
|
:columns="columns"
|
||||||
<template #body="{ rows }">
|
is-editable="false"
|
||||||
<CardList
|
:right-search="false"
|
||||||
v-for="row of rows"
|
:use-model="true"
|
||||||
:key="row.id"
|
:disable-option="{ table: true }"
|
||||||
:id="row.id"
|
redirect="shelving/parking"
|
||||||
:title="row.code"
|
default-mode="card"
|
||||||
@click="
|
>
|
||||||
push({ path: `/shelving/parking/${row.id}/summary` })
|
<template #actions="{ row }">
|
||||||
"
|
<QBtn
|
||||||
>
|
:label="t('components.smartCard.openSummary')"
|
||||||
<template #list-items>
|
@click.stop="viewSummary(row.id, ParkingSummary)"
|
||||||
<VnLv
|
color="primary"
|
||||||
label="Sector"
|
/>
|
||||||
:value="row.sector?.description"
|
</template>
|
||||||
/>
|
</VnTable>
|
||||||
<VnLv
|
|
||||||
:label="t('parking.pickingOrder')"
|
|
||||||
:value="row.pickingOrder"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #actions>
|
|
||||||
<QBtn
|
|
||||||
:label="t('components.smartCard.openSummary')"
|
|
||||||
@click.stop="viewSummary(row.id, ParkingSummary)"
|
|
||||||
color="primary"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</CardList>
|
|
||||||
</template>
|
|
||||||
</VnPaginate>
|
|
||||||
</div>
|
|
||||||
</QPage>
|
|
||||||
</template>
|
</template>
|
||||||
</VnSection>
|
</VnSection>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -31,7 +31,7 @@ const oldQuantity = ref(null);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.params.id,
|
() => route.params.id,
|
||||||
async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch())
|
async () => nextTick(async () => await saleTrackingFetchDataRef.value.fetch()),
|
||||||
);
|
);
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -212,7 +212,7 @@ const updateShelving = async (sale) => {
|
||||||
|
|
||||||
const { data: patchResponseData } = await axios.patch(
|
const { data: patchResponseData } = await axios.patch(
|
||||||
`ItemShelvings/${sale.itemShelvingFk}`,
|
`ItemShelvings/${sale.itemShelvingFk}`,
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
const filter = {
|
const filter = {
|
||||||
fields: ['parkingFk'],
|
fields: ['parkingFk'],
|
||||||
|
@ -385,7 +385,7 @@ const qCheckBoxController = (sale, action) => {
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-parking="{ row }">
|
<template #body-cell-parking="{ row }">
|
||||||
<QTd style="width: 10%">
|
<QTd style="width: 10%">
|
||||||
{{ dashIfEmpty(row.parkingFk) }}
|
{{ dashIfEmpty(row.parkingCode) }}
|
||||||
</QTd>
|
</QTd>
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-actions="{ row }">
|
<template #body-cell-actions="{ row }">
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { onMounted, ref, computed, watch } from 'vue';
|
import { onMounted, ref, computed, watch } from 'vue';
|
||||||
import { QBtn } from 'quasar';
|
import { QBtn } from 'quasar';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue';
|
||||||
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
|
||||||
|
@ -22,6 +23,8 @@ import VnPopup from 'src/components/common/VnPopup.vue';
|
||||||
const stateStore = useStateStore();
|
const stateStore = useStateStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const { openReport } = usePrintService();
|
const { openReport } = usePrintService();
|
||||||
|
const route = useRoute();
|
||||||
|
const tableParams = ref();
|
||||||
|
|
||||||
const shippedFrom = ref(Date.vnNew());
|
const shippedFrom = ref(Date.vnNew());
|
||||||
const landedTo = ref(Date.vnNew());
|
const landedTo = ref(Date.vnNew());
|
||||||
|
@ -143,7 +146,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('globals.pageTitles.supplier'),
|
label: t('extraCommunity.cargoShip'),
|
||||||
field: 'cargoSupplierNickname',
|
field: 'cargoSupplierNickname',
|
||||||
name: 'cargoSupplierNickname',
|
name: 'cargoSupplierNickname',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -171,7 +174,7 @@ const columns = computed(() => [
|
||||||
? value.reduce((sum, entry) => {
|
? value.reduce((sum, entry) => {
|
||||||
return sum + (entry.invoiceAmount || 0);
|
return sum + (entry.invoiceAmount || 0);
|
||||||
}, 0)
|
}, 0)
|
||||||
: 0
|
: 0,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -200,7 +203,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('kg'),
|
label: t('extraCommunity.kg'),
|
||||||
field: 'kg',
|
field: 'kg',
|
||||||
name: 'kg',
|
name: 'kg',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -208,7 +211,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('physicKg'),
|
label: t('extraCommunity.physicKg'),
|
||||||
field: 'loadedKg',
|
field: 'loadedKg',
|
||||||
name: 'loadedKg',
|
name: 'loadedKg',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -232,7 +235,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('shipped'),
|
label: t('extraCommunity.shipped'),
|
||||||
field: 'shipped',
|
field: 'shipped',
|
||||||
name: 'shipped',
|
name: 'shipped',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -249,7 +252,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('landed'),
|
label: t('extraCommunity.landed'),
|
||||||
field: 'landed',
|
field: 'landed',
|
||||||
name: 'landed',
|
name: 'landed',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -258,7 +261,7 @@ const columns = computed(() => [
|
||||||
format: (value) => toDate(value),
|
format: (value) => toDate(value),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('notes'),
|
label: t('extraCommunity.notes'),
|
||||||
field: '',
|
field: '',
|
||||||
name: 'notes',
|
name: 'notes',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
@ -284,7 +287,7 @@ watch(
|
||||||
if (!arrayData.store.data) return;
|
if (!arrayData.store.data) return;
|
||||||
onStoreDataChange();
|
onStoreDataChange();
|
||||||
},
|
},
|
||||||
{ deep: true, immediate: true }
|
{ deep: true, immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
const openReportPdf = () => {
|
const openReportPdf = () => {
|
||||||
|
@ -451,13 +454,24 @@ const getColor = (percentage) => {
|
||||||
for (const { value, className } of travelKgPercentages.value)
|
for (const { value, className } of travelKgPercentages.value)
|
||||||
if (percentage > value) return className;
|
if (percentage > value) return className;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const filteredEntries = (entries) => {
|
||||||
|
if (!tableParams?.value?.entrySupplierFk) return entries;
|
||||||
|
return entries?.filter(
|
||||||
|
(entry) => entry.supplierFk === tableParams?.value?.entrySupplierFk,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(route, () => {
|
||||||
|
tableParams.value = JSON.parse(route.query.table);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VnSearchbar
|
<VnSearchbar
|
||||||
data-key="ExtraCommunity"
|
data-key="ExtraCommunity"
|
||||||
:limit="20"
|
:limit="20"
|
||||||
:label="t('searchExtraCommunity')"
|
:label="t('extraCommunity.searchExtraCommunity')"
|
||||||
/>
|
/>
|
||||||
<RightMenu>
|
<RightMenu>
|
||||||
<template #right-panel>
|
<template #right-panel>
|
||||||
|
@ -521,7 +535,7 @@ const getColor = (percentage) => {
|
||||||
? tableColumnComponents[col.name].event(
|
? tableColumnComponents[col.name].event(
|
||||||
rows[props.rowIndex][col.field],
|
rows[props.rowIndex][col.field],
|
||||||
col.field,
|
col.field,
|
||||||
props.rowIndex
|
props.rowIndex,
|
||||||
)
|
)
|
||||||
: {}
|
: {}
|
||||||
"
|
"
|
||||||
|
@ -546,7 +560,7 @@ const getColor = (percentage) => {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
link: ['id', 'cargoSupplierNickname'].includes(
|
link: ['id', 'cargoSupplierNickname'].includes(
|
||||||
col.name
|
col.name,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]"
|
]"
|
||||||
|
@ -564,9 +578,8 @@ const getColor = (percentage) => {
|
||||||
</component>
|
</component>
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
|
|
||||||
<QTr
|
<QTr
|
||||||
v-for="(entry, index) in props.row.entries"
|
v-for="(entry, index) in filteredEntries(props.row.entries)"
|
||||||
:key="index"
|
:key="index"
|
||||||
:props="props"
|
:props="props"
|
||||||
class="bg-vn-secondary-row cursor-pointer"
|
class="bg-vn-secondary-row cursor-pointer"
|
||||||
|
@ -598,7 +611,7 @@ const getColor = (percentage) => {
|
||||||
name="warning"
|
name="warning"
|
||||||
color="negative"
|
color="negative"
|
||||||
size="md"
|
size="md"
|
||||||
:title="t('requiresInspection')"
|
:title="t('extraCommunity.requiresInspection')"
|
||||||
>
|
>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</QTd>
|
</QTd>
|
||||||
|
@ -709,24 +722,3 @@ const getColor = (percentage) => {
|
||||||
width: max-content;
|
width: max-content;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
|
||||||
en:
|
|
||||||
searchExtraCommunity: Search for extra community shipping
|
|
||||||
kg: BI. KG
|
|
||||||
physicKg: Phy. KG
|
|
||||||
shipped: W. shipped
|
|
||||||
landed: W. landed
|
|
||||||
requiresInspection: Requires inspection
|
|
||||||
BIP: Boder Inspection Point
|
|
||||||
notes: Notes
|
|
||||||
es:
|
|
||||||
searchExtraCommunity: Buscar por envío extra comunitario
|
|
||||||
kg: KG Bloq.
|
|
||||||
physicKg: KG físico
|
|
||||||
shipped: F. envío
|
|
||||||
landed: F. llegada
|
|
||||||
notes: Notas
|
|
||||||
Open as PDF: Abrir como PDF
|
|
||||||
requiresInspection: Requiere inspección
|
|
||||||
BIP: Punto de Inspección Fronteriza
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ warehouses();
|
||||||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ t(`extraCommunity.filter.${tag.label}`) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -93,7 +93,7 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput
|
<VnInput
|
||||||
:label="t('params.reference')"
|
:label="t('extraCommunity.filter.reference')"
|
||||||
v-model="params.reference"
|
v-model="params.reference"
|
||||||
is-outlined
|
is-outlined
|
||||||
/>
|
/>
|
||||||
|
@ -104,7 +104,7 @@ warehouses();
|
||||||
<QInput
|
<QInput
|
||||||
v-model="params.totalEntries"
|
v-model="params.totalEntries"
|
||||||
type="number"
|
type="number"
|
||||||
:label="t('params.totalEntries')"
|
:label="t('extraCommunity.filter.totalEntries')"
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
@ -134,10 +134,10 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.agencyModeFk')"
|
:label="t('extraCommunity.filter.agencyModeFk')"
|
||||||
v-model="params.agencyModeFk"
|
v-model="params.agencyModeFk"
|
||||||
:options="agenciesOptions"
|
:options="agenciesOptions"
|
||||||
option-value="agencyFk"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
hide-selected
|
hide-selected
|
||||||
dense
|
dense
|
||||||
|
@ -149,7 +149,7 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('params.shippedFrom')"
|
:label="t('extraCommunity.filter.shippedFrom')"
|
||||||
v-model="params.shippedFrom"
|
v-model="params.shippedFrom"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
is-outlined
|
is-outlined
|
||||||
|
@ -159,7 +159,7 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInputDate
|
<VnInputDate
|
||||||
:label="t('params.landedTo')"
|
:label="t('extraCommunity.filter.landedTo')"
|
||||||
v-model="params.landedTo"
|
v-model="params.landedTo"
|
||||||
@update:model-value="searchFn()"
|
@update:model-value="searchFn()"
|
||||||
is-outlined
|
is-outlined
|
||||||
|
@ -169,7 +169,7 @@ warehouses();
|
||||||
<QItem v-if="warehousesByContinent[params.continent]">
|
<QItem v-if="warehousesByContinent[params.continent]">
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.warehouseOutFk')"
|
:label="t('extraCommunity.filter.warehouseOutFk')"
|
||||||
v-model="params.warehouseOutFk"
|
v-model="params.warehouseOutFk"
|
||||||
:options="warehousesByContinent[params.continent]"
|
:options="warehousesByContinent[params.continent]"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -184,7 +184,7 @@ warehouses();
|
||||||
<QItem v-else>
|
<QItem v-else>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.warehouseOutFk')"
|
:label="t('extraCommunity.filter.warehouseOutFk')"
|
||||||
v-model="params.warehouseOutFk"
|
v-model="params.warehouseOutFk"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -199,7 +199,7 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.warehouseInFk')"
|
:label="t('extraCommunity.filter.warehouseInFk')"
|
||||||
v-model="params.warehouseInFk"
|
v-model="params.warehouseInFk"
|
||||||
:options="warehousesOptions"
|
:options="warehousesOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
|
@ -214,6 +214,7 @@ warehouses();
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelectSupplier
|
<VnSelectSupplier
|
||||||
|
:label="t('extraCommunity.cargoShip')"
|
||||||
v-model="params.cargoSupplierFk"
|
v-model="params.cargoSupplierFk"
|
||||||
hide-selected
|
hide-selected
|
||||||
dense
|
dense
|
||||||
|
@ -222,10 +223,21 @@ warehouses();
|
||||||
/>
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<VnSelectSupplier
|
||||||
|
v-model="params.entrySupplierFk"
|
||||||
|
hide-selected
|
||||||
|
dense
|
||||||
|
outlined
|
||||||
|
rounded
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('params.continent')"
|
:label="t('extraCommunity.filter.continent')"
|
||||||
v-model="params.continent"
|
v-model="params.continent"
|
||||||
:options="continentsOptions"
|
:options="continentsOptions"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
|
@ -241,30 +253,3 @@ warehouses();
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
|
||||||
en:
|
|
||||||
params:
|
|
||||||
id: Id
|
|
||||||
reference: Reference
|
|
||||||
totalEntries: Total entries
|
|
||||||
agencyModeFk: Agency
|
|
||||||
warehouseInFk: Warehouse In
|
|
||||||
warehouseOutFk: Warehouse Out
|
|
||||||
shippedFrom: Shipped from
|
|
||||||
landedTo: Landed to
|
|
||||||
cargoSupplierFk: Supplier
|
|
||||||
continent: Continent out
|
|
||||||
es:
|
|
||||||
params:
|
|
||||||
id: Id
|
|
||||||
reference: Referencia
|
|
||||||
totalEntries: Ent. totales
|
|
||||||
agencyModeFk: Agencia
|
|
||||||
warehouseInFk: Alm. entrada
|
|
||||||
warehouseOutFk: Alm. salida
|
|
||||||
shippedFrom: Llegada desde
|
|
||||||
landedTo: Llegada hasta
|
|
||||||
cargoSupplierFk: Proveedor
|
|
||||||
continent: Cont. Salida
|
|
||||||
</i18n>
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
extraCommunity:
|
||||||
|
cargoShip: Cargo ship
|
||||||
|
searchExtraCommunity: Search for extra community shipping
|
||||||
|
kg: BI. KG
|
||||||
|
physicKg: Phy. KG
|
||||||
|
shipped: W. shipped
|
||||||
|
landed: W. landed
|
||||||
|
requiresInspection: Requires inspection
|
||||||
|
BIP: Boder Inspection Point
|
||||||
|
notes: Notes
|
||||||
|
filter:
|
||||||
|
id: Id
|
||||||
|
reference: Reference
|
||||||
|
totalEntries: Total entries
|
||||||
|
agencyModeFk: Agency
|
||||||
|
warehouseInFk: Warehouse In
|
||||||
|
warehouseOutFk: Warehouse Out
|
||||||
|
shippedFrom: Shipped from
|
||||||
|
landedTo: Landed to
|
||||||
|
cargoSupplierFk: Cargo supplier
|
||||||
|
continent: Continent out
|
||||||
|
entrySupplierFk: Supplier
|
|
@ -0,0 +1,23 @@
|
||||||
|
extraCommunity:
|
||||||
|
cargoShip: Carguera
|
||||||
|
searchExtraCommunity: Buscar por envío extra comunitario
|
||||||
|
kg: KG Bloq.
|
||||||
|
physicKg: KG físico
|
||||||
|
shipped: F. envío
|
||||||
|
landed: F. llegada
|
||||||
|
notes: Notas
|
||||||
|
Open as PDF: Abrir como PDF
|
||||||
|
requiresInspection: Requiere inspección
|
||||||
|
BIP: Punto de Inspección Fronteriza
|
||||||
|
filter:
|
||||||
|
id: Id
|
||||||
|
reference: Referencia
|
||||||
|
totalEntries: Ent. totales
|
||||||
|
agencyModeFk: Agencia
|
||||||
|
warehouseInFk: Alm. entrada
|
||||||
|
warehouseOutFk: Alm. salida
|
||||||
|
shippedFrom: Llegada desde
|
||||||
|
landedTo: Llegada hasta
|
||||||
|
cargoSupplierFk: Carguera
|
||||||
|
continent: Cont. Salida
|
||||||
|
entrySupplierFk: Proveedor
|
|
@ -46,8 +46,18 @@ async function setAdvancedSummary(data) {
|
||||||
>
|
>
|
||||||
<template #form="{ data }">
|
<template #form="{ data }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput :label="t('Name')" clearable v-model="data.firstName" />
|
<VnInput
|
||||||
<VnInput :label="t('Last name')" clearable v-model="data.lastName" />
|
:label="t('Name')"
|
||||||
|
clearable
|
||||||
|
v-model="data.firstName"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
<VnInput
|
||||||
|
:label="t('Last name')"
|
||||||
|
clearable
|
||||||
|
v-model="data.lastName"
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput v-model="data.phone" :label="t('Business phone')" clearable />
|
<VnInput v-model="data.phone" :label="t('Business phone')" clearable />
|
||||||
|
|
|
@ -54,9 +54,8 @@ watch(
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -105,6 +104,7 @@ watch(
|
||||||
:options="trainsData"
|
:options="trainsData"
|
||||||
hide-selected
|
hide-selected
|
||||||
v-model="row.trainFk"
|
v-model="row.trainFk"
|
||||||
|
:required="true"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -115,12 +115,14 @@ watch(
|
||||||
option-label="code"
|
option-label="code"
|
||||||
option-value="code"
|
option-value="code"
|
||||||
v-model="row.itemPackingTypeFk"
|
v-model="row.itemPackingTypeFk"
|
||||||
|
:required="true"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('worker.operator.warehouse')"
|
:label="t('worker.operator.warehouse')"
|
||||||
:options="warehousesData"
|
:options="warehousesData"
|
||||||
hide-selected
|
hide-selected
|
||||||
v-model="row.warehouseFk"
|
v-model="row.warehouseFk"
|
||||||
|
:required="true"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
@ -175,6 +177,7 @@ watch(
|
||||||
:label="t('worker.operator.isOnReservationMode')"
|
:label="t('worker.operator.isOnReservationMode')"
|
||||||
v-model="row.isOnReservationMode"
|
v-model="row.isOnReservationMode"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
:required="true"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
src/pages/Worker/Card/WorkerPBX.vue
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
import FormModel from 'src/components/FormModel.vue';
|
import FormModel from 'src/components/FormModel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
const { t } = useI18n();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -26,3 +26,8 @@ import VnInput from 'src/components/common/VnInput.vue';
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<i18n>
|
||||||
|
es:
|
||||||
|
It must be a 4-digit number and must not end in 00: Debe ser un número de 4 cifras y no terminar en 00
|
||||||
|
</i18n>
|
||||||
|
|
|
@ -140,6 +140,7 @@ function reloadData() {
|
||||||
id="deviceProductionFk"
|
id="deviceProductionFk"
|
||||||
hide-selected
|
hide-selected
|
||||||
data-cy="pda-dialog-select"
|
data-cy="pda-dialog-select"
|
||||||
|
:required="true"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -176,6 +176,7 @@ const deleteRelative = async (id) => {
|
||||||
:label="t('isDescendant')"
|
:label="t('isDescendant')"
|
||||||
v-model="row.isDescendant"
|
v-model="row.isDescendant"
|
||||||
class="q-gutter-xs q-mb-xs"
|
class="q-gutter-xs q-mb-xs"
|
||||||
|
data-cy="Descendant/Ascendant"
|
||||||
/>
|
/>
|
||||||
<VnSelect
|
<VnSelect
|
||||||
:label="t('disabilityGrades')"
|
:label="t('disabilityGrades')"
|
||||||
|
|
|
@ -39,7 +39,12 @@ const agencies = ref([]);
|
||||||
<template #body="{ params, searchFn }">
|
<template #body="{ params, searchFn }">
|
||||||
<QItem>
|
<QItem>
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<VnInput :label="t('list.name')" v-model="params.name" is-outlined />
|
<VnInput
|
||||||
|
:label="t('list.name')"
|
||||||
|
v-model="params.name"
|
||||||
|
is-outlined
|
||||||
|
data-cy="zoneFilterPanelNameInput"
|
||||||
|
/>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem>
|
<QItem>
|
||||||
|
@ -54,6 +59,7 @@ const agencies = ref([]);
|
||||||
dense
|
dense
|
||||||
outlined
|
outlined
|
||||||
rounded
|
rounded
|
||||||
|
data-cy="zoneFilterPanelAgencySelect"
|
||||||
>
|
>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
|
@ -56,7 +56,7 @@ onMounted(() => weekdayStore.initStore());
|
||||||
<ZoneSearchbar />
|
<ZoneSearchbar />
|
||||||
<VnSubToolbar />
|
<VnSubToolbar />
|
||||||
<QPage class="column items-center q-pa-md">
|
<QPage class="column items-center q-pa-md">
|
||||||
<QCard class="full-width q-pa-md">
|
<QCard class="containerShrinked q-pa-md">
|
||||||
<div
|
<div
|
||||||
v-for="(detail, index) in details"
|
v-for="(detail, index) in details"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
|
|
@ -44,6 +44,8 @@ summary:
|
||||||
filterPanel:
|
filterPanel:
|
||||||
name: Name
|
name: Name
|
||||||
agencyModeFk: Agency
|
agencyModeFk: Agency
|
||||||
|
id: ID
|
||||||
|
price: Price
|
||||||
deliveryPanel:
|
deliveryPanel:
|
||||||
pickup: Pick up
|
pickup: Pick up
|
||||||
delivery: Delivery
|
delivery: Delivery
|
||||||
|
|
|
@ -45,6 +45,8 @@ summary:
|
||||||
filterPanel:
|
filterPanel:
|
||||||
name: Nombre
|
name: Nombre
|
||||||
agencyModeFk: Agencia
|
agencyModeFk: Agencia
|
||||||
|
id: ID
|
||||||
|
price: Precio
|
||||||
deliveryPanel:
|
deliveryPanel:
|
||||||
pickup: Recogida
|
pickup: Recogida
|
||||||
delivery: Entrega
|
delivery: Entrega
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
reports/*
|
reports/*
|
||||||
|
videos/*
|
||||||
screenshots/*
|
screenshots/*
|
||||||
downloads/*
|
downloads/*
|
||||||
|
storage/*
|
||||||
|
reports/*
|
||||||
|
docker/logs/*
|
||||||
|
|
|
@ -0,0 +1,149 @@
|
||||||
|
{
|
||||||
|
"db": {
|
||||||
|
"connector": "memory",
|
||||||
|
"timezone": "local"
|
||||||
|
},
|
||||||
|
"vn": {
|
||||||
|
"connector": "vn-mysql",
|
||||||
|
"database": "vn",
|
||||||
|
"debug": false,
|
||||||
|
"host": "db",
|
||||||
|
"port": "3306",
|
||||||
|
"username": "root",
|
||||||
|
"password": "root",
|
||||||
|
"connectionLimit": 100,
|
||||||
|
"queueLimit": 100,
|
||||||
|
"multipleStatements": true,
|
||||||
|
"legacyUtcDateProcessing": false,
|
||||||
|
"timezone": "local",
|
||||||
|
"connectTimeout": 40000,
|
||||||
|
"acquireTimeout": 90000,
|
||||||
|
"waitForConnections": true,
|
||||||
|
"maxIdleTime": 60000,
|
||||||
|
"idleTimeout": 60000
|
||||||
|
},
|
||||||
|
"osticket": {
|
||||||
|
"connector": "memory",
|
||||||
|
"timezone": "local"
|
||||||
|
},
|
||||||
|
"tempStorage": {
|
||||||
|
"name": "tempStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/tmp",
|
||||||
|
"maxFileSize": "262144000",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"application/x-7z-compressed",
|
||||||
|
"application/x-zip-compressed",
|
||||||
|
"application/x-rar-compressed",
|
||||||
|
"application/octet-stream",
|
||||||
|
"application/pdf",
|
||||||
|
"application/zip",
|
||||||
|
"application/rar",
|
||||||
|
"multipart/x-zip",
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp",
|
||||||
|
"video/mp4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dmsStorage": {
|
||||||
|
"name": "dmsStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/dms",
|
||||||
|
"maxFileSize": "262144000",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"application/x-7z-compressed",
|
||||||
|
"application/x-zip-compressed",
|
||||||
|
"application/x-rar-compressed",
|
||||||
|
"application/octet-stream",
|
||||||
|
"application/pdf",
|
||||||
|
"application/zip",
|
||||||
|
"application/rar",
|
||||||
|
"multipart/x-zip",
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"imageStorage": {
|
||||||
|
"name": "imageStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/image",
|
||||||
|
"maxFileSize": "52428800",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"invoiceStorage": {
|
||||||
|
"name": "invoiceStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/pdfs/invoice",
|
||||||
|
"maxFileSize": "52428800",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"application/octet-stream",
|
||||||
|
"application/pdf"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"claimStorage": {
|
||||||
|
"name": "claimStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/dms",
|
||||||
|
"maxFileSize": "31457280",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp",
|
||||||
|
"video/mp4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"entryStorage": {
|
||||||
|
"name": "entryStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/dms",
|
||||||
|
"maxFileSize": "31457280",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp",
|
||||||
|
"video/mp4"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"supplierStorage": {
|
||||||
|
"name": "supplierStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/dms",
|
||||||
|
"maxFileSize": "31457280",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"image/png",
|
||||||
|
"image/jpeg",
|
||||||
|
"image/jpg",
|
||||||
|
"image/webp",
|
||||||
|
"video/mp4",
|
||||||
|
"application/pdf"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"accessStorage": {
|
||||||
|
"name": "accessStorage",
|
||||||
|
"connector": "loopback-component-storage",
|
||||||
|
"provider": "filesystem",
|
||||||
|
"root": "./storage/access",
|
||||||
|
"maxFileSize": "524288000",
|
||||||
|
"allowedContentTypes": [
|
||||||
|
"application/x-7z-compressed"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
back:
|
||||||
|
image: 'registry.verdnatura.es/salix-back:${COMPOSE_TAG:-dev}'
|
||||||
|
volumes:
|
||||||
|
- ./test/cypress/storage:/salix/storage
|
||||||
|
- ./test/cypress/back/datasources.json:/salix/loopback/server/datasources.json
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
dns_search: .
|
||||||
|
front:
|
||||||
|
image: lilium-dev:latest
|
||||||
|
command: pnpm exec quasar dev
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
environment:
|
||||||
|
- CI
|
||||||
|
- TZ
|
||||||
|
dns_search: .
|
||||||
|
db:
|
||||||
|
image: 'registry.verdnatura.es/salix-db:${COMPOSE_TAG:-dev}'
|
|
@ -41,7 +41,7 @@ describe('OrderCatalog', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
cy.get(
|
cy.get(
|
||||||
'[data-cy="vn-searchbar"] > .q-field > .q-field__inner > .q-field__control'
|
'[data-cy="vn-searchbar"] > .q-field > .q-field__inner > .q-field__control',
|
||||||
).type('{enter}');
|
).type('{enter}');
|
||||||
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
cy.get(':nth-child(1) > [data-cy="catalogFilterCategory"]').click();
|
||||||
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
cy.dataCy('catalogFilterValueDialogBtn').last().click();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('ClaimAction', () => {
|
describe('ClaimAction', () => {
|
||||||
const claimId = 2;
|
const claimId = 1;
|
||||||
|
|
||||||
const firstRow = 'tbody > :nth-child(1)';
|
const firstRow = 'tbody > :nth-child(1)';
|
||||||
const destinationRow = '.q-item__section > .q-field';
|
const destinationRow = '.q-item__section > .q-field';
|
||||||
|
@ -24,9 +24,9 @@ describe('ClaimAction', () => {
|
||||||
const rowData = [true];
|
const rowData = [true];
|
||||||
|
|
||||||
cy.fillRow(firstRow, rowData);
|
cy.fillRow(firstRow, rowData);
|
||||||
cy.get('[title="Change destination"]').click();
|
cy.get('[title="Change destination"]').click({ force: true });
|
||||||
cy.selectOption(destinationRow, 'Confeccion');
|
cy.selectOption(destinationRow, 'Confeccion');
|
||||||
cy.get('.q-card > .q-card__actions > .q-btn--standard').click();
|
cy.get('.q-card > .q-card__actions > .q-btn--standard').click({ force: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should regularize', () => {
|
it('should regularize', () => {
|
||||||
|
|
|
@ -35,8 +35,7 @@ describe('ClaimDevelopment', () => {
|
||||||
cy.saveCard();
|
cy.saveCard();
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: #8112
|
it('should add and remove new line', () => {
|
||||||
xit('should add and remove new line', () => {
|
|
||||||
cy.wait(['@workers', '@workers']);
|
cy.wait(['@workers', '@workers']);
|
||||||
cy.addCard();
|
cy.addCard();
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
describe('ClaimNotes', () => {
|
describe.skip('ClaimNotes', () => {
|
||||||
const saveBtn = '.q-field__append > .q-btn > .q-btn__content > .q-icon';
|
const saveBtn = '.q-field__append > .q-btn > .q-btn__content > .q-icon';
|
||||||
const firstNote = '.q-infinite-scroll :nth-child(1) > .q-card__section--vert';
|
const firstNote = '.q-infinite-scroll :nth-child(1) > .q-card__section--vert';
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -8,7 +8,8 @@ describe('ClaimNotes', () => {
|
||||||
|
|
||||||
it('should add a new note', () => {
|
it('should add a new note', () => {
|
||||||
const message = 'This is a new message.';
|
const message = 'This is a new message.';
|
||||||
cy.get('.q-textarea').type(message);
|
cy.get('.q-textarea').should('not.be.disabled').type(message);
|
||||||
|
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.get(firstNote).should('have.text', message);
|
cy.get(firstNote).should('have.text', message);
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,37 +23,35 @@ describe.skip('ClaimPhoto', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open first image dialog change to second and close', () => {
|
it('should open first image dialog change to second and close', () => {
|
||||||
cy.get(
|
cy.get(':nth-last-child(1) > .q-card').click();
|
||||||
':nth-child(1) > .q-card > .q-img > .q-img__container > .q-img__image'
|
|
||||||
).click();
|
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
||||||
'be.visible'
|
'be.visible',
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('.q-carousel__control > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('.q-carousel__control > button').click();
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon'
|
'.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
|
||||||
'not.be.visible'
|
'not.be.visible',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should remove third and fourth file', () => {
|
it('should remove third and fourth file', () => {
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
|
||||||
).click();
|
).click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
|
|
||||||
cy.get(
|
cy.get(
|
||||||
'.multimediaParent > :nth-child(3) > .q-btn > .q-btn__content > .q-icon'
|
'.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
|
||||||
).click();
|
).click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
cy.get('.q-notification__message').should('have.text', 'Data deleted');
|
||||||
});
|
});
|
||||||
|
|
|
@ -4,7 +4,6 @@ describe('Client consignee', () => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('#/customer/1107/address');
|
cy.visit('#/customer/1107/address');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('Client basic data', () => {
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
cy.dataCy('customerPhone').find('input').should('be.visible');
|
cy.dataCy('customerPhone').find('input').should('be.visible');
|
||||||
cy.dataCy('customerPhone').find('input').type('123456789');
|
cy.dataCy('customerPhone').find('input').clear().type('123456789');
|
||||||
cy.get('.q-btn-group > .q-btn--standard').click();
|
cy.get('.q-btn-group > .q-btn--standard').click();
|
||||||
cy.intercept('PATCH', '/api/Clients/1102', (req) => {
|
cy.intercept('PATCH', '/api/Clients/1102', (req) => {
|
||||||
const { body } = req;
|
const { body } = req;
|
||||||
|
|
|
@ -4,7 +4,6 @@ describe('Client fiscal data', () => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('#/customer/1107/fiscal-data');
|
cy.visit('#/customer/1107/fiscal-data');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
it('Should change required value when change customer', () => {
|
it('Should change required value when change customer', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-card').should('be.visible');
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('Client list', () => {
|
describe('Client list', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/customer/list', {
|
cy.visit('/#/customer/list', {
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
@ -28,7 +27,7 @@ describe('Client list', () => {
|
||||||
Email: { val: `user.test${randomInt}@cypress.com` },
|
Email: { val: `user.test${randomInt}@cypress.com` },
|
||||||
'Sales person': { val: 'salesPerson', type: 'select' },
|
'Sales person': { val: 'salesPerson', type: 'select' },
|
||||||
Location: { val: '46000', type: 'select' },
|
Location: { val: '46000', type: 'select' },
|
||||||
'Business type': { val: 'Otros', type: 'select' },
|
'Business type': { val: 'others', type: 'select' },
|
||||||
};
|
};
|
||||||
cy.fillInForm(data);
|
cy.fillInForm(data);
|
||||||
|
|
||||||
|
@ -37,6 +36,7 @@ describe('Client list', () => {
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
cy.url().should('include', '/summary');
|
cy.url().should('include', '/summary');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client list search client', () => {
|
it('Client list search client', () => {
|
||||||
const search = 'Jessica Jones';
|
const search = 'Jessica Jones';
|
||||||
cy.searchByLabel('Name', search);
|
cy.searchByLabel('Name', search);
|
||||||
|
@ -59,6 +59,7 @@ describe('Client list', () => {
|
||||||
cy.checkValueForm(1, search);
|
cy.checkValueForm(1, search);
|
||||||
cy.checkValueForm(2, search);
|
cy.checkValueForm(2, search);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client founded create order', () => {
|
it('Client founded create order', () => {
|
||||||
const search = 'Jessica Jones';
|
const search = 'Jessica Jones';
|
||||||
cy.searchByLabel('Name', search);
|
cy.searchByLabel('Name', search);
|
||||||
|
|
|
@ -184,9 +184,8 @@ describe('Entry', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteEntry() {
|
function deleteEntry() {
|
||||||
cy.get('[data-cy="descriptor-more-opts"]').click();
|
cy.get('[data-cy="descriptor-more-opts"]').should('be.visible').click();
|
||||||
cy.waitForElement('div[data-cy="delete-entry"]');
|
cy.waitForElement('div[data-cy="delete-entry"]').click();
|
||||||
cy.get('div[data-cy="delete-entry"]').should('be.visible').click();
|
|
||||||
cy.url().should('include', 'list');
|
cy.url().should('include', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,11 +8,9 @@ describe('EntryMy when is supplier', () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open buyLabel when is supplier', () => {
|
it('should open buyLabel when is supplier', () => {
|
||||||
cy.get(
|
cy.dataCy('cardBtn').eq(2).click();
|
||||||
'[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon'
|
|
||||||
).click();
|
|
||||||
cy.dataCy('printLabelsBtn').click();
|
cy.dataCy('printLabelsBtn').click();
|
||||||
cy.window().its('open').should('be.called');
|
cy.window().its('open').should('be.called');
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,16 +9,16 @@ describe('EntryStockBought', () => {
|
||||||
cy.get('[data-col-field="reserve"][data-row-index="0"]').click();
|
cy.get('[data-col-field="reserve"][data-row-index="0"]').click();
|
||||||
cy.get('input[name="reserve"]').type('10{enter}');
|
cy.get('input[name="reserve"]').type('10{enter}');
|
||||||
cy.get('button[title="Save"]').click();
|
cy.get('button[title="Save"]').click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.checkNotification('Data saved');
|
||||||
});
|
});
|
||||||
it('Should add a new reserved space for buyerBoss', () => {
|
it('Should add a new reserved space for buyerBoss', () => {
|
||||||
cy.addBtnClick();
|
cy.addBtnClick();
|
||||||
cy.get('input[aria-label="Reserve"]').type('1');
|
cy.get('input[aria-label="Reserve"]').type('1');
|
||||||
cy.get('input[aria-label="Date"]').eq(1).clear();
|
cy.get('input[aria-label="Date"]').eq(1).clear();
|
||||||
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
||||||
cy.get('input[aria-label="Buyer"]').type('buyerBossNick');
|
cy.get('input[aria-label="Buyer"]').type('itNick');
|
||||||
cy.get('div[role="listbox"] > div > div[role="option"]')
|
cy.get('div[role="listbox"] > div > div[role="option"]')
|
||||||
.eq(0)
|
.eq(1)
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe('InvoiceInList', () => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/list`);
|
cy.visit(`/#/invoice-in/list`);
|
||||||
cy.get('#searchbar input').should('be.visible').type('{enter}');
|
cy.get('#searchbar input').type('{enter}');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should redirect on clicking a invoice', () => {
|
it('should redirect on clicking a invoice', () => {
|
||||||
|
@ -21,7 +21,7 @@ describe('InvoiceInList', () => {
|
||||||
cy.url().should('include', `/invoice-in/${id}/summary`);
|
cy.url().should('include', `/invoice-in/${id}/summary`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// https://redmine.verdnatura.es/issues/8420
|
|
||||||
it('should open the details', () => {
|
it('should open the details', () => {
|
||||||
cy.get(firstDetailBtn).click();
|
cy.get(firstDetailBtn).click();
|
||||||
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
cy.get(summaryHeaders).eq(1).contains('Basic data');
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceOut list', () => {
|
describe('InvoiceOut list', () => {
|
||||||
const serial = 'Española rapida';
|
const serial = 'Española rapida';
|
||||||
|
const columnCheckbox =
|
||||||
|
'.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner';
|
||||||
|
const firstRowDescriptor =
|
||||||
|
'tbody > :nth-child(1) > [data-col-field="clientFk"] > .no-padding > .link';
|
||||||
|
const firstRowCheckbox =
|
||||||
|
'tbody > :nth-child(1) > :nth-child(1) > .q-checkbox > .q-checkbox__inner ';
|
||||||
|
const summaryPopupIcon = '.header > :nth-child(2) > .q-btn__content > .q-icon';
|
||||||
|
const filterBtn = '.q-scrollarea__content > .q-btn--standard > .q-btn__content';
|
||||||
|
const firstSummaryIcon =
|
||||||
|
':nth-child(1) > .text-right > [data-cy="tableAction-0"] > .q-btn__content > .q-icon';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
@ -9,18 +19,32 @@ describe('InvoiceOut list', () => {
|
||||||
cy.typeSearchbar('{enter}');
|
cy.typeSearchbar('{enter}');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should search and filter an invoice and enter to the summary', () => {
|
it('should download one pdf from the subtoolbar button', () => {
|
||||||
cy.typeSearchbar('1{enter}');
|
cy.get(firstRowCheckbox).click();
|
||||||
cy.get('.q-virtual-scroll__content > :nth-child(2) > :nth-child(7)').click();
|
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
|
||||||
cy.get('.header > a.q-btn > .q-btn__content').click();
|
|
||||||
cy.typeSearchbar('{enter}');
|
|
||||||
cy.dataCy('InvoiceOutFilterAmountBtn').find('input').type('8.88{enter}');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should download all pdfs', () => {
|
it('should download all pdfs', () => {
|
||||||
cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
|
cy.get(columnCheckbox).click();
|
||||||
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
|
cy.dataCy('InvoiceOutDownloadPdfBtn').click();
|
||||||
cy.get('.bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner').click();
|
});
|
||||||
|
|
||||||
|
it('should open the invoice descriptor from table icon', () => {
|
||||||
|
cy.get(firstSummaryIcon).click();
|
||||||
|
cy.get('.cardSummary').should('be.visible');
|
||||||
|
cy.get('.summaryHeader > div').should('include.text', 'A1111111');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should open the client descriptor', () => {
|
||||||
|
cy.get(firstRowDescriptor).click();
|
||||||
|
cy.get(summaryPopupIcon).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should filter the results by client ID, then check the first result is correct', () => {
|
||||||
|
cy.dataCy('Customer ID_input').type('1103');
|
||||||
|
cy.get(filterBtn).click();
|
||||||
|
cy.get(firstRowDescriptor).click();
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '1103');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should give an error when manual invoicing a ticket that is already invoiced', () => {
|
it('should give an error when manual invoicing a ticket that is already invoiced', () => {
|
||||||
|
@ -31,11 +55,14 @@ describe('InvoiceOut list', () => {
|
||||||
cy.checkNotification('This ticket is already invoiced');
|
cy.checkNotification('This ticket is already invoiced');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a manual invoice and enter to its summary', () => {
|
it('should create a manual invoice and enter to its summary, then delete that invoice', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').click();
|
cy.dataCy('vnTableCreateBtn').click();
|
||||||
cy.dataCy('InvoiceOutCreateTicketinput').type(8);
|
cy.dataCy('InvoiceOutCreateTicketinput').type(9);
|
||||||
cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial);
|
cy.selectOption('[data-cy="InvoiceOutCreateSerialSelect"]', serial);
|
||||||
cy.dataCy('FormModelPopup_save').click();
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get('.q-menu > .q-list > :nth-child(4)').click();
|
||||||
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,11 +1,26 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceOut negative bases', () => {
|
describe('InvoiceOut negative bases', () => {
|
||||||
|
const getDescriptors = (opt) =>
|
||||||
|
`:nth-child(1) > [data-col-field="${opt}"] > .no-padding > .link`;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-out/negative-bases`);
|
cy.visit(`/#/invoice-out/negative-bases`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should open the posible descriptors', () => {
|
||||||
|
cy.get(getDescriptors('clientId')).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
||||||
|
cy.get(getDescriptors('ticketFk')).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '23');
|
||||||
|
cy.get(getDescriptors('workerName')).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '18');
|
||||||
|
});
|
||||||
|
|
||||||
it('should filter and download as CSV', () => {
|
it('should filter and download as CSV', () => {
|
||||||
cy.get('input[name="ticketFk"]').type('23{enter}');
|
cy.get('input[name="ticketFk"]').type('23{enter}');
|
||||||
cy.get('#subToolbar > .q-btn').click();
|
cy.get('#subToolbar > .q-btn').click();
|
||||||
|
|
|
@ -5,40 +5,91 @@ describe('InvoiceOut summary', () => {
|
||||||
Type: { val: 'Error in customer data', type: 'select' },
|
Type: { val: 'Error in customer data', type: 'select' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const firstRowDescriptors = (opt) =>
|
||||||
|
`tbody > :nth-child(1) > :nth-child(${opt}) > .q-btn`;
|
||||||
|
const toCustomerSummary = '[href="#/customer/1101"]';
|
||||||
|
const toTicketList = '[href="#/ticket/list?table={%22refFk%22:%22T1111111%22}"]';
|
||||||
|
const selectMenuOption = (opt) => `.q-menu > .q-list > :nth-child(${opt})`;
|
||||||
|
const confirmSend = '.q-btn--unelevated';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-out/list`);
|
cy.visit(`/#/invoice-out/1/summary`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should generate the invoice PDF', () => {
|
it('open the descriptors', () => {
|
||||||
cy.typeSearchbar('T1111111{enter}');
|
cy.get(firstRowDescriptors(1)).click();
|
||||||
cy.dataCy('descriptor-more-opts').click();
|
cy.get('.descriptor').should('be.visible');
|
||||||
cy.get('.q-menu > .q-list > :nth-child(6)').click();
|
cy.get('.q-item > .q-item__label').should('include.text', '1');
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.get(firstRowDescriptors(2)).click();
|
||||||
cy.checkNotification('The invoice PDF document has been regenerated');
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
||||||
});
|
});
|
||||||
it('should refund the invoice ', () => {
|
|
||||||
|
it('should open the client summary and the ticket list', () => {
|
||||||
|
cy.get(toCustomerSummary).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.get('.q-item > .q-item__label').should('include.text', '1101');
|
||||||
|
});
|
||||||
|
|
||||||
|
it.skip('should open the ticket list', () => {
|
||||||
|
cy.get(toTicketList).click();
|
||||||
|
cy.get('.descriptor').should('be.visible');
|
||||||
|
cy.dataCy('vnFilterPanelChip').should('include.text', 'T1111111');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should transfer the invoice ', () => {
|
||||||
cy.typeSearchbar('T1111111{enter}');
|
cy.typeSearchbar('T1111111{enter}');
|
||||||
cy.dataCy('descriptor-more-opts').click();
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
cy.get('.q-menu > .q-list > :nth-child(7)').click();
|
cy.get(selectMenuOption(1)).click();
|
||||||
cy.get('#q-portal--menu--3 > .q-menu > .q-list > :nth-child(2)').click();
|
cy.fillInForm(transferInvoice);
|
||||||
cy.checkNotification('The following refund ticket have been created');
|
cy.get('.q-mt-lg > .q-btn').click();
|
||||||
|
cy.checkNotification('Transferred invoice');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should send the invoice as PDF', () => {
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(selectMenuOption(3)).click();
|
||||||
|
cy.dataCy('InvoiceOutDescriptorMenuSendPdfOption').click();
|
||||||
|
cy.get(confirmSend).click();
|
||||||
|
cy.checkNotification('Notification sent');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should send the invoice as CSV', () => {
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(selectMenuOption(3)).click();
|
||||||
|
cy.dataCy('InvoiceOutDescriptorMenuSendCsvOption').click();
|
||||||
|
cy.get(confirmSend).click();
|
||||||
|
cy.checkNotification('Notification sent');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should delete an invoice ', () => {
|
it('should delete an invoice ', () => {
|
||||||
cy.typeSearchbar('T2222222{enter}');
|
cy.typeSearchbar('T2222222{enter}');
|
||||||
cy.dataCy('descriptor-more-opts').click();
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
cy.get('.q-menu > .q-list > :nth-child(4)').click();
|
cy.get(selectMenuOption(4)).click();
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
cy.checkNotification('InvoiceOut deleted');
|
cy.checkNotification('InvoiceOut deleted');
|
||||||
});
|
});
|
||||||
it('should transfer the invoice ', () => {
|
|
||||||
cy.typeSearchbar('T1111111{enter}');
|
it('should book the invoice', () => {
|
||||||
cy.dataCy('descriptor-more-opts').click();
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
cy.get('.q-menu > .q-list > :nth-child(1)').click();
|
cy.get(selectMenuOption(5)).click();
|
||||||
cy.fillInForm(transferInvoice);
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
cy.get('.q-mt-lg > .q-btn').click();
|
cy.checkNotification('InvoiceOut booked');
|
||||||
cy.checkNotification('Transferred invoice');
|
});
|
||||||
|
|
||||||
|
it('should generate the invoice PDF', () => {
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(selectMenuOption(6)).click();
|
||||||
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
|
cy.checkNotification('The invoice PDF document has been regenerated');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should refund the invoice ', () => {
|
||||||
|
cy.dataCy('descriptor-more-opts').click();
|
||||||
|
cy.get(selectMenuOption(7)).click();
|
||||||
|
cy.get('#q-portal--menu--3 > .q-menu > .q-list > :nth-child(2)').click();
|
||||||
|
cy.checkNotification('The following refund ticket have been created');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('Handle Items FixedPrice', () => {
|
||||||
cy.visit('/#/item/fixed-price', { timeout: 5000 });
|
cy.visit('/#/item/fixed-price', { timeout: 5000 });
|
||||||
cy.waitForElement('.q-table');
|
cy.waitForElement('.q-table');
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
|
'.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon',
|
||||||
).click();
|
).click();
|
||||||
});
|
});
|
||||||
it.skip('filter', function () {
|
it.skip('filter', function () {
|
||||||
|
@ -38,7 +38,7 @@ describe('Handle Items FixedPrice', () => {
|
||||||
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
|
||||||
cy.get(`${firstRow} > .text-right > .q-btn > .q-btn__content > .q-icon`).click();
|
cy.get(`${firstRow} > .text-right > .q-btn > .q-btn__content > .q-icon`).click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ describe('Handle Items FixedPrice', () => {
|
||||||
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
|
||||||
cy.get('#subToolbar > .q-btn--flat').click();
|
cy.get('#subToolbar > .q-btn--flat').click();
|
||||||
cy.get(
|
cy.get(
|
||||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
|
||||||
).click();
|
).click();
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,6 +15,7 @@ describe('Item list', () => {
|
||||||
cy.get('.q-menu .q-item').contains('Anthurium').click();
|
cy.get('.q-menu .q-item').contains('Anthurium').click();
|
||||||
cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click();
|
cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
// https://redmine.verdnatura.es/issues/8421
|
// https://redmine.verdnatura.es/issues/8421
|
||||||
it.skip('should create an item', () => {
|
it.skip('should create an item', () => {
|
||||||
const data = {
|
const data = {
|
||||||
|
@ -28,7 +29,7 @@ describe('Item list', () => {
|
||||||
cy.dataCy('FormModelPopup_save').click();
|
cy.dataCy('FormModelPopup_save').click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
cy.get(
|
cy.get(
|
||||||
':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content'
|
':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content',
|
||||||
).should('be.visible');
|
).should('be.visible');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,7 +24,7 @@ describe('Recover Password', () => {
|
||||||
it('should change password to user', () => {
|
it('should change password to user', () => {
|
||||||
// Get token from mail
|
// Get token from mail
|
||||||
cy.request(
|
cy.request(
|
||||||
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
`/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
const regex = /access_token=([a-zA-Z0-9]+)/;
|
const regex = /access_token=([a-zA-Z0-9]+)/;
|
||||||
const [match] = response.body[0].body.match(regex);
|
const [match] = response.body[0].body.match(regex);
|
||||||
|
|
|
@ -11,7 +11,7 @@ describe('Two Factor', () => {
|
||||||
it('should enable two factor to sysadmin', () => {
|
it('should enable two factor to sysadmin', () => {
|
||||||
cy.request(
|
cy.request(
|
||||||
'PATCH',
|
'PATCH',
|
||||||
`http://localhost:3000/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`,
|
`/api/VnUsers/${userId}/update-user?access_token=DEFAULT_TOKEN`,
|
||||||
{ twoFactor: 'email' }
|
{ twoFactor: 'email' }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ describe('Two Factor', () => {
|
||||||
|
|
||||||
// Get code from mail
|
// Get code from mail
|
||||||
cy.request(
|
cy.request(
|
||||||
`http://localhost:3000/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
`/api/Mails?filter=%7B%22where%22%3A%20%7B%22receiver%22%3A%20%22${username}%40mydomain.com%22%7D%2C%20%22order%22%3A%20%5B%22id%20DESC%22%5D%7D&access_token=DEFAULT_TOKEN`
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
const tempDiv = document.createElement('div');
|
const tempDiv = document.createElement('div');
|
||||||
tempDiv.innerHTML = response.body[0].body;
|
tempDiv.innerHTML = response.body[0].body;
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
/// <reference types="cypress" />
|
|
||||||
describe('ParkingBasicData', () => {
|
|
||||||
const codeInput = 'form .q-card .q-input input';
|
|
||||||
const sectorSelect = 'form .q-card .q-select input';
|
|
||||||
const sectorOpt = '.q-menu .q-item';
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.login('developer');
|
|
||||||
cy.visit(`/#/shelving/parking/1/basic-data`);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should edit the code and sector', () => {
|
|
||||||
cy.get(sectorSelect).type('Second');
|
|
||||||
cy.get(sectorOpt).click();
|
|
||||||
|
|
||||||
cy.get(codeInput).eq(0).clear();
|
|
||||||
cy.get(codeInput).eq(0).type('900-001');
|
|
||||||
|
|
||||||
cy.saveCard();
|
|
||||||
|
|
||||||
cy.get(sectorSelect).should('have.value', 'Second sector');
|
|
||||||
cy.get(codeInput).should('have.value', '900-001');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,33 +0,0 @@
|
||||||
/// <reference types="cypress" />
|
|
||||||
describe('ParkingList', () => {
|
|
||||||
const searchbar = '#searchbar input';
|
|
||||||
const firstCard = '.q-card:nth-child(1)';
|
|
||||||
const firstChipId =
|
|
||||||
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
|
||||||
const firstDetailBtn =
|
|
||||||
':nth-child(1) > :nth-child(1) > .card-list-body > .actions > .q-btn';
|
|
||||||
const summaryHeader = '.summaryBody .header';
|
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.viewport(1920, 1080);
|
|
||||||
cy.login('developer');
|
|
||||||
cy.visit(`/#/shelving/parking/list`);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should redirect on clicking a parking', () => {
|
|
||||||
cy.get(searchbar).type('{enter}');
|
|
||||||
cy.get(firstChipId)
|
|
||||||
.invoke('text')
|
|
||||||
.then((content) => {
|
|
||||||
const id = content.substring(4);
|
|
||||||
cy.get(firstCard).click();
|
|
||||||
cy.url().should('include', `/parking/${id}/summary`);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should open the details', () => {
|
|
||||||
cy.get(searchbar).type('{enter}');
|
|
||||||
cy.get(firstDetailBtn).click();
|
|
||||||
cy.get(summaryHeader).contains('Basic data');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,4 +1,4 @@
|
||||||
describe('AgencyWorkCenter', () => {
|
describe.skip('AgencyWorkCenter', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
describe('RouteAutonomous', () => {
|
||||||
|
const getLinkSelector = (colField) =>
|
||||||
|
`tr:first-child > [data-col-field="${colField}"] > .no-padding > .link`;
|
||||||
|
|
||||||
|
const selectors = {
|
||||||
|
reference: 'Reference_input',
|
||||||
|
date: 'tr:first-child > [data-col-field="dated"]',
|
||||||
|
total: '.value > .text-h6',
|
||||||
|
received: getLinkSelector('invoiceInFk'),
|
||||||
|
autonomous: getLinkSelector('supplierName'),
|
||||||
|
firstRowCheckbox: '.q-virtual-scroll__content tr:first-child .q-checkbox__bg',
|
||||||
|
secondRowCheckbox: '.q-virtual-scroll__content tr:nth-child(2) .q-checkbox__bg',
|
||||||
|
createInvoiceBtn: '.q-card > .q-btn',
|
||||||
|
saveFormBtn: 'FormModelPopup_save',
|
||||||
|
summaryIcon: 'tableAction-0',
|
||||||
|
summaryPopupBtn: '.header > :nth-child(2) > .q-btn__content > .q-icon',
|
||||||
|
summaryHeader: '.summaryHeader > :nth-child(2)',
|
||||||
|
descriptorHeader: '.summaryHeader > div',
|
||||||
|
descriptorTitle: '.q-item__label--header > .title > span',
|
||||||
|
summaryGoToSummaryBtn: '.header > .q-icon',
|
||||||
|
descriptorGoToSummaryBtn: '.descriptor > .header > a[href] > .q-btn',
|
||||||
|
};
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
reference: 'Test invoice',
|
||||||
|
total: '€206.40',
|
||||||
|
supplier: 'PLANTS SL',
|
||||||
|
route: 'first route',
|
||||||
|
};
|
||||||
|
|
||||||
|
const summaryUrl = '/summary';
|
||||||
|
const dataSaved = 'Data saved';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/route/agency-term`);
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should list autonomous routes', () => {
|
||||||
|
cy.get('.q-table')
|
||||||
|
.children()
|
||||||
|
.should('be.visible')
|
||||||
|
.should('have.length.greaterThan', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should create invoice in to selected route', () => {
|
||||||
|
cy.get(selectors.firstRowCheckbox).click();
|
||||||
|
cy.get(selectors.createInvoiceBtn).click();
|
||||||
|
cy.dataCy(selectors.reference).type(data.reference);
|
||||||
|
cy.get('.q-file').selectFile('test/cypress/fixtures/image.jpg', {
|
||||||
|
force: true,
|
||||||
|
});
|
||||||
|
cy.dataCy(selectors.saveFormBtn).click();
|
||||||
|
cy.checkNotification(dataSaved);
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should display the total price of the selected rows', () => {
|
||||||
|
cy.get(selectors.firstRowCheckbox).click();
|
||||||
|
cy.get(selectors.secondRowCheckbox).click();
|
||||||
|
cy.validateContent(selectors.total, data.total);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the summary when clicking a route', () => {
|
||||||
|
cy.get(selectors.date).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.route);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Received pop-ups', () => {
|
||||||
|
it('Should redirect to invoice in summary from the received descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.received).click();
|
||||||
|
cy.validateContent(selectors.descriptorTitle, data.reference);
|
||||||
|
cy.get(selectors.descriptorGoToSummaryBtn).click();
|
||||||
|
cy.get(selectors.descriptorHeader).should('contain', data.supplier);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the invoiceIn summary from summary pop-up from the received descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.received).click();
|
||||||
|
cy.validateContent(selectors.descriptorTitle, data.reference);
|
||||||
|
cy.get(selectors.summaryPopupBtn).click();
|
||||||
|
cy.get(selectors.descriptorHeader).should('contain', data.supplier);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).click();
|
||||||
|
cy.get(selectors.descriptorHeader).should('contain', data.supplier);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Autonomous pop-ups', () => {
|
||||||
|
it('Should redirect to the supplier summary from the received descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.autonomous).click();
|
||||||
|
cy.validateContent(selectors.descriptorTitle, data.supplier);
|
||||||
|
cy.get(selectors.descriptorGoToSummaryBtn).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.supplier);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the supplier summary from summary pop-up from the autonomous descriptor pop-up', () => {
|
||||||
|
cy.get(selectors.autonomous).click();
|
||||||
|
cy.get(selectors.descriptorTitle).should('contain', data.supplier);
|
||||||
|
cy.get(selectors.summaryPopupBtn).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.supplier);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.supplier);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('Route pop-ups', () => {
|
||||||
|
it('Should redirect to the summary from the route summary pop-up', () => {
|
||||||
|
cy.dataCy(selectors.summaryIcon).first().click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.route);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', data.route);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,205 @@
|
||||||
|
describe.skip('Route extended list', () => {
|
||||||
|
const getSelector = (colField) => `tr:last-child > [data-col-field="${colField}"]`;
|
||||||
|
|
||||||
|
const selectors = {
|
||||||
|
worker: getSelector('workerFk'),
|
||||||
|
agency: getSelector('agencyModeFk'),
|
||||||
|
vehicle: getSelector('vehicleFk'),
|
||||||
|
date: getSelector('dated'),
|
||||||
|
description: getSelector('description'),
|
||||||
|
served: getSelector('isOk'),
|
||||||
|
lastRowSelectCheckBox: 'tbody > tr:last-child > :nth-child(1) .q-checkbox__inner',
|
||||||
|
removeBtn: '[title="Remove"]',
|
||||||
|
resetBtn: '[title="Reset"]',
|
||||||
|
confirmBtn: 'VnConfirm_confirm',
|
||||||
|
saveBtn: 'crudModelDefaultSaveBtn',
|
||||||
|
saveFormBtn: 'FormModelPopup_save',
|
||||||
|
cloneBtn: '#st-actions > .q-btn-group > :nth-child(1)',
|
||||||
|
downloadBtn: '#st-actions > .q-btn-group > :nth-child(2)',
|
||||||
|
markServedBtn: '#st-actions > .q-btn-group > :nth-child(3)',
|
||||||
|
searchbar: 'searchbar',
|
||||||
|
firstTicketsRowSelectCheckBox:
|
||||||
|
'.q-card > :nth-child(2) > .q-table__container > .q-table__middle > .q-table > tbody > :nth-child(1) > .q-table--col-auto-width > .q-checkbox > .q-checkbox__inner > .q-checkbox__bg > .q-checkbox__svg',
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkboxState = {
|
||||||
|
check: 'check',
|
||||||
|
uncheck: 'close',
|
||||||
|
};
|
||||||
|
const url = '/#/route/extended-list';
|
||||||
|
const dataCreated = 'Data created';
|
||||||
|
const dataSaved = 'Data saved';
|
||||||
|
|
||||||
|
const originalFields = [
|
||||||
|
{ selector: selectors.worker, type: 'select', value: 'logistic' },
|
||||||
|
{ selector: selectors.agency, type: 'select', value: 'Super-Man delivery' },
|
||||||
|
{ selector: selectors.vehicle, type: 'select', value: '3333-IMK' },
|
||||||
|
{ selector: selectors.date, type: 'date', value: '01/02/2024' },
|
||||||
|
{ selector: selectors.description, type: 'input', value: 'Test route' },
|
||||||
|
{ selector: selectors.served, type: 'checkbox', value: checkboxState.uncheck },
|
||||||
|
];
|
||||||
|
|
||||||
|
const updateFields = [
|
||||||
|
{ selector: selectors.worker, type: 'select', value: 'salesperson' },
|
||||||
|
{ selector: selectors.agency, type: 'select', value: 'inhouse pickup' },
|
||||||
|
{ selector: selectors.vehicle, type: 'select', value: '1111-IMK' },
|
||||||
|
{ selector: selectors.date, type: 'date', value: '01/01/2001' },
|
||||||
|
{ selector: selectors.description, type: 'input', value: 'Description updated' },
|
||||||
|
{ selector: selectors.served, type: 'checkbox', value: checkboxState.check },
|
||||||
|
];
|
||||||
|
|
||||||
|
function fillField(selector, type, value) {
|
||||||
|
switch (type) {
|
||||||
|
case 'select':
|
||||||
|
cy.get(selector).should('be.visible').click();
|
||||||
|
cy.dataCy('null_select').clear().type(value);
|
||||||
|
cy.get('.q-item').contains(value).click();
|
||||||
|
break;
|
||||||
|
case 'input':
|
||||||
|
cy.get(selector).should('be.visible').click();
|
||||||
|
cy.dataCy('null_input').clear().type(`${value}{enter}`);
|
||||||
|
break;
|
||||||
|
case 'date':
|
||||||
|
cy.get(selector).should('be.visible').click();
|
||||||
|
cy.dataCy('null_inputDate').clear().type(`${value}{enter}`);
|
||||||
|
break;
|
||||||
|
case 'checkbox':
|
||||||
|
cy.get(selector).should('be.visible').click().click();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(url);
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
});
|
||||||
|
|
||||||
|
after(() => {
|
||||||
|
cy.visit(url);
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
|
|
||||||
|
cy.get(selectors.removeBtn).click();
|
||||||
|
cy.dataCy(selectors.confirmBtn).click();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should list routes', () => {
|
||||||
|
cy.get('.q-table')
|
||||||
|
.children()
|
||||||
|
.should('be.visible')
|
||||||
|
.should('have.length.greaterThan', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should create new route', () => {
|
||||||
|
cy.addBtnClick();
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
Worker: { val: 'logistic', type: 'select' },
|
||||||
|
Agency: { val: 'Super-Man delivery', type: 'select' },
|
||||||
|
Vehicle: { val: '3333-IMK', type: 'select' },
|
||||||
|
Date: { val: '02-01-2024', type: 'date' },
|
||||||
|
From: { val: '01-01-2024', type: 'date' },
|
||||||
|
To: { val: '10-01-2024', type: 'date' },
|
||||||
|
'Km start': { val: 1000 },
|
||||||
|
'Km end': { val: 1200 },
|
||||||
|
Description: { val: 'Test route' },
|
||||||
|
};
|
||||||
|
|
||||||
|
cy.fillInForm(data);
|
||||||
|
|
||||||
|
cy.dataCy(selectors.saveFormBtn).click();
|
||||||
|
cy.checkNotification(dataCreated);
|
||||||
|
cy.url().should('include', '/summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should reset changed values when click reset button', () => {
|
||||||
|
updateFields.forEach(({ selector, type, value }) => {
|
||||||
|
fillField(selector, type, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.get('[title="Reset"]').click();
|
||||||
|
|
||||||
|
originalFields.forEach(({ selector, value }) => {
|
||||||
|
cy.validateContent(selector, value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should clone selected route', () => {
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
|
cy.get(selectors.cloneBtn).click();
|
||||||
|
cy.dataCy('route.Starting date_inputDate').type('10-05-2001{enter}');
|
||||||
|
cy.get('.q-card__actions > .q-btn--standard > .q-btn__content').click();
|
||||||
|
cy.validateContent(selectors.date, '05/10/2001');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should download selected route', () => {
|
||||||
|
const downloadsFolder = Cypress.config('downloadsFolder');
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
|
cy.get(selectors.downloadBtn).click();
|
||||||
|
cy.wait(5000);
|
||||||
|
|
||||||
|
const fileName = 'download.zip';
|
||||||
|
cy.readFile(`${downloadsFolder}/${fileName}`).should('exist');
|
||||||
|
|
||||||
|
cy.task('deleteFile', `${downloadsFolder}/${fileName}`).then((deleted) => {
|
||||||
|
expect(deleted).to.be.true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should mark as served the selected route', () => {
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
|
cy.get(selectors.markServedBtn).click();
|
||||||
|
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
cy.validateContent(selectors.served, checkboxState.check);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should delete the selected route', () => {
|
||||||
|
cy.get(selectors.lastRowSelectCheckBox).click();
|
||||||
|
|
||||||
|
cy.get(selectors.removeBtn).click();
|
||||||
|
cy.dataCy(selectors.confirmBtn).click();
|
||||||
|
|
||||||
|
cy.checkNotification(dataSaved);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should save changes in route', () => {
|
||||||
|
updateFields.forEach(({ selector, type, value }) => {
|
||||||
|
fillField(selector, type, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
cy.dataCy(selectors.saveBtn).should('not.be.disabled').click();
|
||||||
|
cy.checkNotification(dataSaved);
|
||||||
|
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
|
||||||
|
updateFields.forEach(({ selector, value }) => {
|
||||||
|
cy.validateContent(selector, value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should add ticket to route', () => {
|
||||||
|
cy.dataCy('tableAction-0').last().click();
|
||||||
|
cy.get(selectors.firstTicketsRowSelectCheckBox).click();
|
||||||
|
cy.get('.q-card__actions > .q-btn--standard > .q-btn__content').click();
|
||||||
|
cy.checkNotification(dataSaved);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should open summary pop-up when click summuary icon', () => {
|
||||||
|
cy.dataCy('tableAction-1').last().click();
|
||||||
|
cy.get('.summaryHeader > :nth-child(2').should('contain', updateFields[4].value);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the summary from the route summary pop-up', () => {
|
||||||
|
cy.dataCy('tableAction-1').last().click();
|
||||||
|
cy.get('.header > .q-icon').should('be.visible').click();
|
||||||
|
cy.url().should('include', '/summary');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should redirect to the summary when click go to summary icon', () => {
|
||||||
|
cy.dataCy('tableAction-2').last().click();
|
||||||
|
cy.url().should('include', '/summary');
|
||||||
|
});
|
||||||
|
});
|
|
@ -7,7 +7,7 @@ describe('Route', () => {
|
||||||
|
|
||||||
it('Route list create route', () => {
|
it('Route list create route', () => {
|
||||||
cy.addBtnClick();
|
cy.addBtnClick();
|
||||||
cy.get('input[name="description"]').type('routeTestOne{enter}');
|
cy.get('.q-card input[name="description"]').type('routeTestOne{enter}');
|
||||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||||
cy.url().should('include', '/summary');
|
cy.url().should('include', '/summary');
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
describe('Vehicle list', () => {
|
||||||
|
const selectors = {
|
||||||
|
saveFormBtn: 'FormModelPopup_save',
|
||||||
|
summaryPopupBtn: 'tr:last-child > .q-table--col-auto-width > .q-btn',
|
||||||
|
summaryGoToSummaryBtn: '.header > .q-icon',
|
||||||
|
summaryHeader: '.summaryHeader > div',
|
||||||
|
numberPlate: 'tr:last-child > [data-col-field="numberPlate"] > .no-padding',
|
||||||
|
};
|
||||||
|
|
||||||
|
const data = {
|
||||||
|
'Nº Plate': { val: '9465-LPA' },
|
||||||
|
'Trade Mark': { val: 'WAYNE INDUSTRIES' },
|
||||||
|
Model: { val: 'BATREMOLQUE' },
|
||||||
|
Type: { val: 'remolque', type: 'select' },
|
||||||
|
Warehouse: { val: 'Warehouse One', type: 'select' },
|
||||||
|
Country: { val: 'Portugal', type: 'select' },
|
||||||
|
Description: { val: 'Exclusive for batpod transport' },
|
||||||
|
};
|
||||||
|
|
||||||
|
const expected = data['Nº Plate'].val;
|
||||||
|
const summaryUrl = '/summary';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/route/vehicle/list`);
|
||||||
|
cy.typeSearchbar('{enter}');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should list vehicles', () => {
|
||||||
|
cy.get('.q-table')
|
||||||
|
.children()
|
||||||
|
.should('be.visible')
|
||||||
|
.should('have.length.greaterThan', 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('Should add new vehicle', () => {
|
||||||
|
cy.addBtnClick();
|
||||||
|
cy.fillInForm(data);
|
||||||
|
cy.dataCy(selectors.saveFormBtn).should('be.visible').click();
|
||||||
|
|
||||||
|
cy.checkNotification('Data created');
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', expected);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should open summary by clicking a vehicle', () => {
|
||||||
|
cy.get(selectors.numberPlate).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', expected);
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should redirect to vehicle summary when click summary icon on summary pop-up', () => {
|
||||||
|
cy.get(selectors.summaryPopupBtn).click();
|
||||||
|
cy.get(selectors.summaryHeader).should('contain', expected);
|
||||||
|
cy.get(selectors.summaryGoToSummaryBtn).click();
|
||||||
|
cy.url().should('include', summaryUrl);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,32 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('ParkingBasicData', () => {
|
||||||
|
const codeInput = 'form .q-card .q-input input';
|
||||||
|
const sectorSelect = 'form .q-card .q-select input';
|
||||||
|
const sectorOpt = '.q-menu .q-item';
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/shelving/parking/1/basic-data`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should give an error if the code aldready exists', () => {
|
||||||
|
cy.get(codeInput).eq(0).should('have.value', '700-01').clear();
|
||||||
|
cy.get(codeInput).eq(0).type('700-02');
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'The code already exists');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should edit the code and sector', () => {
|
||||||
|
cy.get(sectorSelect).type('First');
|
||||||
|
cy.get(sectorOpt).click();
|
||||||
|
|
||||||
|
cy.get(codeInput).eq(0).clear();
|
||||||
|
cy.get(codeInput).eq(0).type('700-01');
|
||||||
|
cy.dataCy('Picking order_input').clear().type(80230);
|
||||||
|
|
||||||
|
cy.saveCard();
|
||||||
|
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||||
|
cy.get(sectorSelect).should('have.value', 'First sector');
|
||||||
|
cy.get(codeInput).should('have.value', '700-01');
|
||||||
|
cy.dataCy('Picking order_input').should('have.value', 80230);
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,30 @@
|
||||||
|
/// <reference types="cypress" />
|
||||||
|
describe('ParkingList', () => {
|
||||||
|
const searchbar = '#searchbar input';
|
||||||
|
const firstCard = ':nth-child(1) > .q-card > .no-margin > .q-py-none';
|
||||||
|
const summaryHeader = '.summaryBody .header';
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
|
cy.login('developer');
|
||||||
|
cy.visit(`/#/shelving/parking/list`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should redirect on clicking a parking', () => {
|
||||||
|
cy.get(searchbar).type('{enter}');
|
||||||
|
cy.get(firstCard).click();
|
||||||
|
cy.get(summaryHeader).contains('Basic data');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should filter and redirect if there is only one result', () => {
|
||||||
|
cy.dataCy('Code_input').type('1{enter}');
|
||||||
|
cy.dataCy('Sector_select').type('Normal{enter}');
|
||||||
|
cy.get(summaryHeader).contains('Basic data');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should filter and redirect to summary if only one result', () => {
|
||||||
|
cy.dataCy('Code_input').type('A{enter}');
|
||||||
|
cy.dataCy('Sector_select').type('First Sector{enter}');
|
||||||
|
cy.url().should('match', /\/shelving\/parking\/\d+\/summary/);
|
||||||
|
});
|
||||||
|
});
|
|
@ -30,8 +30,6 @@ describe('Ticket descriptor', () => {
|
||||||
|
|
||||||
it('should set the weight of the ticket', () => {
|
it('should set the weight of the ticket', () => {
|
||||||
cy.visit('/#/ticket/10/summary');
|
cy.visit('/#/ticket/10/summary');
|
||||||
cy.intercept('GET', /\/api\/Tickets\/\d/).as('ticket');
|
|
||||||
cy.wait('@ticket');
|
|
||||||
cy.openActionsDescriptor();
|
cy.openActionsDescriptor();
|
||||||
cy.contains(listItem, setWeightOpt).click();
|
cy.contains(listItem, setWeightOpt).click();
|
||||||
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');
|
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
// https://redmine.verdnatura.es/issues/8423
|
describe('Ticket expedtion', () => {
|
||||||
describe.skip('Ticket expedtion', () => {
|
|
||||||
const tableContent = '.q-table .q-virtual-scroll__content';
|
const tableContent = '.q-table .q-virtual-scroll__content';
|
||||||
const stateTd = 'td:nth-child(9)';
|
const stateTd = 'td:nth-child(9)';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ describe('TicketFilter', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.visit('/#/ticket/list');
|
cy.visit('/#/ticket/list');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('use search button', function () {
|
it('use search button', function () {
|
||||||
|
|
|
@ -6,7 +6,6 @@ describe('TicketList', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.visit('/#/ticket/list');
|
cy.visit('/#/ticket/list');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const searchResults = (search) => {
|
const searchResults = (search) => {
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
|
|
||||||
describe('TicketSale', () => {
|
describe('TicketSale', () => {
|
||||||
describe('Free ticket #31', () => {
|
describe.skip('Free ticket #31', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.visit('/#/ticket/31/sale');
|
cy.visit('/#/ticket/31/sale');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const firstRow = 'tbody > :nth-child(1)';
|
const firstRow = 'tbody > :nth-child(1)';
|
||||||
|
@ -121,7 +120,7 @@ describe('TicketSale', () => {
|
||||||
cy.url().should('match', /\/ticket\/31\/log/);
|
cy.url().should('match', /\/ticket\/31\/log/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Ticket prepared #23', () => {
|
describe.skip('Ticket prepared #23', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
|
|
@ -3,7 +3,6 @@ describe('VnInput Component', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
cy.visit('/#/supplier/1/fiscal-data');
|
cy.visit('/#/supplier/1/fiscal-data');
|
||||||
cy.domContentLoad();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should replace character at cursor position in insert mode', () => {
|
it('should replace character at cursor position in insert mode', () => {
|
||||||
|
@ -14,8 +13,7 @@ describe('VnInput Component', () => {
|
||||||
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
||||||
// Escribe un número y verifica que se reemplace correctamente
|
// Escribe un número y verifica que se reemplace correctamente
|
||||||
cy.dataCy('supplierFiscalDataAccount').type('999');
|
cy.dataCy('supplierFiscalDataAccount').type('999');
|
||||||
cy.dataCy('supplierFiscalDataAccount')
|
cy.dataCy('supplierFiscalDataAccount').should('have.value', '9990000001');
|
||||||
.should('have.value', '9990000001');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should replace character at cursor position in insert mode', () => {
|
it('should replace character at cursor position in insert mode', () => {
|
||||||
|
@ -26,14 +24,12 @@ describe('VnInput Component', () => {
|
||||||
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
|
||||||
// Escribe un número y verifica que se reemplace correctamente en la posicion incial
|
// Escribe un número y verifica que se reemplace correctamente en la posicion incial
|
||||||
cy.dataCy('supplierFiscalDataAccount').type('999');
|
cy.dataCy('supplierFiscalDataAccount').type('999');
|
||||||
cy.dataCy('supplierFiscalDataAccount')
|
cy.dataCy('supplierFiscalDataAccount').should('have.value', '9990000001');
|
||||||
.should('have.value', '9990000001');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should respect maxlength prop', () => {
|
it('should respect maxlength prop', () => {
|
||||||
cy.dataCy('supplierFiscalDataAccount').clear();
|
cy.dataCy('supplierFiscalDataAccount').clear();
|
||||||
cy.dataCy('supplierFiscalDataAccount').type('123456789012345');
|
cy.dataCy('supplierFiscalDataAccount').type('123456789012345');
|
||||||
cy.dataCy('supplierFiscalDataAccount')
|
cy.dataCy('supplierFiscalDataAccount').should('have.value', '1234567890'); // asumiendo que maxlength es 10
|
||||||
.should('have.value', '1234567890'); // asumiendo que maxlength es 10
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,6 @@ describe('VnLocation', () => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
|
||||||
cy.domContentLoad();
|
|
||||||
cy.get(createLocationButton).click();
|
cy.get(createLocationButton).click();
|
||||||
});
|
});
|
||||||
it('should filter provinces based on selected country', () => {
|
it('should filter provinces based on selected country', () => {
|
||||||
|
|
|
@ -18,6 +18,6 @@ describe('WagonCreate', () => {
|
||||||
).type('100');
|
).type('100');
|
||||||
cy.dataCy('Type_select').type('{downarrow}{enter}');
|
cy.dataCy('Type_select').type('{downarrow}{enter}');
|
||||||
|
|
||||||
cy.get('[title="Remove"] > .q-btn__content > .q-icon').click();
|
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,7 +8,7 @@ describe('WagonTypeCreate', () => {
|
||||||
|
|
||||||
it('should create a new wagon type and then delete it', () => {
|
it('should create a new wagon type and then delete it', () => {
|
||||||
cy.get('.q-page-sticky > div > .q-btn').click();
|
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||||
cy.get('input').first().type('Example for testing');
|
cy.dataCy('Name_input').type('Example for testing');
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,10 +1,25 @@
|
||||||
describe('WorkerCreate', () => {
|
describe.skip('WorkerCreate', () => {
|
||||||
const externalRadio = '.q-radio:nth-child(2)';
|
const externalRadio = '.q-radio:nth-child(2)';
|
||||||
const developerBossId = 120;
|
const developerBossId = 120;
|
||||||
const payMethodCross =
|
const payMethodCross =
|
||||||
'.grid-create .full-width > :nth-child(9) .q-select .q-field__append:not(.q-anchor--skip)';
|
':nth-child(9) > .q-select > .q-field__inner > .q-field__control > :nth-child(2)';
|
||||||
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
const saveBtn = '.q-mt-lg > .q-btn--standard';
|
||||||
|
|
||||||
|
const internalWithOutPay = {
|
||||||
|
Fi: { val: '78457139E' },
|
||||||
|
'Web user': { val: 'manolo' },
|
||||||
|
Name: { val: 'Manolo' },
|
||||||
|
'Last name': { val: 'Hurtado' },
|
||||||
|
'Personal email': { val: 'manolo@mydomain.com' },
|
||||||
|
Company: { val: 'VNL', type: 'select' },
|
||||||
|
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
||||||
|
Location: { val: 1, type: 'select' },
|
||||||
|
Phone: { val: '123456789' },
|
||||||
|
'Worker code': { val: 'DWW' },
|
||||||
|
Boss: { val: developerBossId, type: 'select' },
|
||||||
|
Birth: { val: '11-12-2022', type: 'date' },
|
||||||
|
};
|
||||||
|
|
||||||
const internal = {
|
const internal = {
|
||||||
Fi: { val: '78457139E' },
|
Fi: { val: '78457139E' },
|
||||||
'Web user': { val: 'manolo' },
|
'Web user': { val: 'manolo' },
|
||||||
|
@ -14,6 +29,7 @@ describe('WorkerCreate', () => {
|
||||||
Company: { val: 'VNL', type: 'select' },
|
Company: { val: 'VNL', type: 'select' },
|
||||||
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
Street: { val: 'S/ DEFAULTWORKERSTREET' },
|
||||||
Location: { val: 1, type: 'select' },
|
Location: { val: 1, type: 'select' },
|
||||||
|
'Pay method': { val: 1, type: 'select' },
|
||||||
Phone: { val: '123456789' },
|
Phone: { val: '123456789' },
|
||||||
'Worker code': { val: 'DWW' },
|
'Worker code': { val: 'DWW' },
|
||||||
Boss: { val: developerBossId, type: 'select' },
|
Boss: { val: developerBossId, type: 'select' },
|
||||||
|
@ -37,17 +53,14 @@ describe('WorkerCreate', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if a pay method has not been selected', () => {
|
it('should throw an error if a pay method has not been selected', () => {
|
||||||
cy.fillInForm(internal);
|
cy.fillInForm(internalWithOutPay);
|
||||||
cy.get(payMethodCross).click();
|
cy.get(payMethodCross).click();
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.checkNotification('Payment method is required');
|
cy.checkNotification('Payment method is required');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create an internal', () => {
|
it('should create an internal', () => {
|
||||||
cy.fillInForm({
|
cy.fillInForm(internal);
|
||||||
...internal,
|
|
||||||
'Pay method': { val: 'PayMethod one', type: 'select' },
|
|
||||||
});
|
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.checkNotification('Data created');
|
cy.checkNotification('Data created');
|
||||||
});
|
});
|
||||||
|
|
|
@ -18,11 +18,11 @@ describe('WorkerNotificationsManager', () => {
|
||||||
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
||||||
cy.get(firstAvailableNotification).click();
|
cy.get(firstAvailableNotification).click();
|
||||||
cy.checkNotification(
|
cy.checkNotification(
|
||||||
'The notification subscription of this worker cant be modified'
|
'The notification subscription of this worker cant be modified',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should active a notification that is yours', () => {
|
it.skip('should active a notification that is yours', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/worker/${developerId}/notifications`);
|
cy.visit(`/#/worker/${developerId}/notifications`);
|
||||||
cy.waitForElement(activeList);
|
cy.waitForElement(activeList);
|
||||||
|
|
|
@ -8,7 +8,8 @@ describe('WorkerPit', () => {
|
||||||
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
const spousePensionInput = '[data-cy="Spouse Pension_input"]';
|
||||||
const spousePension = '120';
|
const spousePension = '120';
|
||||||
const addRelative = '[data-cy="addRelative"]';
|
const addRelative = '[data-cy="addRelative"]';
|
||||||
const isDescendantSelect = '[data-cy="Descendant/Ascendant_select"]';
|
const isDescendantSelect = '[data-cy="Descendant/Ascendant"]';
|
||||||
|
const Descendant = 'Descendiente';
|
||||||
const birthedInput = '[data-cy="Birth Year_input"]';
|
const birthedInput = '[data-cy="Birth Year_input"]';
|
||||||
const birthed = '2002';
|
const birthed = '2002';
|
||||||
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
const adoptionYearInput = '[data-cy="Adoption Year_input"]';
|
||||||
|
@ -28,11 +29,8 @@ describe('WorkerPit', () => {
|
||||||
cy.get(spouseNifInput).type(spouseNif);
|
cy.get(spouseNifInput).type(spouseNif);
|
||||||
cy.get(spousePensionInput).type(spousePension);
|
cy.get(spousePensionInput).type(spousePension);
|
||||||
cy.get(savePIT).click();
|
cy.get(savePIT).click();
|
||||||
});
|
|
||||||
|
|
||||||
it('complete relative', () => {
|
|
||||||
cy.get(addRelative).click();
|
cy.get(addRelative).click();
|
||||||
cy.get(isDescendantSelect).type('{downArrow}{downArrow}{enter}');
|
cy.get(isDescendantSelect).type(Descendant);
|
||||||
cy.get(birthedInput).type(birthed);
|
cy.get(birthedInput).type(birthed);
|
||||||
cy.get(adoptionYearInput).type(adoptionYear);
|
cy.get(adoptionYearInput).type(adoptionYear);
|
||||||
cy.get(saveRelative).click();
|
cy.get(saveRelative).click();
|
||||||
|
|
|
@ -9,13 +9,7 @@ describe('ZoneBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the name is empty', () => {
|
it('should throw an error if the name is empty', () => {
|
||||||
cy.intercept('GET', /\/api\/Zones\/4./).as('zone');
|
cy.get('[data-cy="zone-basic-data-name"] input').type('{selectall}{backspace}');
|
||||||
|
|
||||||
cy.wait('@zone').then(() => {
|
|
||||||
cy.get('[data-cy="zone-basic-data-name"] input').type(
|
|
||||||
'{selectall}{backspace}',
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
cy.get(saveBtn).click();
|
cy.get(saveBtn).click();
|
||||||
cy.checkNotification("can't be blank");
|
cy.checkNotification("can't be blank");
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue