From e5ed7a34eed5be0612a896b7abdd952c62b2c397 Mon Sep 17 00:00:00 2001 From: Ryan Cooley Date: Thu, 12 Oct 2023 10:56:07 -0700 Subject: [PATCH 1/7] 2.76.13 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 790539a84..4cc750ad8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/screen-builder", - "version": "2.76.12", + "version": "2.76.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@processmaker/screen-builder", - "version": "2.76.12", + "version": "2.76.13", "dependencies": { "axios-extensions": "^2.0.3", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 5c0dc32a8..f065f5b55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/screen-builder", - "version": "2.76.12", + "version": "2.76.13", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", From 2b3b4f2dfc6c5e81011372971eeb5f9c785b30d9 Mon Sep 17 00:00:00 2001 From: "Marco A. Nina Mena" Date: Fri, 3 Nov 2023 12:50:31 -0400 Subject: [PATCH 2/7] Add field validation show --- src/mixins/extensions/ValidationRules.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mixins/extensions/ValidationRules.js b/src/mixins/extensions/ValidationRules.js index 44a0304c3..babf408db 100644 --- a/src/mixins/extensions/ValidationRules.js +++ b/src/mixins/extensions/ValidationRules.js @@ -17,8 +17,8 @@ export default { console.error("Invalid variable name"); } } else { - properties[':class'] = `{ 'form-group--error': showValidationErrors && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && $v.vdata.${element.config.name}.$invalid || showValidationErrors && ${this.checkVariableExists('$v.schema.' + element.config.name)} && $v.schema.${element.config.name}.$invalid }`; - properties[':error'] = `showValidationErrors && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && validationMessage($v.vdata.${element.config.name}) || showValidationErrors && ${this.checkVariableExists('$v.schema.' + element.config.name)} && validationMessage($v.schema.${element.config.name})`; + properties[':class'] = `{ 'form-group--error': (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && $v.vdata.${element.config.name}.$invalid || (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.schema.' + element.config.name)} && $v.schema.${element.config.name}.$invalid }`; + properties[':error'] = `(showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.vdata.' + element.config.name)} && validationMessage($v.vdata.${element.config.name}) || (showValidationErrors || ${this.fieldValidationShow(element)}) && ${this.checkVariableExists('$v.schema.' + element.config.name)} && validationMessage($v.schema.${element.config.name})`; } } }, @@ -53,5 +53,17 @@ export default { }, {str: '', variable: ''}); return check.str; }, + fieldValidationShow (element) { + let showError = true; + if (element.config.validation) { + const validationHidden = ['Required', 'Required if']; + element.config.validation.forEach((validation) => { + if (validationHidden.includes(validation.content)) { + showError = false; + } + }); + } + return showError; + } }, }; From 33763aada87beff48ae345757c0cb324e6b48065 Mon Sep 17 00:00:00 2001 From: "Marco A. Nina Mena" Date: Fri, 3 Nov 2023 16:01:21 -0400 Subject: [PATCH 3/7] Add validation string --- src/mixins/extensions/ValidationRules.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/mixins/extensions/ValidationRules.js b/src/mixins/extensions/ValidationRules.js index babf408db..9fccaa9c1 100644 --- a/src/mixins/extensions/ValidationRules.js +++ b/src/mixins/extensions/ValidationRules.js @@ -54,14 +54,19 @@ export default { return check.str; }, fieldValidationShow (element) { + console.log('fieldValidationShow', element.config.name, element.config, element.config.validation); let showError = true; - if (element.config.validation) { + if (element.config && element.config.validation) { const validationHidden = ['Required', 'Required if']; - element.config.validation.forEach((validation) => { - if (validationHidden.includes(validation.content)) { - showError = false; - } - }); + if (Array.isArray(element.config.validation)) { + element.config.validation.forEach((validation) => { + if (validationHidden.includes(validation.content)) { + showError = false; + } + }); + } else { + showError = validationHidden.includes(element.config.validation); + } } return showError; } From d3df8e9e1bd4c4ea6ef91b244c1fc1963249c7f8 Mon Sep 17 00:00:00 2001 From: "Marco A. Nina Mena" Date: Fri, 3 Nov 2023 17:07:37 -0400 Subject: [PATCH 4/7] Add validation in test showOnSubmit --- src/mixins/extensions/ValidationRules.js | 1 - tests/e2e/specs/ValidationShownOnSubmit.spec.js | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/mixins/extensions/ValidationRules.js b/src/mixins/extensions/ValidationRules.js index 9fccaa9c1..553cabd84 100644 --- a/src/mixins/extensions/ValidationRules.js +++ b/src/mixins/extensions/ValidationRules.js @@ -54,7 +54,6 @@ export default { return check.str; }, fieldValidationShow (element) { - console.log('fieldValidationShow', element.config.name, element.config, element.config.validation); let showError = true; if (element.config && element.config.validation) { const validationHidden = ['Required', 'Required if']; diff --git a/tests/e2e/specs/ValidationShownOnSubmit.spec.js b/tests/e2e/specs/ValidationShownOnSubmit.spec.js index 812206d67..584f06dd2 100644 --- a/tests/e2e/specs/ValidationShownOnSubmit.spec.js +++ b/tests/e2e/specs/ValidationShownOnSubmit.spec.js @@ -9,8 +9,14 @@ describe('Validation Rules', () => { it('Invalid default values', () => { cy.loadFromJson('validation_rules.json', 0); cy.get('[data-cy=mode-preview]').click(); - - cy.shouldNotHaveValidationErrors('screen-field-form_input_1'); + + cy.shouldHaveValidationErrors('screen-field-form_checkbox_1'); + cy.shouldHaveValidationErrors('screen-field-form_input_1'); + cy.shouldHaveValidationErrors('screen-field-form_input_2'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_3'); + cy.shouldHaveValidationErrors('screen-field-form_input_4'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_5'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_6'); cy.get('[data-cy=preview-content] .page button').click(); @@ -19,6 +25,13 @@ describe('Validation Rules', () => { cy.get('[data-cy=preview-content] [data-cy="screen-field-form_input_1"]') .clear() .type('on'); + + cy.shouldHaveValidationErrors('screen-field-form_checkbox_1'); cy.shouldNotHaveValidationErrors('screen-field-form_input_1'); + cy.shouldHaveValidationErrors('screen-field-form_input_2'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_3'); + cy.shouldHaveValidationErrors('screen-field-form_input_4'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_5'); + cy.shouldNotHaveValidationErrors('screen-field-form_input_6'); }); }); From 1a4f7baa165d033bdfc90acc0d7a51e81a177828 Mon Sep 17 00:00:00 2001 From: Ryan Cooley Date: Mon, 13 Nov 2023 15:50:15 -0800 Subject: [PATCH 5/7] 2.78.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index af099e734..e6700c075 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/screen-builder", - "version": "2.77.18", + "version": "2.78.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@processmaker/screen-builder", - "version": "2.77.18", + "version": "2.78.0", "dependencies": { "axios-extensions": "^2.0.3", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 9f0d38fe9..db0a86541 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/screen-builder", - "version": "2.77.18", + "version": "2.78.0", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", From e81b1c4ad833d69f77379878d2466e3be025fea9 Mon Sep 17 00:00:00 2001 From: luNunezProcessmaker Date: Tue, 14 Nov 2023 15:48:56 -0400 Subject: [PATCH 6/7] feature/FOUR-12358 --- src/components/renderer/card.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/renderer/card.vue b/src/components/renderer/card.vue index 85801bc51..1197c5cfc 100644 --- a/src/components/renderer/card.vue +++ b/src/components/renderer/card.vue @@ -115,6 +115,7 @@ export default { .then((response) => { this.spin = 0; const instance = response.data; + this.$cookies.set("fromTriggerStartEvent", true, "1min"); window.location = `/requests/${instance.id}?fromRedirect=true`; }) .catch((err) => { From dc2ed2163240c224cc645982883406ecd7d0712b Mon Sep 17 00:00:00 2001 From: Ryan Cooley Date: Tue, 14 Nov 2023 19:15:29 -0800 Subject: [PATCH 7/7] 2.78.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6700c075..a20114704 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@processmaker/screen-builder", - "version": "2.78.0", + "version": "2.78.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@processmaker/screen-builder", - "version": "2.78.0", + "version": "2.78.1", "dependencies": { "axios-extensions": "^2.0.3", "lodash": "^4.17.21", diff --git a/package.json b/package.json index db0a86541..390e8c5ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@processmaker/screen-builder", - "version": "2.78.0", + "version": "2.78.1", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build",