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

Commit a84d71c

Browse files
committed
Merge pull request #523 from appirio-tech/feature/quick-fixes-after-ga-release
Feature/quick fixes after ga release
2 parents 9894938 + c0346df commit a84d71c

File tree

7 files changed

+56
-15
lines changed

7 files changed

+56
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// filtering is a separate step to allow multiple pre-processings and filter out in single call
2525
subtrackRanks = UserStatsService.filterStats(subtrackRanks);
2626
// sort subtrack ranks
27-
subtrackRanks = $filter('orderBy')(subtrackRanks, 'mostRecentEventDate', true);
27+
subtrackRanks = $filter('orderBy')(subtrackRanks, 'mostRecentSubmissionDate', true);
2828

2929
vm.subtrackRanks = subtrackRanks;
3030
vm.hasRanks = !!vm.subtrackRanks.length;

app/profile/about/about.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@
6767
)
6868
.name {{subtrack.subTrack | track}}
6969

70-
.ranking(ng-if="subtrack.rating")
70+
.ranking(ng-if="subtrack.statType == 'Rating'")
7171
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
7272
| {{subtrack.rating}}
7373

7474
.tag Rating
7575

76-
.ranking(ng-if="subtrack.rank && !subtrack.rating")
76+
.ranking(ng-if="subtrack.statType == 'Ranking'")
7777
.number {{subtrack.rank | ordinal}}
7878

7979
.tag Ranking
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.design(ng-if="vm.track == 'DESIGN'")
2+
3+
.bottom
4+
h2.detailed Details
5+
6+
ul.vertical-stats
7+
li.first
8+
.left Win Percentage
9+
.right {{vm.typeStats.winPercent | percentage | empty}}
10+
11+
li(ng-if="profileVm.isUser")
12+
.left Inquiries
13+
.right {{vm.typeStats.numInquiries | empty}}
14+
15+
li(ng-if="profileVm.isUser")
16+
.left Submissions
17+
.right {{vm.typeStats.submissions | empty}}
18+
19+
li
20+
.left Submission Rate
21+
.right {{vm.typeStats.submissionRate | percentage | empty}}
22+
23+
li.first(ng-if="profileVm.isUser")
24+
.left Passed Screening
25+
.right {{vm.typeStats.passedScreening | empty}}
26+
27+
li
28+
.left Screening Success Rate
29+
.right {{vm.typeStats.screeningSuccessRate | percentage | empty}}
30+
31+
li
32+
.left Average Placement
33+
.right {{vm.typeStats.avgPlacement | number: 2 | empty}}

app/profile/subtrack/subtrack.controller.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727

2828
vm.pageName = vm.subTrack.toLowerCase().replace(/_/g, ' ');
2929

30-
vm.tabs = [];
31-
if (vm.track !== 'DESIGN') {
32-
vm.tabs.push('statistics');
33-
}
30+
vm.tabs = ['statistics'];
3431

3532
if (vm.track !== 'COPILOT') {
3633
vm.tabs.push( vm.subTrack === 'SRM' ? 'Past srm': 'challenges');

app/profile/subtrack/subtrack.jade

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
p.label {{item.label}}
2121

2222
include ./develop/develop-statistics.jade
23-
//- yes, challenges :( this is confusing and needs refactoring
24-
include ./design/design-challenges.jade
23+
include ./design/design-statistics.jade
2524
include ./data/data-statistics.jade
2625

27-
tc-tab(heading="{{vm.tabs[1]}}", ng-if="vm.track === 'DATA_SCIENCE' || vm.track === 'DEVELOP'")
26+
tc-tab(heading="{{vm.tabs[1]}}")
2827
.subtrack-stats
2928
responsive-carousel(data="vm.subTrackStats", handle="{{vm.handle}}")
3029
.carousel-elem
@@ -37,5 +36,6 @@
3736
p.value(ng-hide="item.label === 'rating'") {{item.val | empty}}
3837

3938
p.label {{item.label}}
40-
include ./develop/develop-challenges.jade
39+
include ./develop/develop-challenges.jade
40+
include ./design/design-challenges.jade
4141
include ./data/data-challenges.jade

app/services/profile.service.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
'rating': subTrack.rank.rating || 0,
109109
'wins': subTrack.wins,
110110
'submissions': (subTrack.submissions && subTrack.submissions.submissions) || 0,
111-
'mostRecentEventDate': new Date(subTrack.mostRecentEventDate)
111+
'mostRecentEventDate': new Date(subTrack.mostRecentEventDate),
112+
'mostRecentSubmissionDate': new Date(subTrack.mostRecentSubmission)
112113
};
113114
}).filter(function(subTrack) {
114115
return !(subTrack.subTrack == 'COPILOT_POSTING' && subTrack.track == 'DEVELOP');
@@ -124,7 +125,8 @@
124125
'challenges': subTrack.challenges,
125126
'wins': subTrack.wins,
126127
'submissions': (subTrack.submissions) || 0,
127-
'mostRecentEventDate': new Date(subTrack.mostRecentEventDate)
128+
'mostRecentEventDate': new Date(subTrack.mostRecentEventDate),
129+
'mostRecentSubmissionDate': new Date(subTrack.mostRecentSubmission)
128130
};
129131
});
130132
}
@@ -135,7 +137,8 @@
135137
'subTrack': 'SRM',
136138
'rank': srmStats.rank.rank,
137139
'rating': srmStats.rank.rating,
138-
'mostRecentEventDate': new Date(srmStats.rank.mostRecentEventDate)
140+
'mostRecentEventDate': new Date(srmStats.rank.mostRecentEventDate),
141+
'mostRecentSubmissionDate': new Date(srmStats.mostRecentSubmission)
139142
});
140143
}
141144
if (stats.DATA_SCIENCE && stats.DATA_SCIENCE.MARATHON_MATCH && stats.DATA_SCIENCE.MARATHON_MATCH.rank) {
@@ -145,7 +148,8 @@
145148
'subTrack': 'MARATHON_MATCH',
146149
'rank': marathonStats.rank.rank,
147150
'rating': marathonStats.rank.rating,
148-
'mostRecentEventDate': new Date(marathonStats.rank.mostRecentEventDate)
151+
'mostRecentEventDate': new Date(marathonStats.rank.mostRecentEventDate),
152+
'mostRecentSubmissionDate': new Date(marathonStats.mostRecentSubmission)
149153
});
150154
}
151155
if (stats.COPILOT) {

assets/css/profile/subtrack.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,13 @@
527527
}
528528

529529
}
530+
531+
.design {
532+
// override height of the statistics section for design track as we don't have limited stats for design
533+
ul.vertical-stats {
534+
height: 200px;
535+
}
536+
}
530537
}
531538
}
532539
.categoryNav {

0 commit comments

Comments
 (0)