Salesforce-org-Impact-Labs / 01HousingandHomelessness

Impact Lab - Housing & Homelessness
BSD 3-Clause "New" or "Revised" License
12 stars 12 forks source link

moving serviceTypeMap to Apex method getRecommendations.getProgramTypes() #199

Open AIrwin33 opened 4 years ago

AIrwin33 commented 4 years ago

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?

AIrwin33 commented 4 years ago

@mshanemc Let me know what you think about this approach