4
4
* support-admin-app
5
5
*/
6
6
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' ] )
23
23
// In the run phase of your Angular application
24
24
. run ( function ( AuthService ) {
25
25
// init AuthService, it has to be done once, when app starts
26
26
AuthService . init ( ) ;
27
27
} )
28
28
. 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 ) {
31
31
// if we get error that use doesn't have permissions
32
32
// then go to auth page, which will show permissions denied error
33
33
if ( err === AuthService . ERROR . NO_PERMISSIONS ) {
@@ -43,9 +43,9 @@ angular.module('supportAdminApp', [
43
43
templateUrl : 'app/auth/auth.html' ,
44
44
data : { pageTitle : 'Authentication' } ,
45
45
resolve : {
46
- auth : [ 'AuthService' , '$q' , function ( AuthService , $q ) {
46
+ auth : [ 'AuthService' , '$q' , function ( AuthService , $q ) {
47
47
// 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 ) {
49
49
// if we get error that use doesn't have permissions
50
50
// we still resolve the promise and proceed to auth page
51
51
// which will show permissions denied error
@@ -141,10 +141,10 @@ angular.module('supportAdminApp', [
141
141
value : 'develop' ,
142
142
name : 'Develop'
143
143
} ,
144
- {
145
- value : 'design' ,
146
- name : 'Design'
147
- } ] ;
144
+ {
145
+ value : 'design' ,
146
+ name : 'Design'
147
+ } ] ;
148
148
149
149
$scope . tagStatuses = [ {
150
150
value : 'approved' ,
@@ -154,14 +154,14 @@ angular.module('supportAdminApp', [
154
154
name : 'Pending'
155
155
} ] ;
156
156
157
- TagService . getTechnologyStatuses ( ) . then ( function ( techStatuses ) {
158
- _ . forEach ( techStatuses , function ( status ) {
157
+ TagService . getTechnologyStatuses ( ) . then ( function ( techStatuses ) {
158
+ _ . forEach ( techStatuses , function ( status ) {
159
159
status . value = _ . lowerCase ( status . description ) ;
160
160
status . name = status . description ;
161
161
} ) ;
162
162
$scope . techStatuses = techStatuses ;
163
163
} ) ;
164
- $scope . getTagStatuses = function ( domainType ) {
164
+ $scope . getTagStatuses = function ( domainType ) {
165
165
if ( domainType === 'technology' ) {
166
166
return $scope . techStatuses ;
167
167
} else {
@@ -415,7 +415,25 @@ angular.module('supportAdminApp', [
415
415
. state ( 'index.challenges' , {
416
416
url : 'challenges' ,
417
417
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' } ,
419
437
resolve : { auth : authenticate }
420
438
} )
421
439
. state ( 'index.ideas' , {
@@ -464,7 +482,7 @@ angular.module('supportAdminApp', [
464
482
templateUrl : 'app/terms/terms.users.list.html' ,
465
483
controller : 'terms.ListTermsUsersController' ,
466
484
data : { pageTitle : 'Term Users' } ,
467
- params :{
485
+ params : {
468
486
title : null
469
487
} ,
470
488
resolve : { auth : authenticate }
0 commit comments