From 9155243d36f3f419524b1ad89884517ec5a94be1 Mon Sep 17 00:00:00 2001 From: tschug Date: Sat, 11 Nov 2023 18:38:57 -0500 Subject: [PATCH 1/8] Cleaned up comments and console logs --- force-app/main/default/classes/IndicatorController.cls | 8 -------- .../main/default/lwc/indicatorBundle/indicatorBundle.js | 9 +-------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/force-app/main/default/classes/IndicatorController.cls b/force-app/main/default/classes/IndicatorController.cls index b6eeb6f..000ebca 100644 --- a/force-app/main/default/classes/IndicatorController.cls +++ b/force-app/main/default/classes/IndicatorController.cls @@ -33,10 +33,6 @@ public with sharing class IndicatorController { public String BundleDescription {get; set;} @AuraEnabled public String BundleId {get; set;} - // @AuraEnabled - // public String BackgroundColor {get; set;} - // @AuraEnabled - // public String ForegroundColor {get; set;} @AuraEnabled public List Items {get; set;} } @@ -166,8 +162,6 @@ public with sharing class IndicatorController { wrapper.CardTitle = 'Unbundled Items'; wrapper.BundleDescription = null; wrapper.BundleId = null; - // wrapper.BackgroundColor = null; - // wrapper.ForegroundColor = null; wrapper.Items = new List(); for(Indicator_Item__mdt indicatorItem : Cmdt.getAllOrphanItems()){ @@ -266,8 +260,6 @@ public with sharing class IndicatorController { wrapper.CardTitle = bundle.Card_Title__c; wrapper.BundleDescription = bundle.Description__c; wrapper.BundleId = bundle.Id; - // wrapper.BackgroundColor = bundle.Card_Icon_Background__c; - // wrapper.ForegroundColor = bundle.Card_Icon_Foreground__c; wrapper.ObjectName = bundle.sObject__r.Label; if(bundle.sObject__r.Label != bundle.sObject__r.QualifiedApiName){ wrapper.ObjectName += ' (' + bundle.sObject__r.QualifiedApiName + ')'; diff --git a/force-app/main/default/lwc/indicatorBundle/indicatorBundle.js b/force-app/main/default/lwc/indicatorBundle/indicatorBundle.js index ab878fa..b815a46 100644 --- a/force-app/main/default/lwc/indicatorBundle/indicatorBundle.js +++ b/force-app/main/default/lwc/indicatorBundle/indicatorBundle.js @@ -189,7 +189,7 @@ export default class IndicatorBundle extends LightningElement { if (item.ZeroBehavior === 'Treat Zeroes as Blanks' && dataValue === 0){ dataValue = null; } - console.log('DataValue',dataValue); // Retain for debug purposes + // console.log('DataValue',dataValue); // Retain for debug purposes let showDefault = false; if( item.HoverValue || item.TextValue || item.IconName || item.ImageUrl ){ @@ -220,19 +220,14 @@ export default class IndicatorBundle extends LightningElement { // console.log('Value',dataValue + ' ' + extension.TextOperator + ' ' + compareValue); // Retain for debug purposes if(extension.TextOperator === 'Contains'){ match = fieldValue.includes(compareValue); - // console.log('Contains', fieldValue.includes(compareValue)); } else if (extension.TextOperator === 'Does Not Equal') { match = fieldValue != compareValue; - // console.log('Not equal', fieldValue != compareValue); } else if (extension.TextOperator === 'Equals') { match = fieldValue === compareValue; - // console.log('Equal', fieldValue === compareValue); } else if (extension.TextOperator === 'Starts With'){ match = fieldValue.startsWith(compareValue); - // console.log('Start with', fieldValue.startsWith(compareValue)); } else { match = fieldValue.includes(compareValue); - // console.log('Else', fieldValue.includes(compareValue)); } } // Else if the extension uses a Minimum boundary @@ -264,8 +259,6 @@ export default class IndicatorBundle extends LightningElement { "IconBackground" : extension.BackgroundColor, "IconForeground" : extension.ForegroundColor }; - - // console.dir(matchedExtension); } } // End-If extension.IsActive } From 6e6ca323731356f85b684d31c7a5556e6264ddf5 Mon Sep 17 00:00:00 2001 From: tschug Date: Sat, 11 Nov 2023 22:44:03 -0500 Subject: [PATCH 2/8] New training indicators --- ...Bundle.Training_Bundle_7_Advanced_Field.md | 37 ++++++++ ...Training_Bundle_8_Indicator_Extensions.md} | 2 +- ...dicator_Bundle_Item.Training_7_Advanced.md | 17 ++++ ...r_Bundle_Item.Training_8_Extensions_All.md | 17 ++++ ...ndle_Item.Training_8_Extensions_Numeric.md | 17 ++++ ..._Bundle_Item.Training_8_Extensions_Only.md | 17 ++++ ...le_Item.Training_8_Extensions_Operators.md | 17 ++++ ..._Indicator_Item.Training_Advanced_Field.md | 89 +++++++++++++++++++ ..._Item.Training_Basic_Icon_with_Fore_HEX.md | 2 +- ...Item.Training_Basic_Icon_with_Fore_Name.md | 2 +- ..._Indicator_Item.Training_Extensions_All.md | 89 +++++++++++++++++++ ...icator_Item.Training_Extensions_Numeric.md | 89 +++++++++++++++++++ ...Indicator_Item.Training_Extensions_Only.md | 89 +++++++++++++++++++ ...ator_Item.Training_Extensions_Operators.md | 89 +++++++++++++++++++ ..._Extension.Training_Account_Rating_Cold.md | 61 +++++++++++++ ...xtension.Training_Account_Rating_Cold_2.md | 61 +++++++++++++ ...ension.Training_Account_Rating_Contains.md | 61 +++++++++++++ ...xtension.Training_Account_Rating_Equals.md | 61 +++++++++++++ ...m_Extension.Training_Account_Rating_Hot.md | 61 +++++++++++++ ...nsion.Training_Account_Rating_Not_Equal.md | 61 +++++++++++++ ...ion.Training_Account_Rating_Starts_With.md | 61 +++++++++++++ ..._Extension.Training_Account_Rating_Warm.md | 61 +++++++++++++ ...cator_Item_Extension.Training_Numeric_0.md | 61 +++++++++++++ ...or_Item_Extension.Training_Numeric_1_19.md | 61 +++++++++++++ ...r_Item_Extension.Training_Numeric_20_29.md | 61 +++++++++++++ ...r_Item_Extension.Training_Numeric_30_39.md | 61 +++++++++++++ ...ator_Item_Extension.Training_Numeric_40.md | 61 +++++++++++++ 27 files changed, 1363 insertions(+), 3 deletions(-) create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Advanced_Field.md rename unpackaged/config/training_Indicators/customMetadata/{___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Indicator_Extensions.md => ___NAMESPACE___Indicator_Bundle.Training_Bundle_8_Indicator_Extensions.md} (96%) create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_7_Advanced.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_All.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Numeric.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Only.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Operators.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Advanced_Field.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_All.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Numeric.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Only.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Operators.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold_2.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Contains.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Equals.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Hot.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Not_Equal.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Starts_With.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Warm.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_0.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_1_19.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_20_29.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_30_39.md create mode 100644 unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_40.md diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Advanced_Field.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Advanced_Field.md new file mode 100644 index 0000000..de53d4b --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Advanced_Field.md @@ -0,0 +1,37 @@ + + + + false + + %%%NAMESPACE%%%Active__c + false + + + %%%NAMESPACE%%%Card_Icon_Background__c + + + + %%%NAMESPACE%%%Card_Icon_Foreground__c + + + + %%%NAMESPACE%%%Card_Icon__c + standard:trailhead + + + %%%NAMESPACE%%%Card_Text__c + The advanced level of how Salesforce Indicators can utilize parent record values by transversing up the relationship hierarchy in order to display indicators on the child record. + + + %%%NAMESPACE%%%Card_Title__c + Training Indicators 8 + + + %%%NAMESPACE%%%Description__c + This bundle is not intended to be used. Instead, it shows a list of indicators to be used as a reference on how to use the Advanced Field and Advanced Field Label. Click the gear icon ⚙ next to each indicator to see its configuration. + + + %%%NAMESPACE%%%sObject__c + Contact + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Indicator_Extensions.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_8_Indicator_Extensions.md similarity index 96% rename from unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Indicator_Extensions.md rename to unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_8_Indicator_Extensions.md index 9dff777..805580b 100644 --- a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_7_Indicator_Extensions.md +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle.Training_Bundle_8_Indicator_Extensions.md @@ -1,6 +1,6 @@ - + false %%%NAMESPACE%%%Active__c diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_7_Advanced.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_7_Advanced.md new file mode 100644 index 0000000..062c4f4 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_7_Advanced.md @@ -0,0 +1,17 @@ + + + + false + + %%%NAMESPACE%%%Indicator_Bundle__c + Training_Bundle_7_Advanced_Field + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Advanced_Field + + + %%%NAMESPACE%%%Order__c + 1.0 + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_All.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_All.md new file mode 100644 index 0000000..c126c43 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_All.md @@ -0,0 +1,17 @@ + + + + false + + %%%NAMESPACE%%%Indicator_Bundle__c + Training_Bundle_8_Indicator_Extensions + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_All + + + %%%NAMESPACE%%%Order__c + 2.0 + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Numeric.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Numeric.md new file mode 100644 index 0000000..5c77c67 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Numeric.md @@ -0,0 +1,17 @@ + + + + false + + %%%NAMESPACE%%%Indicator_Bundle__c + Training_Bundle_8_Indicator_Extensions + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Order__c + 4.0 + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Only.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Only.md new file mode 100644 index 0000000..ed4a427 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Only.md @@ -0,0 +1,17 @@ + + + + false + + %%%NAMESPACE%%%Indicator_Bundle__c + Training_Bundle_8_Indicator_Extensions + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Only + + + %%%NAMESPACE%%%Order__c + 1.0 + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Operators.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Operators.md new file mode 100644 index 0000000..e67f54b --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Bundle_Item.Training_8_Extensions_Operators.md @@ -0,0 +1,17 @@ + + + + false + + %%%NAMESPACE%%%Indicator_Bundle__c + Training_Bundle_8_Indicator_Extensions + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Operators + + + %%%NAMESPACE%%%Order__c + 3.0 + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Advanced_Field.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Advanced_Field.md new file mode 100644 index 0000000..ec8aacb --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Advanced_Field.md @@ -0,0 +1,89 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Advanced_Field_Label__c + Contact's Account's Account Number + + + %%%NAMESPACE%%%Advanced_Field__c + Account.AccountNumber + + + %%%NAMESPACE%%%Description__c + This indicator shows the simple configuration of using the Account Number from the Contact's Account lookup field. + + + %%%NAMESPACE%%%Empty_Static_Text_Behavior__c + Use Icon Only + + + %%%NAMESPACE%%%Field__c + + + + %%%NAMESPACE%%%Hover_Text__c + Contact's Account has an Account Number + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + standard:number_input + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Inverse_Hover_Text__c + Contact's Account missing the Account Number + + + %%%NAMESPACE%%%Inverse_Icon_Background__c + + + + %%%NAMESPACE%%%Inverse_Icon_Foreground__c + + + + %%%NAMESPACE%%%Inverse_Icon_Value__c + standard:empty + + + %%%NAMESPACE%%%Inverse_Image__c + + + + %%%NAMESPACE%%%Inverse_Static_Text__c + + + + %%%NAMESPACE%%%Show_False_or_Blank__c + true + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Zero_Behavior__c + + + + %%%NAMESPACE%%%sObject__c + Contact + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_HEX.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_HEX.md index 4ad803e..6891976 100644 --- a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_HEX.md +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_HEX.md @@ -40,7 +40,7 @@ %%%NAMESPACE%%%Icon_Value__c - standard:custom26 + custom:custom26 %%%NAMESPACE%%%Image__c diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_Name.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_Name.md index 9e41e4e..499df22 100644 --- a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_Name.md +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Basic_Icon_with_Fore_Name.md @@ -40,7 +40,7 @@ %%%NAMESPACE%%%Icon_Value__c - standard:custom26 + custom:custom26 %%%NAMESPACE%%%Image__c diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_All.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_All.md new file mode 100644 index 0000000..8399128 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_All.md @@ -0,0 +1,89 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Advanced_Field_Label__c + + + + %%%NAMESPACE%%%Advanced_Field__c + + + + %%%NAMESPACE%%%Description__c + This indicator shows the advanced configuration of displaying a conditional extension for a field or the default indicators when the field has any value or is missing a value. + + + %%%NAMESPACE%%%Empty_Static_Text_Behavior__c + Use Icon Only + + + %%%NAMESPACE%%%Field__c + Rating + + + %%%NAMESPACE%%%Hover_Text__c + This Account has a rating that is not Cold + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Inverse_Hover_Text__c + This Account is missing a Rating + + + %%%NAMESPACE%%%Inverse_Icon_Background__c + Grey + + + %%%NAMESPACE%%%Inverse_Icon_Foreground__c + White + + + %%%NAMESPACE%%%Inverse_Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Inverse_Image__c + + + + %%%NAMESPACE%%%Inverse_Static_Text__c + + + + %%%NAMESPACE%%%Show_False_or_Blank__c + true + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Zero_Behavior__c + + + + %%%NAMESPACE%%%sObject__c + Account + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Numeric.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Numeric.md new file mode 100644 index 0000000..72f0b5b --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Numeric.md @@ -0,0 +1,89 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Advanced_Field_Label__c + + + + %%%NAMESPACE%%%Advanced_Field__c + + + + %%%NAMESPACE%%%Description__c + This indicator shows the advanced configuration of displaying conditional extensions for a numerical field based on ranges. + + + %%%NAMESPACE%%%Empty_Static_Text_Behavior__c + Use Icon Only + + + %%%NAMESPACE%%%Field__c + NumberOfEmployees + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Inverse_Hover_Text__c + + + + %%%NAMESPACE%%%Inverse_Icon_Background__c + + + + %%%NAMESPACE%%%Inverse_Icon_Foreground__c + + + + %%%NAMESPACE%%%Inverse_Icon_Value__c + + + + %%%NAMESPACE%%%Inverse_Image__c + + + + %%%NAMESPACE%%%Inverse_Static_Text__c + + + + %%%NAMESPACE%%%Show_False_or_Blank__c + false + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Zero_Behavior__c + Treat Zeroes as Numbers + + + %%%NAMESPACE%%%sObject__c + Account + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Only.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Only.md new file mode 100644 index 0000000..cbb9897 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Only.md @@ -0,0 +1,89 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Advanced_Field_Label__c + + + + %%%NAMESPACE%%%Advanced_Field__c + + + + %%%NAMESPACE%%%Description__c + This indicator shows the advanced configuration of displaying only conditional extensions for a field. + + + %%%NAMESPACE%%%Empty_Static_Text_Behavior__c + Use Icon Only + + + %%%NAMESPACE%%%Field__c + Rating + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Inverse_Hover_Text__c + + + + %%%NAMESPACE%%%Inverse_Icon_Background__c + + + + %%%NAMESPACE%%%Inverse_Icon_Foreground__c + + + + %%%NAMESPACE%%%Inverse_Icon_Value__c + + + + %%%NAMESPACE%%%Inverse_Image__c + + + + %%%NAMESPACE%%%Inverse_Static_Text__c + + + + %%%NAMESPACE%%%Show_False_or_Blank__c + false + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Zero_Behavior__c + + + + %%%NAMESPACE%%%sObject__c + Account + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Operators.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Operators.md new file mode 100644 index 0000000..52ee7a2 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item.Training_Extensions_Operators.md @@ -0,0 +1,89 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Advanced_Field_Label__c + + + + %%%NAMESPACE%%%Advanced_Field__c + + + + %%%NAMESPACE%%%Description__c + This indicator shows the advanced configuration of displaying conditional extensions for a field using text-matching operators. + + + %%%NAMESPACE%%%Empty_Static_Text_Behavior__c + Use Icon Only + + + %%%NAMESPACE%%%Field__c + Rating + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Inverse_Hover_Text__c + + + + %%%NAMESPACE%%%Inverse_Icon_Background__c + + + + %%%NAMESPACE%%%Inverse_Icon_Foreground__c + + + + %%%NAMESPACE%%%Inverse_Icon_Value__c + + + + %%%NAMESPACE%%%Inverse_Image__c + + + + %%%NAMESPACE%%%Inverse_Static_Text__c + + + + %%%NAMESPACE%%%Show_False_or_Blank__c + false + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Zero_Behavior__c + + + + %%%NAMESPACE%%%sObject__c + Account + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold.md new file mode 100644 index 0000000..21ec62b --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Cold + + + %%%NAMESPACE%%%Description__c + This extension is for a "Cold" Account Rating. + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Blue + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Only + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 3.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Equals + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold_2.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold_2.md new file mode 100644 index 0000000..be28173 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Cold_2.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Cold + + + %%%NAMESPACE%%%Description__c + This extension is for any Account Rating that contains "Cold" -- note that when the Text Operator is blank, it will default to "contains". + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + RoyalBlue + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_All + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 1.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Contains.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Contains.md new file mode 100644 index 0000000..cf1cb5e --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Contains.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Warm + + + %%%NAMESPACE%%%Description__c + This extension is for an Account Rating that contains "Warm". + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Orange + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Operators + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 3.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Contains + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Equals.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Equals.md new file mode 100644 index 0000000..eec2784 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Equals.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Hot + + + %%%NAMESPACE%%%Description__c + This extension is for an Account Rating that equals "Hot". + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Red + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Operators + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 1.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Equals + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Hot.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Hot.md new file mode 100644 index 0000000..c5f7f37 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Hot.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Hot + + + %%%NAMESPACE%%%Description__c + This extension is for a "Hot" Account Rating. + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Red + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Only + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 1.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Equals + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Not_Equal.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Not_Equal.md new file mode 100644 index 0000000..82e9cee --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Not_Equal.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Cold + + + %%%NAMESPACE%%%Description__c + This extension is for an Account Rating that does not equal "Cold". + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Operators + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 4.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Does Not Equal + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Starts_With.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Starts_With.md new file mode 100644 index 0000000..6f8bf05 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Starts_With.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Co + + + %%%NAMESPACE%%%Description__c + This extension is for an Account Rating starting with "Co". + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Blue + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Operators + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 2.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Starts With + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Warm.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Warm.md new file mode 100644 index 0000000..e9f09f8 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Account_Rating_Warm.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + Warm + + + %%%NAMESPACE%%%Description__c + This extension is for a "Warm" Account Rating. + + + %%%NAMESPACE%%%Hover_Text__c + + + + %%%NAMESPACE%%%Icon_Background__c + Orange + + + %%%NAMESPACE%%%Icon_Foreground__c + White + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom97 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Only + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + + + + %%%NAMESPACE%%%Priority__c + 2.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + Equals + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_0.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_0.md new file mode 100644 index 0000000..da8075a --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_0.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + + + + %%%NAMESPACE%%%Description__c + Indicator for less than 1 employee + + + %%%NAMESPACE%%%Hover_Text__c + No Employees + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom111 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Maximum__c + 1.0 + + + %%%NAMESPACE%%%Minimum__c + 0.0 + + + %%%NAMESPACE%%%Priority__c + 1.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_1_19.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_1_19.md new file mode 100644 index 0000000..ca5400e --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_1_19.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + + + + %%%NAMESPACE%%%Description__c + Indicator for less than 20 employees + + + %%%NAMESPACE%%%Hover_Text__c + 1-20 Employees + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + standard:people + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Maximum__c + 20.0 + + + %%%NAMESPACE%%%Minimum__c + 1.0 + + + %%%NAMESPACE%%%Priority__c + 2.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_20_29.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_20_29.md new file mode 100644 index 0000000..207616a --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_20_29.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + + + + %%%NAMESPACE%%%Description__c + Indicator for 20-29 employees + + + %%%NAMESPACE%%%Hover_Text__c + 20-29 Employees + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + custom:custom15 + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Maximum__c + 30.0 + + + %%%NAMESPACE%%%Minimum__c + 20.0 + + + %%%NAMESPACE%%%Priority__c + 3.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_30_39.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_30_39.md new file mode 100644 index 0000000..eeee354 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_30_39.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + + + + %%%NAMESPACE%%%Description__c + Indicator for 30-39 employees + + + %%%NAMESPACE%%%Hover_Text__c + 30-39 Employees + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + standard:queue + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Maximum__c + 40.0 + + + %%%NAMESPACE%%%Minimum__c + 30.0 + + + %%%NAMESPACE%%%Priority__c + 4.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + diff --git a/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_40.md b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_40.md new file mode 100644 index 0000000..dfd3549 --- /dev/null +++ b/unpackaged/config/training_Indicators/customMetadata/___NAMESPACE___Indicator_Item_Extension.Training_Numeric_40.md @@ -0,0 +1,61 @@ + + + + false + + %%%NAMESPACE%%%Active__c + true + + + %%%NAMESPACE%%%Contains_Text__c + + + + %%%NAMESPACE%%%Description__c + Indicator for 40 or more employees + + + %%%NAMESPACE%%%Hover_Text__c + 40+ Employees + + + %%%NAMESPACE%%%Icon_Background__c + + + + %%%NAMESPACE%%%Icon_Foreground__c + + + + %%%NAMESPACE%%%Icon_Value__c + standard:buyer_group_qualifier + + + %%%NAMESPACE%%%Image__c + + + + %%%NAMESPACE%%%Indicator_Item__c + Training_Extensions_Numeric + + + %%%NAMESPACE%%%Maximum__c + + + + %%%NAMESPACE%%%Minimum__c + 40.0 + + + %%%NAMESPACE%%%Priority__c + 5.0 + + + %%%NAMESPACE%%%Static_Text__c + + + + %%%NAMESPACE%%%Text_Operator__c + + + From 5b30882abd4b87ca4beae0cc0821c09838695aa7 Mon Sep 17 00:00:00 2001 From: tschug Date: Sun, 12 Nov 2023 00:25:48 -0500 Subject: [PATCH 3/8] Defaulted `Contains` for null Text Operator --- force-app/main/default/classes/IndicatorController.cls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/force-app/main/default/classes/IndicatorController.cls b/force-app/main/default/classes/IndicatorController.cls index 000ebca..efc1b37 100644 --- a/force-app/main/default/classes/IndicatorController.cls +++ b/force-app/main/default/classes/IndicatorController.cls @@ -214,7 +214,7 @@ public with sharing class IndicatorController { extension.IsActive = itemExtension.Active__c; extension.ContainsText = itemExtension.Contains_Text__c; - extension.TextOperator = itemExtension.Text_Operator__c; + extension.TextOperator = String.isNotBlank(itemExtension.Text_Operator__c) ? itemExtension.Text_Operator__c : 'Contains'; extension.Maximum = itemExtension.Maximum__c; extension.Minimum = itemExtension.Minimum__c; extension.ExtensionHoverText = itemExtension.Hover_Text__c; @@ -313,7 +313,7 @@ public with sharing class IndicatorController { extension.IsActive = itemExtension.Active__c; extension.ContainsText = itemExtension.Contains_Text__c; - extension.TextOperator = itemExtension.Text_Operator__c; + extension.TextOperator = String.isNotBlank(itemExtension.Text_Operator__c) ? itemExtension.Text_Operator__c : 'Contains'; extension.Maximum = itemExtension.Maximum__c; extension.Minimum = itemExtension.Minimum__c; extension.ExtensionHoverText = itemExtension.Hover_Text__c; From 2a2ee810f2885b7859b556d92d3a704e36775c29 Mon Sep 17 00:00:00 2001 From: tschug Date: Sun, 12 Nov 2023 00:27:57 -0500 Subject: [PATCH 4/8] Enhanced Fill Type on Key + Updated description for Text Operator + removed apostrophe s for hover description --- .../indicatorBundleKey/indicatorBundleKey.js | 62 ++++++++++++++++--- force-app/main/default/lwc/key/key.js | 62 ++++++++++++++++--- 2 files changed, 110 insertions(+), 14 deletions(-) diff --git a/force-app/main/default/lwc/indicatorBundleKey/indicatorBundleKey.js b/force-app/main/default/lwc/indicatorBundleKey/indicatorBundleKey.js index 2cf4385..8e633ba 100644 --- a/force-app/main/default/lwc/indicatorBundleKey/indicatorBundleKey.js +++ b/force-app/main/default/lwc/indicatorBundleKey/indicatorBundleKey.js @@ -36,6 +36,23 @@ export default class IndicatorBundleKey extends LightningModal { // console.dir(JSON.parse(JSON.stringify(item))); if(item.ImageUrl || item.IconName){ // Show Normal + let fillDesc = ''; + if(item.TextValue || item.TextValue === 0){ + fillDesc = 'Static Text'; + } else if (item.EmptyStaticBehavior === 'Use Field Value'){ + fillDesc = 'Field Value'; + } else if (item.EmptyStaticBehavior === 'Use Icon Only'){ + if(item.ImageUrl && item.IconName) { + fillDesc = 'Image/Fallback Icon'; + } else if(item.ImageUrl){ + fillDesc = 'Image'; + } else if(item.IconName){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + } + let normalIcon = { IndicatorId: item.IndicatorId, IconName: item.IconName ? item.IconName : '', @@ -44,7 +61,7 @@ export default class IndicatorBundleKey extends LightningModal { HoverValue: item.HoverValue ? '\"' + item.HoverValue + '\"' : 'Field Value', Priority: '', ExtensionLogic: item.FieldLabel + ' has a value', - FillType: item.TextValue ? 'Static Text' : item.EmptyStaticBehavior, + FillType: fillDesc, Description: '', Background: item.BackgroundColor, Foreground: item.ForegroundColor @@ -62,15 +79,28 @@ export default class IndicatorBundleKey extends LightningModal { if(item.FalseImageUrl || item.FalseIcon){ // Show Inverse + let fillDesc = ''; + if(item.FalseTextValue || item.FalseTextValue === 0){ + fillDesc = 'Static Text'; + } else if(item.FalseImageUrl && item.FalseIcon) { + fillDesc = 'Image/Fallback Icon'; + } else if(item.FalseImageUrl){ + fillDesc = 'Image'; + } else if(item.FalseIcon){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + let inverseIcon = { IndicatorId: item.IndicatorId, IconName: item.FalseIcon ? item.FalseIcon : '', TextValue: item.FalseTextValue ? item.FalseTextValue : '', ImageUrl: item.FalseImageUrl ? item.FalseImageUrl : '', - HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field\'s Value', + HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field Value', Priority: '', ExtensionLogic: item.FieldLabel + ' is false or blank', - FillType: item.FalseTextValue ? 'Static Text' : 'Icon/Image', + FillType: fillDesc, Description: '', Background: item.InverseBackgroundColor, Foreground: item.InverseForegroundColor @@ -94,6 +124,23 @@ export default class IndicatorBundleKey extends LightningModal { orderedExtensions.forEach( ext => { + let fillDesc = ''; + if(ext.ExtensionTextValue || ext.ExtensionTextValue === 0){ + fillDesc = 'Static Text'; + } else if (item.EmptyStaticBehavior === 'Use Field Value'){ + fillDesc = 'Field Value'; + } else if (item.EmptyStaticBehavior === 'Use Icon Only'){ + if(ext.ExtensionImageUrl && ext.ExtensionIconValue) { + fillDesc = 'Image/Fallback Icon'; + } else if(ext.ExtensionImageUrl){ + fillDesc = 'Image'; + } else if(ext.ExtensionIconValue){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + } + let extensionIcon = { IndicatorId: ext.ExtensionId, IconName: ext.ExtensionIconValue ? ext.ExtensionIconValue : '', @@ -102,15 +149,16 @@ export default class IndicatorBundleKey extends LightningModal { HoverValue: ext.ExtensionHoverText ? '\"' + ext.ExtensionHoverText + '\"' : 'Field Value', Priority: ext.PriorityOrder ? ext.PriorityOrder : '', ExtensionLogic: '', - FillType: ext.ExtensionTextValue ? 'Static Text' : 'Icon/Image', + FillType: fillDesc, Description: ext.ExtensionDescription, Background: ext.BackgroundColor, - Foreground: ext.ForegroundColor + Foreground: ext.ForegroundColor, + Operator: ext.TextOperator }; if(ext.ContainsText) { - extensionIcon.ExtensionLogic = item.FieldLabel + ' contains: \"' + ext.ContainsText + '\"'; - } else if (ext.Minimum) { + extensionIcon.ExtensionLogic = item.FieldLabel + ' ' + ext.Operator.toUpperCase() + ' \"' + ext.ContainsText + '\"'; + } else if (ext.Minimum || ext.Minimum === 0) { let range = item.FieldLabel + ' greater than or equal to ' + ext.Minimum; if(ext.Maximum){ range += ' and less than ' + ext.Maximum; diff --git a/force-app/main/default/lwc/key/key.js b/force-app/main/default/lwc/key/key.js index 29eb16e..b17be6e 100644 --- a/force-app/main/default/lwc/key/key.js +++ b/force-app/main/default/lwc/key/key.js @@ -75,6 +75,23 @@ export default class Key extends LightningElement { // console.dir(JSON.parse(JSON.stringify(item))); if(item.ImageUrl || item.IconName){ // Show Normal + let fillDesc = ''; + if(item.TextValue || item.TextValue === 0){ + fillDesc = 'Static Text'; + } else if (item.EmptyStaticBehavior === 'Use Field Value'){ + fillDesc = 'Field Value'; + } else if (item.EmptyStaticBehavior === 'Use Icon Only'){ + if(item.ImageUrl && item.IconName) { + fillDesc = 'Image/Fallback Icon'; + } else if(item.ImageUrl){ + fillDesc = 'Image'; + } else if(item.IconName){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + } + let normalIcon = { IndicatorId: item.IndicatorId, IconName: item.IconName ? item.IconName : '', @@ -83,7 +100,7 @@ export default class Key extends LightningElement { HoverValue: item.HoverValue ? '\"' + item.HoverValue + '\"' : 'Field Value', Priority: '', ExtensionLogic: item.FieldLabel + ' has a value', - FillType: item.TextValue ? 'Static Text' : item.EmptyStaticBehavior, + FillType: fillDesc, Description: '', Background: item.BackgroundColor, Foreground: item.ForegroundColor, @@ -107,15 +124,28 @@ export default class Key extends LightningElement { if(item.FalseImageUrl || item.FalseIcon){ // Show Inverse + let fillDesc = ''; + if(item.FalseTextValue || item.FalseTextValue === 0){ + fillDesc = 'Static Text'; + } else if(item.FalseImageUrl && item.FalseIcon) { + fillDesc = 'Image/Fallback Icon'; + } else if(item.FalseImageUrl){ + fillDesc = 'Image'; + } else if(item.FalseIcon){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + let inverseIcon = { IndicatorId: item.IndicatorId, IconName: item.FalseIcon ? item.FalseIcon : '', TextValue: item.FalseTextValue ? item.FalseTextValue : '', ImageUrl: item.FalseImageUrl ? item.FalseImageUrl : '', - HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field\'s Value', + HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field Value', Priority: '', ExtensionLogic: item.FieldLabel + ' is false or blank', - FillType: item.FalseTextValue ? 'Static Text' : 'Icon/Image', + FillType: fillDesc, Description: '', Background: item.InverseBackgroundColor, Foreground: item.InverseForegroundColor, @@ -147,6 +177,23 @@ export default class Key extends LightningElement { orderedExtensions.forEach( ext => { + let fillDesc = ''; + if(ext.ExtensionTextValue || ext.ExtensionTextValue === 0){ + fillDesc = 'Static Text'; + } else if (item.EmptyStaticBehavior === 'Use Field Value'){ + fillDesc = 'Field Value'; + } else if (item.EmptyStaticBehavior === 'Use Icon Only'){ + if(ext.ExtensionImageUrl && ext.ExtensionIconValue) { + fillDesc = 'Image/Fallback Icon'; + } else if(ext.ExtensionImageUrl){ + fillDesc = 'Image'; + } else if(ext.ExtensionIconValue){ + fillDesc = 'Icon'; + } else { + fillDesc = ''; + } + } + let extensionIcon = { IndicatorId: ext.ExtensionId, IconName: ext.ExtensionIconValue ? ext.ExtensionIconValue : '', @@ -155,11 +202,12 @@ export default class Key extends LightningElement { HoverValue: ext.ExtensionHoverText ? '\"' + ext.ExtensionHoverText + '\"' : 'Field Value', Priority: ext.PriorityOrder ? ext.PriorityOrder : '', ExtensionLogic: '', - FillType: ext.ExtensionTextValue ? 'Static Text' : 'Icon/Image', + FillType: fillDesc, Description: ext.ExtensionDescription, Background: ext.BackgroundColor, Foreground: ext.ForegroundColor, - IsActive: ext.IsActive + IsActive: ext.IsActive, + Operator: ext.TextOperator }; if(ext.IsActive){ @@ -169,8 +217,8 @@ export default class Key extends LightningElement { } if(ext.ContainsText) { - extensionIcon.ExtensionLogic = item.FieldLabel + ' contains: \"' + ext.ContainsText + '\"'; - } else if (ext.Minimum) { + extensionIcon.ExtensionLogic = item.FieldLabel + ' ' + extensionIcon.Operator.toUpperCase() + ' \"' + ext.ContainsText + '\"'; + } else if (ext.Minimum || ext.Minimum === 0) { let range = item.FieldLabel + ' greater than or equal to ' + ext.Minimum; if(ext.Maximum){ range += ' and less than ' + ext.Maximum; From 08725398aeeb7850976feffa148b105db9c2a394 Mon Sep 17 00:00:00 2001 From: tschug Date: Sun, 12 Nov 2023 00:28:19 -0500 Subject: [PATCH 5/8] Set recommendations for Metadeploy options --- cumulusci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cumulusci.yml b/cumulusci.yml index 866bb1a..f49fa16 100644 --- a/cumulusci.yml +++ b/cumulusci.yml @@ -86,6 +86,12 @@ flows: flow: sample_inds ui_options: is_required: False + is_recommended: False + 3: + task: deploy_training_indicators + ui_options: + is_required: False + is_recommended: False config_dev: steps: 3: From 3bd4c88bc5905d618baafec77a453f149604d162 Mon Sep 17 00:00:00 2001 From: tschug Date: Sun, 12 Nov 2023 01:47:06 -0500 Subject: [PATCH 6/8] Renamed sample flexipages --- ..._Page.flexipage => Account_Record_Page_Indicators.flexipage} | 2 +- ..._Page.flexipage => Contact_Record_Page_Indicators.flexipage} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename unpackaged/config/sample_AccountContact_FlexiPages/flexipages/{Account_Record_Page.flexipage => Account_Record_Page_Indicators.flexipage} (99%) rename unpackaged/config/sample_AccountContact_FlexiPages/flexipages/{Contact_Record_Page.flexipage => Contact_Record_Page_Indicators.flexipage} (99%) diff --git a/unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page.flexipage b/unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page_Indicators.flexipage similarity index 99% rename from unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page.flexipage rename to unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page_Indicators.flexipage index 31ee658..1a57043 100644 --- a/unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page.flexipage +++ b/unpackaged/config/sample_AccountContact_FlexiPages/flexipages/Account_Record_Page_Indicators.flexipage @@ -266,7 +266,7 @@ sidebar Region - Account Record Page + Account Record Page (Indicators) sfa__Account_rec_L Account