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

Production release SUP-TCApp-v.1.0.19 #629

Merged
merged 35 commits into from
Dec 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9e916e2
SUP-2728, Add iOS community to Onboarding page (Skill picker)
Dec 16, 2015
45d2b8d
SUP-2728, Add iOS community to Onboarding page (Skill picker)
Dec 17, 2015
145feae
updated version
tladendo Dec 17, 2015
480c675
Merge pull request #617 from appirio-tech/release/v1.0.18
tladendo Dec 18, 2015
d5611c0
Merge pull request #618 from appirio-tech/release/v1.0.18
tladendo Dec 18, 2015
a6cf63e
Merge commit '480c675486fa8b0ab816ff9579c6f453673cc5bb' into HEAD
Dec 18, 2015
5bfb378
Merge pull request #613 from appirio-tech/feature/sup-2728-skill-pick…
Dec 21, 2015
a0079df
SUP-2883, URL should be removed after successful adding as web link.
Dec 21, 2015
82973e8
SUP-2883, URL should be removed after successful adding as web link.
Dec 21, 2015
3c85aac
SUP-2881, Show placements on challenge cards only for "Contest Submis…
Dec 21, 2015
4a3b642
Merge commit '5bfb3787989eeaea34438542cf8b8b7e5a555ce8' into HEAD
Dec 21, 2015
a0d3bc5
Merge pull request #619 from appirio-tech/feature/sup-2883-remove-url…
parthshah Dec 22, 2015
129ca21
Merge pull request #620 from appirio-tech/feature/sup-2881-show-place…
Dec 22, 2015
db014d4
SUP-2773, [Usersnap] New Usersnap feedback logo of android skill is w…
Dec 22, 2015
b5193b3
Merge pull request #621 from appirio-tech/feature/sup-2773-wrong-andr…
Dec 22, 2015
e44ee40
Merge commit 'b5193b3c40050cc5824233371ae570c69ef64264' into HEAD
Dec 22, 2015
e8798a6
added links
tladendo Dec 22, 2015
397cd57
added extra link
tladendo Dec 22, 2015
073cd06
updated link
tladendo Dec 22, 2015
5ecaccb
Pass in userId
tladendo Dec 22, 2015
4f34c67
added members links
tladendo Dec 22, 2015
1bf524d
added updated icons
tladendo Dec 22, 2015
68b86b4
SUP-2728, Add iOS community to Onboarding page (Skill picker)
Dec 23, 2015
5230dfc
SUP-2728, Add iOS community to Onboarding page (Skill picker)
Dec 23, 2015
61770d3
Merge pull request #624 from appirio-tech/feature/sup-2728-skill-pick…
Dec 23, 2015
3171989
Merge commit '61770d3c3c265c30e7f5a6521e86a57cb9425720' into HEAD
Dec 23, 2015
0e0abbd
Merge pull request #623 from appirio-tech/feature/SUP-2880
tladendo Dec 23, 2015
676bf5e
fixed link
tladendo Dec 23, 2015
5e4a63e
link updates
tladendo Dec 23, 2015
f47be20
Cleanup
tladendo Dec 23, 2015
9b62668
Merge pull request #622 from appirio-tech/feature/SUP-2390
tladendo Dec 23, 2015
6d4d9a1
Merge pull request #625 from appirio-tech/dev
tladendo Dec 23, 2015
4ba03c6
added last icon
tladendo Dec 23, 2015
585024e
Merge pull request #626 from appirio-tech/feature/SUP-2390
tladendo Dec 23, 2015
586750b
Merge pull request #627 from appirio-tech/dev
tladendo Dec 23, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.17
v1.0.18
5 changes: 3 additions & 2 deletions app/community/members.jade
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
small {{ctrl.currentMonth}}
.members-wrapper
.user-tile(ng-repeat="item in ctrl.memberLeaderboard")
.avatar-wrapper: img(ng-src="{{item.avatar}}")
.user-name {{item.name}}
a.avatar-wrapper(ui-sref="profile.about({userHandle: item.name})")
img(ng-src="{{item.avatar}}")
a.user-name(ui-sref="profile.about({userHandle: item.name})") {{item.name}}
.user-tag(class="{{item.class}}") {{item.contestType}}
p.user-desc {{item.description}}
a(ng-href="//www.{{ctrl.domain}}/community/member-programs/topcoder-member-of-the-month/", target="_blank").user-more Read the story
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
$scope.imageURL = $scope.challenge.userDetails.submissions[0].submissionImage && $scope.challenge.userDetails.submissions[0].submissionImage.full;
$scope.selectedImage = $scope.imageURL;

$scope.challenge.highestPlacement = _.max($scope.challenge.userDetails.submissions, 'placement').placement;
$scope.challenge.highestPlacement = _.min($scope.challenge.userDetails.submissions.filter(function(submission) {
return submission.type === CONSTANTS.SUBMISSION_TYPE_CONTEST && submission.placement;
}), 'placement').placement;

if ($scope.challenge.highestPlacement == 1) {
$scope.challenge.wonFirst = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
$log.debug("Web link added: " + JSON.stringify(data));
data.data.provider = data.provider;
$scope.linkedAccounts.push(data.data);
// reset the form when it is successfully added
$scope.addWebLinkFrm.$setPristine();
$scope.url = null;
toaster.pop('success', "Success", "Your link has been added. Data from your link will be visible on your profile shortly.");
})
.catch(function(resp) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,29 @@ describe('ExternalWebLinks Directive', function() {
});
expect(topcoderLink).to.exist;
expect(topcoderLink.status).to.exist.to.equal('PENDING');
expect(element.isolateScope().url).not.to.exist;
expect(toasterSvc.pop).to.have.been.calledWith('success').calledOnce;
});

it('should NOT add new weblink to linkedAccounts', function() {
var urlToAdd = 'https://www.topcoder.com';
element.isolateScope().userHandle = 'throwError';
element.isolateScope().url = 'https://www.topcoder.com';
element.isolateScope().url = urlToAdd;
element.isolateScope().addWebLink();
scope.$digest();
expect(scope.linkedAccounts).to.have.length(1);
expect(element.isolateScope().url).to.exist.to.equal(urlToAdd);
expect(toasterSvc.pop).to.have.been.calledWith('error').calledOnce;
});

it('should NOT add new weblink to linkedAccounts', function() {
var urlToAdd = 'https://www.topcoder.com';
element.isolateScope().userHandle = 'alreadyExistsError';
element.isolateScope().url = 'https://www.topcoder.com';
element.isolateScope().url = urlToAdd;
element.isolateScope().addWebLink();
scope.$digest();
expect(scope.linkedAccounts).to.have.length(1);
expect(element.isolateScope().url).to.exist.to.equal(urlToAdd);
expect(toasterSvc.pop).to.have.been.calledWith('error').calledOnce;
});

Expand Down
20 changes: 10 additions & 10 deletions app/directives/srm-tile/srm-tile.directive.jade
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.challenge-track

header
a(ng-href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") {{srm.name}}
a(ng-href="https://community.{{DOMAIN}}/stat?c=round_overview&rd={{roundId}}") {{srm.name}}

.srm-details
p.starts-in Starts in #[span {{srm.codingStartAt | timeDiff:"quantity"}} {{srm.codingStartAt | timeDiff:'unit'}}]
Expand All @@ -17,22 +17,22 @@
.phase-status
.registered(ng-show="srm.userStatus === CONSTANTS.REGISTERED") Registered
.unregistered(ng-hide="srm.currentPhase !== CONSTANTS.REGISTRATION || srm.userStatus === CONSTANTS.REGISTERED")
a.tc-btn.tc-btn-s.tc-btn-wide(href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") Register
a.tc-btn.tc-btn-s.tc-btn-wide(href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{roundId}}") Register

.past-srm(ng-show="srm.status === 'PAST'")
.challenge-track

header
a(ng-href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") {{srm.name}}
a(ng-href="https://community.{{DOMAIN}}/stat?c=round_overview&rd={{roundId}}") {{srm.name}}
.ended-on #[span {{srm.codingEndAt | localTime:"MMM DD, YYYY" }}]

.member-stats
p.points #[span {{srm.result.finalPoints }}] #[span Points]
.ranks
.division
a.division(href="https://community.{{DOMAIN}}/stat?c=round_stats&rd={{roundId}}&dn={{division}}")
p.rank {{srm.result.divisionPlacement}}
p.label #[span Division {{srm.result.division}}]
.room
a.room(href="https://community.{{DOMAIN}}/stat?c=coder_room_stats&cr={{userId}}&rd={{roundId}}")
p.rank #[span {{srm.result.roomPlacement}}]
p.label #[span Room]
p.placement Placement
Expand All @@ -42,21 +42,21 @@
.challenge-track
header
.srm-name
a(ng-href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") {{srm.name}}
a(ng-href="https://community.{{DOMAIN}}/stat?c=round_overview&rd={{roundId}}") {{srm.name}}

.srm-details
p.starts-in Starts in #[span {{srm.codingStartAt | timeDiff:"quantity"}} {{srm.codingStartAt | timeDiff:'unit'}}]

.phase-status
.registered(ng-show="srm.userStatus === CONSTANTS.REGISTERED") Registered
.unregistered(ng-hide="srm.currentPhase !== CONSTANTS.REGISTRATION || srm.userStatus === CONSTANTS.REGISTERED")
a.tc-btn.tc-btn-s.tc-btn-wide(href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") Register
a.tc-btn.tc-btn-s.tc-btn-wide(href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{roundId}}") Register

.past-srm(ng-show="srm.status === 'PAST'")
.challenge-track
header
.srm-name
a(ng-href="https://community.{{DOMAIN}}/tc?module=MatchDetails&rd={{srm.rounds[0].id}}") {{srm.name}}
a(ng-href="https://community.{{DOMAIN}}/stat?c=round_overview&rd={{roundId}}") {{srm.name}}

.srm-details
p.ended-on Ended {{srm.codingEndAt | timeDiff:"quantity"}} {{srm.codingEndAt | timeDiff:'unit'}} ago
Expand All @@ -65,10 +65,10 @@
p.points #[span {{srm.result.finalPoints }}] Points

.ranks
.division
a.division(ng-class="{noclick: !srm.result.divisionPlacement}", href="https://community.{{DOMAIN}}/stat?c=round_stats&rd={{roundId}}&dn={{division}}")
p.rank {{srm.result.divisionPlacement}}
p.label #[span Div {{srm.result.division}}] #[span Placement]
.room
a.room(ng-class="{noclick: !srm.result.roomPlacement}", href="https://community.{{DOMAIN}}/stat?c=coder_room_stats&cr={{userId}}&rd={{roundId}}")
p.rank #[span {{srm.result.roomPlacement}}]
p.label #[span Room] #[span Placement]

Expand Down
13 changes: 8 additions & 5 deletions app/directives/srm-tile/srm-tile.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
srm: '=srm',
view: '=',
showResults: '=',
showFooter: '='
showFooter: '=',
userId: '='
},
controller: ['$scope', '$filter', 'CONSTANTS', 'SRMService',
function($scope, $filter, CONSTANTS, SRMService) {
$scope.DOMAIN = CONSTANTS.domain;
$scope.CONSTANTS = CONSTANTS;
$scope.srm.userStatus = _.get($scope.srm, 'userStatus', null);
SRMService.processSRM($scope.srm);
$scope.DOMAIN = CONSTANTS.domain;
$scope.CONSTANTS = CONSTANTS;
$scope.srm.userStatus = _.get($scope.srm, 'userStatus', null);
SRMService.processSRM($scope.srm);
$scope.roundId = $scope.srm.rounds.length && $scope.srm.rounds[0].id;
$scope.division = $scope.srm.result && $scope.srm.result.division;
}]
};
});
Expand Down
1 change: 1 addition & 0 deletions app/my-dashboard/srms/srms.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

var userId = UserService.getUserIdentity().userId;
var handle = UserService.getUserIdentity().handle;
vm.userId = userId;

activate();

Expand Down
2 changes: 1 addition & 1 deletion app/my-dashboard/srms/srms.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ header

tc-section(state="vm.state")
.srm-tiles
srm-tile(ng-repeat="srm in vm.srms", srm="srm", view="'tile'", ng-class="'tile-view'")
srm-tile(ng-repeat="srm in vm.srms", srm="srm", view="'tile'", ng-class="'tile-view'", user-id="vm.userId")

.srm-links-card
.flex-wrapper
Expand Down
1 change: 1 addition & 0 deletions app/my-srms/my-srms.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

var userId = UserService.getUserIdentity().userId;
var userHandle = UserService.getUserIdentity().handle;
vm.userId = userId;
vm.handle = userHandle;

activate();
Expand Down
2 changes: 1 addition & 1 deletion app/my-srms/my-srms.jade
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
.data(ng-class="vm.view + '-view'")
srm-tile.srm-tile(
ng-repeat="srm in vm.srms | orderBy:vm.orderBy:vm.reverseOrder",
srm="srm", view="vm.view", ng-class="vm.view + '-view'", show-results="vm.statusFilter === 'past'")
srm="srm", view="vm.view", ng-class="vm.view + '-view'", show-results="vm.statusFilter === 'past'", user-id="vm.userId")

tc-endless-paginator(state="vm.loading", page-params="vm.pageParams")
2 changes: 1 addition & 1 deletion app/profile/subtrack/data/data-challenges.jade
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

.challenges(ng-show="vm.subTrack == 'SRM'")
.challenge.tile(ng-repeat="challenge in vm.challenges")
srm-tile(srm="challenge", domain="vm.domain", view="'tile'")
srm-tile(srm="challenge", domain="vm.domain", view="'tile'", user-id="profileVm.profile.userId")

.no-challenges(ng-show="!vm.challenges || vm.challenges.length == 0")
| Sorry, no rated SRMs found.
Expand Down
2 changes: 1 addition & 1 deletion app/services/challenge.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
challenge.thumbnailId = challenge.userDetails.submissions[0].id;

challenge.highestPlacement = _.min(challenge.userDetails.submissions.filter(function(submission) {
return submission.placement;
return submission.type === CONSTANTS.SUBMISSION_TYPE_CONTEST && submission.placement;
}), 'placement').placement;

if (challenge.highestPlacement == 1) {
Expand Down
Loading