Skip to content

Commit 25f330a

Browse files
author
James Cori
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 3157bb9 + 5e4531c commit 25f330a

14 files changed

+1023
-64
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ The following configuration parameters are available:
4141
| GROUP_V5_API_URL | URL of the v5 Groups API |
4242
| LOOKUP_V5_API_URL | URL of the v5 Devices API |
4343
| TERMS_V5_API_URL | URL of the v5 Terms API |
44+
| CHALLENGES_V5_API_URL | URL of the v5 Challenges API |
45+
| RESOURCE_V5_API_URL | URL of the v5 Resources API |
4446
| AGREE_FOR_DOCUSIGN_TEMPLATE | UUID from Database of the `"DocuSign Template"` Agreeable type |
4547
| AGREE_ELECTRONICALLY | UUID from Database of the `Electronically` Agreeable Type |
4648
| DEFAULT_TERMS_TYPE_ID | The default terms type id |

config.json

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"GROUP_V5_API_URL": "http://localhost:3000/v5",
1616
"LOOKUP_V5_API_URL": "http://localhost:3000/v5",
1717
"TERMS_V5_API_URL": "http://localhost:3000/v5",
18+
"CHALLENGES_V5_API_URL": "https://api.topcoder-dev.com/v5",
19+
"RESOURCE_V5_API_URL": "https://api.topcoder-dev.com/v5",
1820
"AGREE_FOR_DOCUSIGN_TEMPLATE": "999a26ad-b334-453c-8425-165d4cf496d7",
1921
"AGREE_ELECTRONICALLY": "5b2798b2-ae82-4210-9b4d-5d6428125ccb",
2022
"DEFAULT_TERMS_TYPE_ID": 5
@@ -35,6 +37,8 @@
3537
"GROUP_V5_API_URL": "https://api.topcoder-dev.com/v5",
3638
"LOOKUP_V5_API_URL": "https://api.topcoder-dev.com/v5",
3739
"TERMS_V5_API_URL": "https://api.topcoder-dev.com/v5",
40+
"CHALLENGES_V5_API_URL": "https://api.topcoder-dev.com/v5",
41+
"RESOURCE_V5_API_URL": "https://api.topcoder-dev.com/v5",
3842
"AGREE_FOR_DOCUSIGN_TEMPLATE": "999a26ad-b334-453c-8425-165d4cf496d7",
3943
"AGREE_ELECTRONICALLY": "5b2798b2-ae82-4210-9b4d-5d6428125ccb",
4044
"DEFAULT_TERMS_TYPE_ID": 5
@@ -55,6 +59,8 @@
5559
"GROUP_V5_API_URL": "http://localhost:9000",
5660
"LOOKUP_V5_API_URL": "http://localhost:3000/v5",
5761
"TERMS_V5_API_URL": "http://localhost:3000/v5",
62+
"CHALLENGES_V5_API_URL": "https://api.topcoder-dev.com/v5",
63+
"RESOURCE_V5_API_URL": "https://api.topcoder-dev.com/v5",
5864
"AGREE_FOR_DOCUSIGN_TEMPLATE": "999a26ad-b334-453c-8425-165d4cf496d7",
5965
"AGREE_ELECTRONICALLY": "5b2798b2-ae82-4210-9b4d-5d6428125ccb",
6066
"DEFAULT_TERMS_TYPE_ID": 5
@@ -75,6 +81,8 @@
7581
"GROUP_V5_API_URL": "https://api.topcoder.com/v5",
7682
"LOOKUP_V5_API_URL": "https://api.topcoder.com/v5",
7783
"TERMS_V5_API_URL": "https://api.topcoder.com/v5",
84+
"CHALLENGES_V5_API_URL": "https://api.topcoder-dev.com/v5",
85+
"RESOURCE_V5_API_URL": "https://api.topcoder-dev.com/v5",
7886
"AGREE_FOR_DOCUSIGN_TEMPLATE": "1363a7ab-fd3e-4d7c-abbb-2f7440b8b355",
7987
"AGREE_ELECTRONICALLY": "2db6c920-4089-4755-9cd1-99b0df0af961",
8088
"DEFAULT_TERMS_TYPE_ID": 5

src/app/app.js

+47-29
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,30 @@
44
* support-admin-app
55
*/
66
angular.module('supportAdminApp', [
7-
'ngAnimate',
8-
'ngCookies',
9-
'ngTouch',
10-
'ngSanitize',
11-
'ngResource',
12-
'csvReader',
13-
'ui.router',
14-
'ui.bootstrap',
15-
'app.constants',
16-
'angular-clipboard',
17-
'ng-file-model',
18-
'btorfs.multiselect',
19-
'ui.bootstrap.datetimepicker',
20-
'angularMoment',
21-
'angular-jwt',
22-
'ui.tinymce'])
7+
'ngAnimate',
8+
'ngCookies',
9+
'ngTouch',
10+
'ngSanitize',
11+
'ngResource',
12+
'csvReader',
13+
'ui.router',
14+
'ui.bootstrap',
15+
'app.constants',
16+
'angular-clipboard',
17+
'ng-file-model',
18+
'btorfs.multiselect',
19+
'ui.bootstrap.datetimepicker',
20+
'angularMoment',
21+
'angular-jwt',
22+
'ui.tinymce'])
2323
// In the run phase of your Angular application
2424
.run(function (AuthService) {
2525
// init AuthService, it has to be done once, when app starts
2626
AuthService.init();
2727
})
2828
.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $compileProvider) {
29-
var authenticate = ['AuthService', '$q', '$state', function(AuthService, $q, $state) {
30-
return AuthService.authenticate().catch(function(err) {
29+
var authenticate = ['AuthService', '$q', '$state', function (AuthService, $q, $state) {
30+
return AuthService.authenticate().catch(function (err) {
3131
// if we get error that use doesn't have permissions
3232
// then go to auth page, which will show permissions denied error
3333
if (err === AuthService.ERROR.NO_PERMISSIONS) {
@@ -43,9 +43,9 @@ angular.module('supportAdminApp', [
4343
templateUrl: 'app/auth/auth.html',
4444
data: { pageTitle: 'Authentication' },
4545
resolve: {
46-
auth: ['AuthService', '$q', function(AuthService, $q) {
46+
auth: ['AuthService', '$q', function (AuthService, $q) {
4747
// for auth state we use another resolver then all other states
48-
return AuthService.authenticate().catch(function(err) {
48+
return AuthService.authenticate().catch(function (err) {
4949
// if we get error that use doesn't have permissions
5050
// we still resolve the promise and proceed to auth page
5151
// which will show permissions denied error
@@ -141,10 +141,10 @@ angular.module('supportAdminApp', [
141141
value: 'develop',
142142
name: 'Develop'
143143
},
144-
{
145-
value: 'design',
146-
name: 'Design'
147-
}];
144+
{
145+
value: 'design',
146+
name: 'Design'
147+
}];
148148

149149
$scope.tagStatuses = [{
150150
value: 'approved',
@@ -154,14 +154,14 @@ angular.module('supportAdminApp', [
154154
name: 'Pending'
155155
}];
156156

157-
TagService.getTechnologyStatuses().then(function(techStatuses) {
158-
_.forEach(techStatuses, function(status) {
157+
TagService.getTechnologyStatuses().then(function (techStatuses) {
158+
_.forEach(techStatuses, function (status) {
159159
status.value = _.lowerCase(status.description);
160160
status.name = status.description;
161161
});
162162
$scope.techStatuses = techStatuses;
163163
});
164-
$scope.getTagStatuses = function(domainType) {
164+
$scope.getTagStatuses = function (domainType) {
165165
if (domainType === 'technology') {
166166
return $scope.techStatuses;
167167
} else {
@@ -415,7 +415,25 @@ angular.module('supportAdminApp', [
415415
.state('index.challenges', {
416416
url: 'challenges',
417417
templateUrl: 'app/challenges/challenges.html',
418-
data: { pageTitle: 'Challenge Management'},
418+
data: { pageTitle: 'Challenge Management' },
419+
resolve: { auth: authenticate }
420+
})
421+
.state('index.v5challenges', {
422+
url: '/v5-challenges',
423+
templateUrl: 'app/v5_challenges/challenges.list.html',
424+
data: { pageTitle: 'Challenge Management' },
425+
resolve: { auth: authenticate }
426+
})
427+
.state('index.v5ChallengeDetail', {
428+
url: '/v5-challenge-details/:id',
429+
templateUrl: 'app/v5_challenges/challenge.detail.html',
430+
data: { pageTitle: 'Challenge Detail' },
431+
resolve: { auth: authenticate }
432+
})
433+
.state('index.v5ChallengeManageUser', {
434+
url: '/v5-challenge-manage-users/:id',
435+
templateUrl: 'app/v5_challenges/challenge.manage.user.html',
436+
data: { pageTitle: 'Manage Users' },
419437
resolve: { auth: authenticate }
420438
})
421439
.state('index.ideas', {
@@ -464,7 +482,7 @@ angular.module('supportAdminApp', [
464482
templateUrl: 'app/terms/terms.users.list.html',
465483
controller: 'terms.ListTermsUsersController',
466484
data: { pageTitle: 'Term Users' },
467-
params:{
485+
params: {
468486
title: null
469487
},
470488
resolve: { auth: authenticate }

0 commit comments

Comments
 (0)