Skip to content

Commit

Permalink
Fixed issue where static text was not limted to 3 chars in caps
Browse files Browse the repository at this point in the history
  • Loading branch information
tschug committed Nov 12, 2023
1 parent 65416cc commit 932dd4b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions force-app/main/default/lwc/indicatorBundle/indicatorBundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ export default class IndicatorBundle extends LightningElement {
//If no Icon Text is entered if the field is a Boolean then show the icon otherwise show the field value
...dataValue || dataValue === 0 ? {
...matchedExtension ? {
fTextShown: matchedExtension.TextValue
fTextShown: matchedExtension.TextValue ? matchedExtension.TextValue.toUpperCase().substring(0,3) : ''
} : {
...dataValue && item.TextValue ? {
fTextShown : item.TextValue
fTextShown : item.TextValue.toUpperCase().substring(0,3)
} : {
...item.EmptyStaticBehavior === 'Use Icon Only' ? {
fTextShown : ''
Expand All @@ -323,7 +323,7 @@ export default class IndicatorBundle extends LightningElement {
}
} : {
...(dataValue === false || dataValue === null || dataValue === '') && item.DisplayFalse ? {
fTextShown : item.FalseTextValue ? item.FalseTextValue : ''
fTextShown : item.FalseTextValue ? item.FalseTextValue.toUpperCase().substring(0,3) : ''
} : {
fTextShown : ''
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default class IndicatorBundleKey extends LightningModal {
let normalIcon = {
IndicatorId: item.IndicatorId,
IconName: item.IconName ? item.IconName : '',
TextValue: item.TextValue ? item.TextValue : '',
TextValue: item.TextValue ? item.TextValue.toUpperCase().substring(0,3) : '',
ImageUrl: item.ImageUrl ? item.ImageUrl : '',
HoverValue: item.HoverValue ? '\"' + item.HoverValue + '\"' : 'Field Value',
Priority: '',
Expand Down Expand Up @@ -95,7 +95,7 @@ export default class IndicatorBundleKey extends LightningModal {
let inverseIcon = {
IndicatorId: item.IndicatorId,
IconName: item.FalseIcon ? item.FalseIcon : '',
TextValue: item.FalseTextValue ? item.FalseTextValue : '',
TextValue: item.FalseTextValue ? item.FalseTextValue.toUpperCase().substring(0,3) : '',
ImageUrl: item.FalseImageUrl ? item.FalseImageUrl : '',
HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field Value',
Priority: '',
Expand Down Expand Up @@ -157,7 +157,7 @@ export default class IndicatorBundleKey extends LightningModal {
};

if(ext.ContainsText) {
extensionIcon.ExtensionLogic = item.FieldLabel + ' ' + ext.Operator.toUpperCase() + ' \"' + ext.ContainsText + '\"';
extensionIcon.ExtensionLogic = item.FieldLabel + ' ' + ext.TextOperator.toUpperCase() + ' \"' + ext.ContainsText + '\"';
} else if (ext.Minimum || ext.Minimum === 0) {
let range = item.FieldLabel + ' greater than or equal to ' + ext.Minimum;
if(ext.Maximum){
Expand Down
2 changes: 1 addition & 1 deletion force-app/main/default/lwc/key/key.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h2>Item is not active. No indicators will be shown, even if they are active.</
<lightning-layout-item padding="around-small" size="1" class="slds-border_bottom">
<b>Fill Type </b>
<span style="position:relative; top:-4px;">
<lightning-helptext content="Fill Type indicates if the indicator using a Lightning icon display's static text over an icon, the field's value over an icon, or only the icon."></lightning-helptext>
<lightning-helptext content="Fill Type indicates if the indicator using an image, an image with a fallback icon, static text over an icon, the field's value over an icon, or only the icon."></lightning-helptext>
</span>
</lightning-layout-item>
</template>
Expand Down
8 changes: 4 additions & 4 deletions force-app/main/default/lwc/key/key.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class Key extends LightningElement {
let normalIcon = {
IndicatorId: item.IndicatorId,
IconName: item.IconName ? item.IconName : '',
TextValue: item.TextValue ? item.TextValue : '',
TextValue: item.TextValue ? item.TextValue.toUpperCase().substring(0,3) : '',
ImageUrl: item.ImageUrl ? item.ImageUrl : '',
HoverValue: item.HoverValue ? '\"' + item.HoverValue + '\"' : 'Field Value',
Priority: '',
Expand All @@ -112,7 +112,7 @@ export default class Key extends LightningElement {
normalIcon.showItem = hasManagePermission;
}
if(item.EmptyStaticBehavior == 'Use Field Value'){
normalIcon.TextValue = '\xa0Abc\r\n\xa0123';
normalIcon.TextValue = '\xa0ABC\r\n\xa0123';
normalIcon.Description = 'Displays the field\'s value inside the indicator';
}
if(item.Extensions){
Expand Down Expand Up @@ -140,7 +140,7 @@ export default class Key extends LightningElement {
let inverseIcon = {
IndicatorId: item.IndicatorId,
IconName: item.FalseIcon ? item.FalseIcon : '',
TextValue: item.FalseTextValue ? item.FalseTextValue : '',
TextValue: item.FalseTextValue ? item.FalseTextValue.toUpperCase().substring(0,3) : '',
ImageUrl: item.FalseImageUrl ? item.FalseImageUrl : '',
HoverValue: item.FalseHoverValue ? '\"' + item.FalseHoverValue + '\"' : 'Field Value',
Priority: '',
Expand Down Expand Up @@ -197,7 +197,7 @@ export default class Key extends LightningElement {
let extensionIcon = {
IndicatorId: ext.ExtensionId,
IconName: ext.ExtensionIconValue ? ext.ExtensionIconValue : '',
TextValue: ext.ExtensionTextValue ? ext.ExtensionTextValue : '',
TextValue: ext.ExtensionTextValue ? ext.ExtensionTextValue.toUpperCase().substring(0,3) : '',
ImageUrl: ext.ExtensionImageUrl ? ext.ExtensionImageUrl : '',
HoverValue: ext.ExtensionHoverText ? '\"' + ext.ExtensionHoverText + '\"' : 'Field Value',
Priority: ext.PriorityOrder ? ext.PriorityOrder : '',
Expand Down

0 comments on commit 932dd4b

Please sign in to comment.