Skip to content

Commit

Permalink
Merge pull request #1234 from appirio-tech/dev
Browse files Browse the repository at this point in the history
badge updates
  • Loading branch information
ajefts authored Oct 5, 2017
2 parents 121a132 + 1863429 commit 3d02bc8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 25 deletions.
13 changes: 3 additions & 10 deletions app/directives/page-state-header/page-state-header.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -132,6 +126,5 @@ import _ from 'lodash'
return (achievement.description === vm.dashboardBadgeName)
})
}

}
})()
5 changes: 3 additions & 2 deletions app/directives/page-state-header/page-state-header.jade
Original file line number Diff line number Diff line change
Expand Up @@ -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}}')
.badgeItem(ng-if="vm.dashboardAchievement")
.dashboardBadge(title='{{vm.dashboardBadgeName}}')

9 changes: 0 additions & 9 deletions app/services/badge.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}

}


})()
9 changes: 6 additions & 3 deletions assets/css/directives/badge-tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,9 @@ span.subBadge.selected {
background-position: 0 0;
}

.SRM-Engagement-Honor-Badge {
background-position: -146px -671px;
}
.dashboardBadge {
background: url(../../images/badge05-70x70.png) no-repeat;
width: 70px;
height: 70px;
}

2 changes: 1 addition & 1 deletion assets/css/directives/page-state-header.directive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Binary file added assets/images/badge05-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3d02bc8

Please sign in to comment.