diff --git a/app/directives/page-state-header/page-state-header.directive.js b/app/directives/page-state-header/page-state-header.directive.js index 990a2b53b..61ab1fbd6 100644 --- a/app/directives/page-state-header/page-state-header.directive.js +++ b/app/directives/page-state-header/page-state-header.directive.js @@ -64,17 +64,10 @@ import _ from 'lodash' // gets member's profile ProfileService.getUserProfile(vm.handle).then(function(profile) { vm.profile = profile - // get members dashboard badge UserService.getV2UserProfile(vm.handle).then(function(resp) { - - var dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0] - if (dashboardAchievement) { - //Get dashboard badges - vm.dashboardBadge = BadgeService.getAchievementVm(dashboardAchievement) - } + vm.dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0] }) - }) // get member's challenges to display number of active challenges @@ -84,8 +77,9 @@ import _ from 'lodash' ]).then(function(challenges){ var marathonMatches = challenges[0] var devDesignChallenges = challenges[1] - + vm.activeChallenges = marathonMatches.length + devDesignChallenges.length + }) displayMoneyEarned(vm.handle) @@ -132,6 +126,5 @@ import _ from 'lodash' return (achievement.description === vm.dashboardBadgeName) }) } - } })() diff --git a/app/directives/page-state-header/page-state-header.jade b/app/directives/page-state-header/page-state-header.jade index 9bbe1e0bb..734fcac4a 100644 --- a/app/directives/page-state-header/page-state-header.jade +++ b/app/directives/page-state-header/page-state-header.jade @@ -16,5 +16,6 @@ p.number(ng-bind="vm.moneyEarned | currency:'$':0") .title p Won in Prizes - .badgeItem(ng-if="vm.dashboardBadge") - .badge(ng-class="(vm.dashboardBadge.specificClass || vm.dashboardBadge.groupClass) + ' ' + (vm.dashboardBadge.type) + 'Badge'" title='{{vm.dashboardBadgeName}}') \ No newline at end of file + .badgeItem(ng-if="vm.dashboardAchievement") + .dashboardBadge(title='{{vm.dashboardBadgeName}}') + \ No newline at end of file diff --git a/app/services/badge.service.js b/app/services/badge.service.js index 4e871a0c0..7cd6af778 100644 --- a/app/services/badge.service.js +++ b/app/services/badge.service.js @@ -648,17 +648,8 @@ import moment from 'moment-timezone' name: 'iOS Community', groupClass: 'iOS-Community', active: false - }, - { - id: 1010, - name: 'SRM Engagement Honor', - groupClass: 'SRM-Engagement-Honor-Badge', - active: false } ] } - } - - })() diff --git a/assets/css/directives/badge-tooltip.scss b/assets/css/directives/badge-tooltip.scss index 08ceefc36..42124dd01 100644 --- a/assets/css/directives/badge-tooltip.scss +++ b/assets/css/directives/badge-tooltip.scss @@ -679,6 +679,9 @@ span.subBadge.selected { background-position: 0 0; } -.SRM-Engagement-Honor-Badge { - background-position: -146px -671px; -} \ No newline at end of file +.dashboardBadge { + background: url(../../images/badge05-70x70.png) no-repeat; + width: 70px; + height: 70px; +} + diff --git a/assets/css/directives/page-state-header.directive.scss b/assets/css/directives/page-state-header.directive.scss index 1c7f06ca0..b6c8b84f0 100644 --- a/assets/css/directives/page-state-header.directive.scss +++ b/assets/css/directives/page-state-header.directive.scss @@ -29,7 +29,7 @@ flex-direction: column; justify-content: space-between; align-items: flex-end; - + height: 39px; position: relative; margin-left: 40px; margin-right: 20px; diff --git a/assets/images/badge05-70x70.png b/assets/images/badge05-70x70.png new file mode 100644 index 000000000..d291b9169 Binary files /dev/null and b/assets/images/badge05-70x70.png differ