From 374fa75aaf4982e70275dfc2dac99ac4a6fca9f4 Mon Sep 17 00:00:00 2001 From: Heber Date: Sun, 17 Mar 2024 16:51:19 -0600 Subject: [PATCH] Relabel calculation mode in manage --- dlrs/main/lwc/manageRollups/manageRollups.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlrs/main/lwc/manageRollups/manageRollups.js b/dlrs/main/lwc/manageRollups/manageRollups.js index 085ceedc..b170d02d 100644 --- a/dlrs/main/lwc/manageRollups/manageRollups.js +++ b/dlrs/main/lwc/manageRollups/manageRollups.js @@ -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 = [ { @@ -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);