From 227a0e1a17bdbfe1b7998d682101f7eef3278399 Mon Sep 17 00:00:00 2001 From: vikasrohit Date: Mon, 26 Oct 2015 18:08:54 -0700 Subject: [PATCH] SUP-2250, Grey color for handle should be more darker than current one. -- Updated color for unrated members. Identified unrated members by having null rating field. If a member has 0 rating it would be treated with grey color. --- app/filters/rating-color.filter.js | 2 +- app/services/profile.service.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/filters/rating-color.filter.js b/app/filters/rating-color.filter.js index 01d21348d..493353b42 100644 --- a/app/filters/rating-color.filter.js +++ b/app/filters/rating-color.filter.js @@ -10,7 +10,7 @@ if (typeof rating === 'string') rating = parseInt(rating.replace(",", "")); colors = colors.filter(function(color) { - return rating >= color.start && rating <= color.end; + return rating !== null && rating >= color.start && rating <= color.end; }); return colors[0] && colors[0].color || 'black'; } diff --git a/app/services/profile.service.js b/app/services/profile.service.js index f03200434..8b547df6d 100644 --- a/app/services/profile.service.js +++ b/app/services/profile.service.js @@ -286,7 +286,7 @@ } function getUserHandleColor(profile) { - var rating = _.get(profile, 'maxRating.rating', 0); + var rating = _.get(profile, 'maxRating.rating', null); return $filter('ratingColor')(rating); }