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

Commit 82ac435

Browse files
author
Nick Litwin
committed
Merge branch 'dev' into persistent-placeholder
2 parents 63863fa + b1167e6 commit 82ac435

File tree

4 files changed

+10
-50
lines changed

4 files changed

+10
-50
lines changed

app/my-dashboard/header-dashboard/header-dashboard.controller.js

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,12 @@
77
'$stateParams',
88
'NotificationService',
99
'ProfileService',
10-
'CONSTANTS',
11-
'userIdentity',
12-
'$q'
10+
'userIdentity'
1311
];
1412

15-
function HeaderDashboardController($stateParams, NotificationService, ProfileService, CONSTANTS, userIdentity, $q) {
13+
function HeaderDashboardController($stateParams, NotificationService, ProfileService, userIdentity) {
1614
var vm = this;
17-
vm.domain = CONSTANTS.domain;
18-
vm.isCopilot = false;
1915
vm.loading = true;
20-
vm.hasRatings = true;
21-
vm.rankStats = [];
2216

2317
if ($stateParams.notifyReset) {
2418
NotificationService.inform('Thanks. Your new password has been set.');
@@ -29,25 +23,13 @@
2923
function activate() {
3024
var handle = userIdentity.handle;
3125

32-
$q.all([
33-
ProfileService.getUserStats(handle),
34-
ProfileService.getUserFinancials(handle)
35-
]).then(function(data) {
36-
var stats = data[0];
37-
var financials = data[1];
38-
26+
ProfileService.getUserFinancials(handle)
27+
.then(function(financials) {
3928
vm.moneyEarned = _.sum(_.pluck(financials, 'amount'));
40-
41-
if (stats.COPILOT != null) {
42-
vm.numCopilotActiveContests = stats.COPILOT.activeContests;
43-
} else {
44-
vm.numCopilotActiveContests = 0;
45-
}
46-
4729
vm.loading = false;
30+
4831
})
4932
.catch(function(err) {
50-
vm.hasRatings = false;
5133
vm.loading = false;
5234
});
5335
}

app/my-dashboard/header-dashboard/header-dashboard.jade

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ header
22
h1 My Dashboard
33

44
.user-stats(id="metrics", ng-hide="vm.loading")
5-
.copilot-challenges(ng-show="dashboard.isCopilot")
6-
p.number(ng-bind='vm.numCopilotActiveContests')
7-
8-
p Copilot Challenges
9-
10-
.slash(ng-show="dashboard.isCopilot")
11-
125
.money-earned
136
p.number(ng-bind="vm.moneyEarned | currency:'$':0")
147

app/my-dashboard/subtrack-stats/subtrack-stats.controller.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
function compileSubtracks(trackRanks) {
3737
return _.reduce(trackRanks, function(result, subtracks, track) {
38-
if (Array.isArray(subtracks) && subtracks.length && track !== 'COPILOT') {
38+
if (Array.isArray(subtracks) && subtracks.length) {
3939
if (track === 'DEVELOP') {
4040
_.remove(subtracks, function(subtrackObj) {
4141
return subtrackObj.subTrack === 'COPILOT_POSTING';
@@ -56,6 +56,9 @@
5656
if (subtrack.track === 'DESIGN') {
5757
subtrack.stat = subtrack.wins;
5858
subtrack.statType = 'Wins';
59+
} else if (subtrack.track === 'COPILOT') {
60+
subtrack.stat = subtrack.activeContests;
61+
subtrack.statType = 'Challenges';
5962
} else {
6063
subtrack.stat = subtrack.rating;
6164
subtrack.statType = 'Rating';

assets/css/my-dashboard/header-dashboard.scss

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,7 @@
4545
margin-bottom: 0;
4646
}
4747

48-
.slash {
49-
@include forward-slash(1px, 40px, 0, 2px, 30deg);
50-
margin-right: 8px;
51-
background-color: #D1D3D4;
52-
@media only screen and (min-width: 600px) {
53-
@include forward-slash(1px, 45px, 0, 2px, 30deg);
54-
margin-right: 10px;
55-
}
56-
}
57-
58-
.money-earned, .copilot-challenges {
48+
.money-earned {
5949
display: flex;
6050
flex-direction: column;
6151
text-align: right;
@@ -91,14 +81,6 @@
9181
padding-left: 10px;
9282
}
9383
}
94-
95-
.copilot-challenges {
96-
margin-right: 10px;
97-
padding-right: 15px;
98-
@media only screen and (min-width: 600px) {
99-
padding-right: 10px;
100-
}
101-
}
10284
}
10385
}
10486
}

0 commit comments

Comments
 (0)