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

Commit e1ecc29

Browse files
author
Nick Litwin
committed
Fix merge conflicts
2 parents 4957380 + 820e13b commit e1ecc29

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

app/directives/challenge-links/challenge-links.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
p(ng-switch-when="MARATHON_MATCH") {{challenge.numRegistrants[0]}}
55
p(ng-switch-default) {{challenge.numRegistrants}}
66

7-
a.submissions(ng-hide="challenge.track === 'DATA_SCIENCE'", ng-href="{{challenge|challengeLinks:'registrants'}}")
7+
a.submissions(ng-hide="challenge.track === 'DATA_SCIENCE'", ng-href="{{challenge|challengeLinks:'submissions'}}")
88
.icon.submissions-icon
99
p {{challenge.numSubmissions}}
1010

app/directives/ios-card/ios-card.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
p {{challenge.numRegistrants}}
1616

17-
a.submissions(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#viewRegistrant")
17+
a.submissions(ng-href="https://www.{{DOMAIN}}/challenge-details/{{challenge.id}}/?type={{challenge.track}}#submissions")
1818
.submissions-icon
1919

2020
p {{challenge.numSubmissions}}

app/filters/challengeLinks.filter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
};
3030
switch (type) {
3131
case 'forums':
32-
switch (challenge.track) {
32+
switch (challenge.track.toLowerCase()) {
3333
case 'develop':
3434
return String.supplant('https://apps.{domain}/forums/?module=Category&categoryID={forumId}', data);
3535
case 'data':
@@ -39,6 +39,7 @@
3939
}
4040

4141
case 'submissions':
42+
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#submissions', data);
4243
case 'registrants':
4344
return String.supplant('https://www.{domain}/challenge-details/{id}/?type={track}#viewRegistrant', data);
4445
case 'detail':

app/filters/filters.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('filters', function() {
7070
expect(challengeLinksFilter(_ch, 'detail')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=develop');
7171
expect(challengeLinksFilter(_ch, 'forums')).to.be.equal('https://apps.'+domain+'/forums/?module=Category&categoryID=2');
7272
expect(challengeLinksFilter(_ch, 'registrants')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=develop#viewRegistrant');
73-
expect(challengeLinksFilter(_ch, 'submissions')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=develop#viewRegistrant');
73+
expect(challengeLinksFilter(_ch, 'submissions')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=develop#submissions');
7474
});
7575

7676
it ('should have the correct links for DESIGN challenge', function() {
@@ -83,7 +83,7 @@ describe('filters', function() {
8383
expect(challengeLinksFilter(_ch, 'detail')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=design');
8484
expect(challengeLinksFilter(_ch, 'forums')).to.be.equal('https://apps.'+domain+'/forums/?module=ThreadList&forumId=2');
8585
expect(challengeLinksFilter(_ch, 'registrants')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=design#viewRegistrant');
86-
expect(challengeLinksFilter(_ch, 'submissions')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=design#viewRegistrant');
86+
expect(challengeLinksFilter(_ch, 'submissions')).to.be.equal('https://www.'+domain+'/challenge-details/1/?type=design#submissions');
8787
});
8888

8989
it ('should have the correct links for DATA_SCIENCE challenge', function() {

app/services/api.service.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ import _ from 'lodash'
7171
function getApiServiceProvider(type) {
7272
switch (type.toUpperCase()) {
7373
case 'AUTH':
74+
case 'SUBMISSIONS':
7475
case 'USER':
7576
return _getRestangularV3(CONSTANTS.AUTH_API_URL)
7677
default:

app/services/submissions.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
SubmissionsService.$inject = ['CONSTANTS', 'ApiService', '$q', '$log', 'toaster'];
77

88
function SubmissionsService(CONSTANTS, ApiService, $q, $log, toaster) {
9-
var api = ApiService.restangularV3;
9+
var api = ApiService.getApiServiceProvider('SUBMISSIONS');
1010

1111
var service = {
1212
getPresignedURL: getPresignedURL,

app/submissions/submissions.spec.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Submissions Controller', function() {
1212

1313
var state = {
1414
go: sinon.spy()
15-
}
15+
};
1616

1717
beforeEach(function() {
1818
bard.appModule('tc.submissions')
@@ -60,7 +60,6 @@ describe('Submissions Controller', function() {
6060

6161
describe('routes to the correct child state for', function() {
6262
it('design challenges', function() {
63-
6463
expect(state.go).calledWith('submissions.file-design')
6564
})
6665

0 commit comments

Comments
 (0)