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

Commit c7a0c1c

Browse files
author
vikasrohit
committed
Revert "SUP-2086, 3rd Auto help is being displayed wrong."
This reverts commit 11b5b8e.
1 parent 11b5b8e commit c7a0c1c

File tree

2 files changed

+103
-71
lines changed

2 files changed

+103
-71
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
(function () {
2+
'use strict';
3+
4+
angular.module('tc.myDashboard').controller('MyDashboardController', MyDashboardController);
5+
6+
MyDashboardController.$inject = ['userIdentity', 'ProfileService', '$log'];
7+
8+
function MyDashboardController(userIdentity, ProfileService, $log) {
9+
var vm = this;
10+
11+
activate();
12+
13+
function activate() {
14+
vm.showSRMs = false;
15+
vm.isCopilot = _.includes(userIdentity.roles, 'copilot');
16+
17+
displaySRMsBasedOnTrack();
18+
}
19+
20+
function displaySRMsBasedOnTrack() {
21+
ProfileService.getUserProfile(userIdentity.handle)
22+
.then(function(userProfile) {
23+
var isDesigner = _.includes(userProfile.tracks, 'DESIGN');
24+
25+
if (isDesigner && userProfile.tracks.length === 1) {
26+
vm.showSRMs = false;
27+
} else {
28+
vm.showSRMs = true;
29+
}
30+
})
31+
.catch(function(err) {
32+
vm.showSRMs = false;
33+
$log.error(err);
34+
})
35+
}
36+
}
37+
})();

app/profile/about/about.jade

Lines changed: 66 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,103 +3,98 @@
33

44
.profile-about-container
55

6-
#skills
7-
tc-section(ng-show="vm.displaySection.skills", state="profileVm.status.skills")
6+
tc-section(id="skills", ng-show="vm.displaySection.skills", state="profileVm.status.skills" class="skills")
87

9-
.skills
10-
h3.activity Skills
8+
h3.activity Skills
119

12-
.list(ng-show="profileVm.skills && profileVm.skills.length > 0")
10+
.list(ng-show="profileVm.skills && profileVm.skills.length > 0")
1311

14-
.skill(ng-repeat="skill in vm.skills")
15-
skill-tile(skill="skill")
12+
.skill(ng-repeat="skill in vm.skills")
13+
skill-tile(skill="skill")
1614

17-
button.tc-btn.tc-btn-secondary.tc-btn-l.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
18-
button.tc-btn.tc-btn-secondary.tc-btn-l.more(ng-if="vm.skills.length > 6", ng-click="vm.skills = vm.someSkills") VIEW LESS
15+
button.tc-btn.tc-btn-secondary.tc-btn-l.more(ng-if="vm.skills.length < vm.fullSkills.length", ng-click="vm.skills = vm.fullSkills") VIEW ALL
16+
button.tc-btn.tc-btn-secondary.tc-btn-l.more(ng-if="vm.skills.length > 6", ng-click="vm.skills = vm.someSkills") VIEW LESS
1917

20-
.empty-state(ng-show="!profileVm.skills || (profileVm.skills && profileVm.skills.length == 0)")
21-
.action-text Tell everyone what you know
18+
.empty-state(ng-show="!profileVm.skills || (profileVm.skills && profileVm.skills.length == 0)")
19+
.action-text Tell everyone what you know
2220

23-
.list
24-
.skill(ng-repeat="skill in vm.sampleSkills")
25-
skill-tile(skill="skill")
21+
.list
22+
.skill(ng-repeat="skill in vm.sampleSkills")
23+
skill-tile(skill="skill")
2624

27-
.description You can add languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.
25+
.description You can add languages, environments, frameworks, libraries, platforms, tools, and any other technologies that you know well.
2826

29-
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") ADD SKILLS
27+
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") ADD SKILLS
3028

31-
#tcActivity
32-
tc-section(ng-show="vm.displaySection.stats", state="profileVm.status.stats")
29+
tc-section(ng-show="vm.displaySection.stats", state="profileVm.status.stats")
3330

34-
.categories
31+
.categories
3532

36-
h3.activity Activity on Topcoder
33+
h3.activity(id="tcActivity") Activity on Topcoder
3734

38-
.empty-state(ng-if="!profileVm.numProjects")
39-
.action-text Start competing within the community
40-
.tracks
41-
.track.noclick(ng-repeat="track in ['DEVELOP', 'DESIGN', 'DATA_SCIENCE']")
42-
div(class="{{profileVm.imgMap[track]}}-icon")
43-
div
44-
.text {{track | track}}
45-
.description Compete in challenges to win money, test yourself against the world's best, and learn new skills. Your performance rating will show up here.
46-
a.tc-btn.tc-btn-l.link-button(href="/challenges") FIND CHALLENGES
35+
.empty-state(ng-if="!profileVm.numProjects")
36+
.action-text Start competing within the community
37+
.tracks
38+
.track.noclick(ng-repeat="track in ['DEVELOP', 'DESIGN', 'DATA_SCIENCE']")
39+
div(class="{{profileVm.imgMap[track]}}-icon")
40+
div
41+
.text {{track | track}}
42+
.description Compete in challenges to win money, test yourself against the world's best, and learn new skills. Your performance rating will show up here.
43+
a.tc-btn.tc-btn-l.link-button(href="/challenges") FIND CHALLENGES
4744

48-
.track(
49-
ng-repeat="track in profileVm.profile.tracks",
50-
ng-if="profileVm.categories[track].length > 0",
51-
id="{{track}}_TRACK"
52-
)
45+
.track(
46+
ng-repeat="track in profileVm.profile.tracks",
47+
ng-if="profileVm.categories[track].length > 0",
48+
id="{{track}}_TRACK"
49+
)
5350

54-
div(class="name")
55-
img(ng-if="track == 'DATA_SCIENCE'", src="/images/ico-track-data-outline.svg")
56-
img(ng-if="track == 'DEVELOP'", src="/images/ico-track-develop-outline.svg")
57-
img(ng-if="track == 'DESIGN'", src="/images/ico-track-design-outline.svg")
58-
img(ng-if="track == 'COPILOT'", src="/images/ico-track-co_pilot-outline.svg")
59-
span {{track | track | uppercase}}
51+
div(class="name")
52+
img(ng-if="track == 'DATA_SCIENCE'", src="/images/ico-track-data-outline.svg")
53+
img(ng-if="track == 'DEVELOP'", src="/images/ico-track-develop-outline.svg")
54+
img(ng-if="track == 'DESIGN'", src="/images/ico-track-design-outline.svg")
55+
img(ng-if="track == 'COPILOT'", src="/images/ico-track-co_pilot-outline.svg")
56+
span {{track | track | uppercase}}
6057

61-
a.subtrack(
62-
ng-repeat="subtrack in profileVm.categories[track]",
63-
ui-sref="profile.subtrack({track: subtrack.track, subTrack: subtrack.subTrack})",
64-
class="{{$index == 0 && 'first'}}"
65-
)
66-
.name {{subtrack.subTrack | track}}
58+
a.subtrack(
59+
ng-repeat="subtrack in profileVm.categories[track]",
60+
ui-sref="profile.subtrack({track: subtrack.track, subTrack: subtrack.subTrack})",
61+
class="{{$index == 0 && 'first'}}"
62+
)
63+
.name {{subtrack.subTrack | track}}
6764

68-
.ranking(ng-if="subtrack.rating")
69-
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
70-
| {{subtrack.rating}}
71-
span.square(style="background-color: {{subtrack.rating | ratingColor}}")
65+
.ranking(ng-if="subtrack.rating")
66+
.number.rating(style="color: {{subtrack.rating | ratingColor}}")
67+
| {{subtrack.rating}}
68+
span.square(style="background-color: {{subtrack.rating | ratingColor}}")
7269

73-
.tag Rating
70+
.tag Rating
7471

75-
.ranking(ng-if="subtrack.rank && !subtrack.rating")
76-
.number {{subtrack.rank | ordinal}}
72+
.ranking(ng-if="subtrack.rank && !subtrack.rating")
73+
.number {{subtrack.rank | ordinal}}
7774

78-
.tag Ranking
75+
.tag Ranking
7976

80-
.ranking(ng-if="subtrack.wins && !subtrack.rank && !subtrack.rating")
81-
.number(style="color: #21B2F1") {{subtrack.wins}}
77+
.ranking(ng-if="subtrack.wins && !subtrack.rank && !subtrack.rating")
78+
.number(style="color: #21B2F1") {{subtrack.wins}}
8279

83-
.tag Wins
80+
.tag Wins
8481

85-
.ranking(ng-if="subtrack.fulfillment")
86-
.number {{subtrack.fulfillment + '%'}}
82+
.ranking(ng-if="subtrack.fulfillment")
83+
.number {{subtrack.fulfillment + '%'}}
8784

88-
.tag Fulfillment
85+
.tag Fulfillment
8986

90-
img.arrow(src="/images/ico-arrow-big-right.svg")
87+
img.arrow(src="/images/ico-arrow-big-right.svg")
9188

92-
#externalLinks
93-
tc-section(ng-show="vm.displaySection.externalLinks", state="profileVm.status.externalLinks")
94-
.external-links
95-
h3.activity Activity across the web
96-
external-links-data(ng-show="vm.hasLinks", external-links="vm.linkedExternalAccounts", linked-accounts-data="vm.linkedExternalAccountsData")
89+
tc-section(id="externalLinks", ng-show="vm.displaySection.externalLinks", state="profileVm.status.externalLinks" class="external-links")
90+
h3.activity Activity across the web
91+
external-links-data(ng-show="vm.hasLinks", external-links="vm.linkedExternalAccounts", linked-accounts-data="vm.linkedExternalAccountsData")
9792

98-
.empty-state(ng-hide="vm.hasLinks")
99-
.action-text Showcase your work from around the web
93+
.empty-state(ng-hide="vm.hasLinks")
94+
.action-text Showcase your work from around the web
10095

101-
external-accounts.external-account-container(linked-accounts="[]", links-data="{}", read-only="true")
96+
external-accounts.external-account-container(linked-accounts="[]", links-data="{}", read-only="true")
10297

103-
.description Show off your work and experience outside of Topcoder. Connect accounts from popular services and networks or add a link to any site.
98+
.description Show off your work and experience outside of Topcoder. Connect accounts from popular services and networks or add a link to any site.
10499

105-
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") CONNECT ACCOUNTS
100+
button.tc-btn.tc-btn-l.link-button(ui-sref="settings.profile") CONNECT ACCOUNTS

0 commit comments

Comments
 (0)