On the serviceRecommendation component, we get the recommended service's iconName based on the icons map in the serviceTypeMap.js file.
After making the Type__c field multi select, we also moved the logic to populate the list of program types through the method getRecommendations.getProgramTypes(). This populates the list of program type names on ServiceRecommendation.ProgramIcons.
To show the program type icons, I want to loop through the ProgramIcons list and show the icon name (ex. custom:51) on the lightning-icon tag. Since I'm populating the ProgramIcons list on the server side, does it make more sense to move the icons Map logic from Javascript to Apex? Is there anything I'm missing?
On the serviceRecommendation component, we get the recommended service's iconName based on the icons map in the serviceTypeMap.js file.
After making the Type__c field multi select, we also moved the logic to populate the list of program types through the method getRecommendations.getProgramTypes(). This populates the list of program type names on ServiceRecommendation.ProgramIcons.
To show the program type icons, I want to loop through the ProgramIcons list and show the icon name (ex. custom:51) on the lightning-icon tag. Since I'm populating the ProgramIcons list on the server side, does it make more sense to move the icons Map logic from Javascript to Apex? Is there anything I'm missing?