1
2
3
4
5
6
7
8
9
10
11
12
13
14
| ({
| showDaysOnMarket : function(component) {
| var property = component.get("v.property");
| var daysOnMarket = property.Days_On_Market__c;
| var status = "green";
| if (daysOnMarket > 60) {
| status = 'red';
| } else if (daysOnMarket > 30) {
| status = 'orange'
| }
| component.set("v.status", status);
| component.set("v.formattedDateListed", new Date(property.Date_Listed__c).toLocaleString('en-US', {month: 'short', year: 'numeric', day: 'numeric'}));
| }
| })
|
|