From 612a2e7b840d9c847a807c2da9b04836836cc0ff Mon Sep 17 00:00:00 2001 From: Jatin_Chugh Date: Tue, 21 Mar 2023 14:56:27 +0530 Subject: [PATCH 1/2] =?UTF-8?q?added=20comparator=20value=20only=20as=20Eq?= =?UTF-8?q?uals=20when=20Encoding=20is=20selected=20same=20as=20Share=20ap?= =?UTF-8?q?plication=20which=20was=20earlier=20=E2=80=9CEquals,=20Contains?= =?UTF-8?q?,=20Starts=20with=20and=20Ends=20with=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule-details/conditions/rule-condition-comparators.ts | 6 ++++++ .../lib/rule-details/conditions/rule-condition-fields.ts | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts index bd3da5081c..d0892a1dba 100644 --- a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts +++ b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts @@ -91,5 +91,11 @@ export const ruleConditionComparators: RuleConditionComparator[] = [ labels: { type: 'ACA_FOLDER_RULES.RULE_DETAILS.COMPARATORS.INSTANCE_OF' } + }, + { + name: 'equals', + labels: { + equals_comparator: 'ACA_FOLDER_RULES.RULE_DETAILS.COMPARATORS.EQUALS' + } } ]; diff --git a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts index d7af1b30e4..f1a78ea302 100644 --- a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts +++ b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts @@ -23,7 +23,7 @@ * along with Alfresco. If not, see . */ -export type RuleConditionFieldType = 'string' | 'number' | 'date' | 'type' | 'special'; +export type RuleConditionFieldType = 'string' | 'number' | 'date' | 'type' | 'special' | 'equals_comparator'; export interface RuleConditionField { name: string; @@ -50,7 +50,7 @@ export const ruleConditionFields: RuleConditionField[] = [ { name: 'encoding', label: 'ACA_FOLDER_RULES.RULE_DETAILS.FIELDS.ENCODING', - type: 'string' + type: 'equals_comparator' }, { name: 'category', From c58564cccb7a95e108961ab5ad2e2ee8421e21ce Mon Sep 17 00:00:00 2001 From: Jatin_Chugh Date: Tue, 21 Mar 2023 17:14:20 +0530 Subject: [PATCH 2/2] used 'special' type instead of custom type equals_comparator. --- .../rule-details/conditions/rule-condition-comparators.ts | 6 ------ .../lib/rule-details/conditions/rule-condition-fields.ts | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts index d0892a1dba..bd3da5081c 100644 --- a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts +++ b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-comparators.ts @@ -91,11 +91,5 @@ export const ruleConditionComparators: RuleConditionComparator[] = [ labels: { type: 'ACA_FOLDER_RULES.RULE_DETAILS.COMPARATORS.INSTANCE_OF' } - }, - { - name: 'equals', - labels: { - equals_comparator: 'ACA_FOLDER_RULES.RULE_DETAILS.COMPARATORS.EQUALS' - } } ]; diff --git a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts index f1a78ea302..faa51a53c7 100644 --- a/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts +++ b/projects/aca-folder-rules/src/lib/rule-details/conditions/rule-condition-fields.ts @@ -23,7 +23,7 @@ * along with Alfresco. If not, see . */ -export type RuleConditionFieldType = 'string' | 'number' | 'date' | 'type' | 'special' | 'equals_comparator'; +export type RuleConditionFieldType = 'string' | 'number' | 'date' | 'type' | 'special'; export interface RuleConditionField { name: string; @@ -50,7 +50,7 @@ export const ruleConditionFields: RuleConditionField[] = [ { name: 'encoding', label: 'ACA_FOLDER_RULES.RULE_DETAILS.FIELDS.ENCODING', - type: 'equals_comparator' + type: 'special' }, { name: 'category',