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

Commit fba5dfc

Browse files
author
vikasrohit
committed
SUP-2387, Dealing with stats for design and non-rated sub-tracks
-- Showed the statistics tab for non rated tracks (design specifically)
1 parent 80a8b1c commit fba5dfc

File tree

5 files changed

+47
-9
lines changed

5 files changed

+47
-9
lines changed

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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
vm.pageName = vm.subTrack.toLowerCase().replace(/_/g, ' ');
2929

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

3533
if (vm.track !== 'COPILOT') {
3634
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

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)