Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 1863429

Browse files
authored
Merge pull request #1233 from appirio-tech/issue-450
Fixed dashboard badge size to 70x70 px for better visibility
2 parents 7513cfd + 998390b commit 1863429

File tree

6 files changed

+13
-25
lines changed

6 files changed

+13
-25
lines changed

app/directives/page-state-header/page-state-header.directive.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,10 @@ import _ from 'lodash'
6464
// gets member's profile
6565
ProfileService.getUserProfile(vm.handle).then(function(profile) {
6666
vm.profile = profile
67-
6867
// get members dashboard badge
6968
UserService.getV2UserProfile(vm.handle).then(function(resp) {
70-
71-
var dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0]
72-
if (dashboardAchievement) {
73-
//Get dashboard badges
74-
vm.dashboardBadge = BadgeService.getAchievementVm(dashboardAchievement)
75-
}
69+
vm.dashboardAchievement = _filterDashboardAchievement(resp.Achievements || [])[0]
7670
})
77-
7871
})
7972

8073
// get member's challenges to display number of active challenges
@@ -84,8 +77,9 @@ import _ from 'lodash'
8477
]).then(function(challenges){
8578
var marathonMatches = challenges[0]
8679
var devDesignChallenges = challenges[1]
87-
80+
8881
vm.activeChallenges = marathonMatches.length + devDesignChallenges.length
82+
8983
})
9084

9185
displayMoneyEarned(vm.handle)
@@ -132,6 +126,5 @@ import _ from 'lodash'
132126
return (achievement.description === vm.dashboardBadgeName)
133127
})
134128
}
135-
136129
}
137130
})()

app/directives/page-state-header/page-state-header.jade

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
p.number(ng-bind="vm.moneyEarned | currency:'$':0")
1717
.title
1818
p Won in Prizes
19-
.badgeItem(ng-if="vm.dashboardBadge")
20-
.badge(ng-class="(vm.dashboardBadge.specificClass || vm.dashboardBadge.groupClass) + ' ' + (vm.dashboardBadge.type) + 'Badge'" title='{{vm.dashboardBadgeName}}')
19+
.badgeItem(ng-if="vm.dashboardAchievement")
20+
.dashboardBadge(title='{{vm.dashboardBadgeName}}')
21+

app/services/badge.service.js

-9
Original file line numberDiff line numberDiff line change
@@ -648,17 +648,8 @@ import moment from 'moment-timezone'
648648
name: 'iOS Community',
649649
groupClass: 'iOS-Community',
650650
active: false
651-
},
652-
{
653-
id: 1010,
654-
name: 'SRM Engagement Honor',
655-
groupClass: 'SRM-Engagement-Honor-Badge',
656-
active: false
657651
}
658652
]
659653
}
660-
661654
}
662-
663-
664655
})()

assets/css/directives/badge-tooltip.scss

+6-3
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,9 @@ span.subBadge.selected {
679679
background-position: 0 0;
680680
}
681681

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

assets/css/directives/page-state-header.directive.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
flex-direction: column;
3030
justify-content: space-between;
3131
align-items: flex-end;
32-
32+
height: 39px;
3333
position: relative;
3434
margin-left: 40px;
3535
margin-right: 20px;

assets/images/badge05-70x70.png

24.7 KB
Loading

0 commit comments

Comments
 (0)