-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Conditional Options Logic #392
base: hotfix
Are you sure you want to change the base?
Feature Conditional Options Logic #392
Conversation
041d9a2
to
948a22f
Compare
948a22f
to
301e772
Compare
core/app/core/src/lib/fields/field-logic/field-logic.manager.ts
Outdated
Show resolved
Hide resolved
.../app/core/src/lib/fields/field-logic/actionable-field-logic/actionable-field-logic.action.ts
Outdated
Show resolved
Hide resolved
301e772
to
49a7208
Compare
value: this.field.value, | ||
valueList: this.field.valueList, | ||
valueObject: this.field.valueObject, | ||
forceNotEqual: 'forceNotEqual', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mpuyosa91, where do we use the forceNotEqual
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @clemente-raposo is just a way to make it different and force a true in line 120. It also could be accomplished with an undefined due to line 47 but I was anticipating any use of that first state of this.previousValue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mpuyosa91, can we use an alternative solution for this, please.
49a7208
to
bb07323
Compare
This is a feature that depends on #382. It consists of being able to add and remove options due to certain logic.
Caution
DO NOT MERGE BEFORE #382
Description
core/app/core/src/lib/fields/field-logic/actionable-field-logic/actionable-field-logic.action.ts
Abstract class ActionableFieldLogicActionHandler that can hold general and reusable functions across field logic actions.core/app/core/src/lib/fields/field-logic/conditional-options/conditional-options.action.ts
Actual ConditionalOptionsAction class that holds the logic.core/app/core/src/lib/fields/field-logic/field-logic.manager.ts:[40, 66, 78]
Registration of the Conditional Options Action as Field Logic Action.core/app/core/src/lib/services/logic/active-logic-checker.service.ts
: Creation of ActiveLogicChecker class that holds the routine for checking if a logic is active or not.core/app/core/src/lib/core.ts:364
Export created classesMotivation and Context
This was needed by client.
How To Test This
SHOW CONDITIONAL OPTION
field; if is not 'Yes' you should see on theTYPE
field 3 options, 4 instead.Test Environment
public/legacy/custom/Extension/modules/Cases/Ext/Vardefs/show_conditional_option.php
public/legacy/custom/Extension/modules/Cases/Ext/Language/en_us.show_conditional_option.php
public/legacy/custom/Extension/application/Ext/Language/en_us.Cases.php
public/legacy/custom/modules/Cases/metadata/detailviewdefs.php
public/legacy/custom/modules/Cases/metadata/editviewdefs.php
public/legacy/custom/Extension/modules/Cases/Ext/Vardefs/_override_type.php
public/legacy/custom/Extension/modules/Cases/Ext/Language/en_us.type_conditional_options.php
Types of changes
Final checklist