Skip to content

Commit

Permalink
Relabel calculation mode in manage
Browse files Browse the repository at this point in the history
  • Loading branch information
aheber committed Mar 17, 2024
1 parent e5acaf9 commit 374fa75
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions dlrs/main/lwc/manageRollups/manageRollups.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ import {
isEmpEnabled
} from "lightning/empApi";

const STATUS_LABELS = {
Scheduled: "Watch and Process",
Realtime: "Realtime",
"Process Builder": "Automatable",
Developer: "Developer"
};

export default class ManageRollups extends NavigationMixin(LightningElement) {
dtColumns = [
{
Expand Down Expand Up @@ -105,6 +112,16 @@ export default class ManageRollups extends NavigationMixin(LightningElement) {

async refreshRollups() {
this.rollups = await getAllRollupConfigs();

Object.keys(this.rollups).forEach((k) => {
this.rollups[k] = {
...this.rollups[k],
CalculationMode__c:
STATUS_LABELS[this.rollups[k].CalculationMode__c] ??
this.rollups[k].CalculationMode__c
};
});

if (Object.values(this.rollups).length === 0) {
// no rollups in the database, start to create a new one
this.openEditor(null);
Expand Down

0 comments on commit 374fa75

Please sign in to comment.