Skip to content

Commit 106b28f

Browse files
authored
Merge pull request #27 from appirio-tech/dev
Merge connect project additions
2 parents 29c0c9e + 90b88e6 commit 106b28f

37 files changed

+2448
-60
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# support-admin-app
2-
Customer support application
2+
Customer support application <br>
3+
4+
angular.js app using INSPINIA template

bower.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
2727
"appirio-tech-ng-login-reg": "0.x.x",
2828
"appirio-tech-ng-api-services": "0.x.x",
2929
"angular-clipboard": "~1.2.1",
30-
"appirio-tech-ng-login-reg": "0.x.x",
3130
"lodash": "~4.2.0",
3231
"angular-moment": "~1.0.0-beta.3",
3332
"moment": "~2.11.2",
3433
"moment-timezone": "~0.5.0",
35-
"ng-file-model": "*"
34+
"ng-file-model": "*",
35+
"angular-bootstrap-multiselect": "*",
36+
"bootstrap-ui-datetime-picker": "^2.4.0"
3637
},
3738
"overrides": {
3839
"bootstrap": {
@@ -65,6 +66,7 @@
6566
"jquery": "~2.1.1",
6667
"angular": "1.4.x",
6768
"angular-resource": "1.4.x",
68-
"moment": "^2.10.x"
69+
"moment": "^2.10.x",
70+
"angular-bootstrap": "^1.2.0"
6971
}
7072
}

config.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
{
22
"local": {
3-
"API_URL" : "http://localhost:8080",
3+
"ES_PROJECT_API_URL": "http://127.0.0.1:8553",
4+
"API_URL" : "https://127.0.0.1:8443",
5+
"WORK_API_URL" : "https://127.0.0.1:8443",
46
"API_VERSION_PATH" : "v3",
57
"AUTH0_CLIENT_ID" : "JFDo7HMkf0q2CkVFHojy3zHWafziprhT",
6-
"AUTH0_DOMAIN" : "topcoder-dev.auth0.com",
8+
"AUTH0_DOMAIN" : "127.0.0.1:8443",
79
"AUTH0_TOKEN_NAME" : "userJWTToken",
810
"AUTH0_REFRESH_TOKEN_NAME" : "userRefreshJWTToken"
911
},
1012
"dev": {
13+
"ES_PROJECT_API_URL": "https://internal-api.topcoder-dev.com",
1114
"API_URL" : "https://api.topcoder-dev.com",
15+
"WORK_API_URL" : "https://api-work.topcoder-dev.com",
1216
"API_VERSION_PATH" : "v3",
1317
"AUTH0_CLIENT_ID" : "JFDo7HMkf0q2CkVFHojy3zHWafziprhT",
1418
"AUTH0_DOMAIN" : "topcoder-dev.auth0.com",
1519
"AUTH0_TOKEN_NAME" : "userJWTToken",
1620
"AUTH0_REFRESH_TOKEN_NAME" : "userRefreshJWTToken"
1721
},
1822
"qa": {
23+
"ES_PROJECT_API_URL": "https://internal-api.topcoder-qa.com",
1924
"API_URL" : "https://api.topcoder-qa.com",
25+
"WORK_API_URL" : "https://api-work.topcoder-qa.com",
2026
"API_VERSION_PATH" : "v3",
2127
"AUTH0_CLIENT_ID" : "EVOgWZlCtIFlbehkq02treuRRoJk12UR",
2228
"AUTH0_DOMAIN" : "topcoder-qa.auth0.com",
@@ -25,6 +31,8 @@
2531
},
2632
"prod": {
2733
"API_URL" : "https://api.topcoder.com",
34+
"WORK_API_URL" : "https://api-work.topcoder.com",
35+
"ES_PROJECT_API_URL": "https://internal-api.topcoder.com",
2836
"API_VERSION_PATH" : "v3",
2937
"AUTH0_CLIENT_ID" : "6ZwZEUo2ZK4c50aLPpgupeg5v2Ffxp9P",
3038
"AUTH0_DOMAIN" : "topcoder.auth0.com",

src/app/addmembers/add.html

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

22
<div class="row wrapper border-bottom white-bg page-heading">
33
<div class="col-lg-10">
4-
<h2>Add Members</h2>
4+
<h2>Import Users</h2>
55
</div>
66
<div class="col-lg-2">
77
</div>

src/app/app.js

Lines changed: 120 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,79 +18,163 @@ angular.module('supportAdminApp', [
1818
'ui.footable',
1919
'angular-clipboard',
2020
'ng-file-model',
21+
'ui.multiselect',
22+
'ui.bootstrap.datetimepicker',
2123
'angularMoment'])
2224
// In the run phase of your Angular application
23-
.run(function($rootScope, $location, AuthService, $state, UserV3Service) {
25+
.run(function ($rootScope, $location, AuthService, $state, UserV3Service) {
2426
// Listen to '$locationChangeSuccess', not '$stateChangeStart'
25-
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
26-
if(toState.name === "login") {
27+
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
28+
if (toState.name === 'login') {
2729
return;
2830
}
29-
console.log('state changed. loggedIn: '+AuthService.isLoggedIn()); // debug
30-
if(!AuthService.isLoggedIn()) {
31+
console.log('state changed. loggedIn: ' + AuthService.isLoggedIn()); // debug
32+
if (!AuthService.isLoggedIn()) {
3133
$state.go('login');
3234
} else {
33-
UserV3Service.loadUser().then(function(currentUser) {
35+
UserV3Service.loadUser().then(function (currentUser) {
3436
$rootScope.currentUser = currentUser;
35-
$state.go(toState)
37+
$state.go(toState, toParams);
3638
});
3739
}
38-
})
40+
});
3941
})
4042
.config(function ($stateProvider, $urlRouterProvider, $locationProvider) {
41-
42-
$stateProvider
43+
$stateProvider
4344
.state('login', {
44-
url: "/login",
45-
templateUrl: "app/login/login.html",
45+
url: '/login',
46+
templateUrl: 'app/login/login.html',
4647
data: { pageTitle: 'Login' }
4748
})
4849
.state('index', {
4950
abstract: true,
50-
url: "/index",
51-
templateUrl: "components/common/content.html",
51+
url: '/index',
52+
templateUrl: 'components/common/content.html'
5253
})
5354
.state('index.main', {
54-
url: "/main",
55-
templateUrl: "app/main/main.html",
55+
url: '/main',
56+
templateUrl: 'app/main/main.html',
5657
data: { pageTitle: 'Dashboard' }
5758
})
5859
.state('index.users', {
59-
url: "/users",
60-
templateUrl: "app/users/users.html",
60+
url: '/users',
61+
templateUrl: 'app/users/users.html',
6162
data: { pageTitle: 'User Management' }
6263
})
6364
.state('index.sso', {
64-
url: "/sso",
65-
templateUrl: "app/sso/sso.html",
66-
data: {pageTitle: 'SSO User Management' }
65+
url: '/sso',
66+
templateUrl: 'app/sso/sso.html',
67+
data: { pageTitle: 'SSO User Management' }
6768
})
6869
.state('index.addmembers', {
69-
url: "/add",
70-
templateUrl: "app/addmembers/add.html",
71-
data: {pageTitle: 'User Management' }
70+
url: '/add',
71+
templateUrl: 'app/addmembers/add.html',
72+
data: { pageTitle: 'User Management' }
7273
})
7374
.state('index.submissions', {
7475
abstract: true,
75-
url: "/submissions",
76-
templateUrl: "app/submissions/submissions.html",
76+
url: '/submissions',
77+
templateUrl: 'app/submissions/submissions.html',
7778
data: { pageTitle: 'Submissions' }
7879
})
7980
.state('index.submissions.list', {
80-
url: "/list",
81-
templateUrl: "app/submissions/submissions.list.html",
81+
url: '/list',
82+
templateUrl: 'app/submissions/submissions.list.html',
8283
data: { pageTitle: 'Submissions List' },
83-
controller: "SubmissionListCtrl"
84+
controller: 'SubmissionListCtrl'
8485
})
8586
.state('index.submissions.new', {
86-
url: "/new",
87-
templateUrl: "app/submissions/submissions.new.html",
88-
controller: "NewSubmissionCtrl",
87+
url: '/new',
88+
templateUrl: 'app/submissions/submissions.new.html',
89+
controller: 'NewSubmissionCtrl',
8990
data: { pageTitle: 'New Submission' }
91+
})
92+
.state('index.tags', {
93+
abstract: true,
94+
url: '/tags',
95+
templateUrl: 'app/tags/tags.html',
96+
data: { pageTitle: 'Tags' },
97+
controller: function ($scope, $state) {
98+
$scope.$state = $state;
99+
$scope.tagDomains = [{
100+
value: 'skills',
101+
name: 'Skills'
102+
}, {
103+
value: 'events',
104+
name: 'Events'
105+
}];
106+
107+
$scope.tagCategories = [{
108+
value: 'data_science',
109+
name: 'Data Science'
110+
}, {
111+
value: 'develop',
112+
name: 'Develop'
113+
},
114+
{
115+
value: 'design',
116+
name: 'Design'
117+
}];
118+
119+
$scope.tagStatuses = [{
120+
value: 'approved',
121+
name: 'Approved'
122+
}, {
123+
value: 'pending',
124+
name: 'Pending'
125+
}];
126+
}
127+
})
128+
.state('index.tags.list', {
129+
url: '/list',
130+
templateUrl: 'app/tags/tags.list.html',
131+
controller: 'TagListCtrl'
132+
})
133+
.state('index.tags.new', {
134+
url: '/new',
135+
templateUrl: 'app/tags/tags.new.html',
136+
controller: 'NewTagCtrl',
137+
data: { pageTitle: 'New Tag' }
138+
})
139+
.state('index.tags.edit', {
140+
url: '/edit/:tagId',
141+
templateUrl: 'app/tags/tags.edit.html',
142+
controller: 'EditTagCtrl',
143+
data: { pageTitle: 'Edit Tag' }
144+
})
145+
.state('index.work', {
146+
abstract: true,
147+
url: '/work',
148+
templateUrl: 'app/work/work.html',
149+
data: { pageTitle: 'Work Items Management' }
150+
})
151+
.state('index.work.list', {
152+
url: '/list/:id',
153+
templateUrl: 'app/work/work.list.html',
154+
data: { pageTitle: 'work List' },
155+
controller: 'WorkListCtrl',
156+
params: {
157+
id: ''
158+
}
159+
})
160+
.state('index.workStepEdit', {
161+
url: '/work/:id/:stepId',
162+
templateUrl: 'app/work/workStepEdit.html',
163+
data: { pageTitle: 'Edit Step' },
164+
controller: 'WorkStepEditCtrl',
165+
params: {
166+
id: '',
167+
stepId: ''
168+
}
169+
})
170+
.state('index.projects', {
171+
url: '/projects',
172+
templateUrl: 'app/work/projects.html',
173+
data: { pageTitle: 'Projects List' },
174+
controller: 'ProjectListCtrl',
175+
controllerAs: 'vm'
90176
});
91177

92178
$urlRouterProvider.otherwise('/login');
93-
94-
//$locationProvider.html5Mode(true).hashPrefix('!');
95-
})
96-
;
179+
// $locationProvider.html5Mode(true).hashPrefix('!');
180+
});

src/app/directives.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,17 @@ angular.module('supportAdminApp')
3737
};
3838
}
3939
};
40+
})
41+
// disable keyboard input event on single element
42+
.directive('disableKeyboard', function () {
43+
return {
44+
restrict: 'AE',
45+
link: function (scope, element, attributes) {
46+
$(element).keypress(function (event) {
47+
event.preventDefault();
48+
event.stopPropagation();
49+
return false;
50+
});
51+
}
52+
};
4053
});

src/app/filters.js

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
11
'use strict';
22

3-
//Filter to pretty print json
3+
// Filter to pretty print json
44
angular.module('supportAdminApp')
5-
.filter('prettyJSON', function() {
6-
return function(json) {
5+
.filter('prettyJSON', function () {
6+
return function (json) {
77
return angular.toJson(json, true);
8-
}
8+
};
9+
})
10+
.filter('capitalize', function () {
11+
return function (input) {
12+
return (!!input) ? input.charAt(0).toUpperCase() + input.substr(1).toLowerCase() : '';
13+
};
14+
})
15+
.filter('tcConnectLink', function () {
16+
return function (id) {
17+
return 'https://connect.topcoder.com//projects/' + id + '/timeline';
18+
};
19+
})
20+
.filter('tcProfileLink', function () {
21+
return function (id) {
22+
if (id && id !== 'unassigned')
23+
return 'http://www.topcoder.com/tc?module=MemberProfile&cr=' + id;
24+
25+
return 'javascript:;';
26+
};
27+
})
28+
.filter('tcDirectLink', function () {
29+
return function (id) {
30+
return 'https://www.topcoder.com/direct/projectOverview?formData.projectId=' + id;
31+
};
32+
})
33+
.filter('fmtDate', function () {
34+
return function (date) {
35+
date = date ? new Date(date) : new Date();
36+
var yyyy = date.getFullYear();
37+
var mm = _.padStart(date.getMonth() + 1, 2, '0');
38+
var dd = _.padStart(date.getDate(), 2, '0');
39+
var hh = _.padStart(date.getHours(), 2, '0');
40+
var mi = _.padStart(date.getMinutes(), 2, '0');
41+
return [yyyy, '-', mm, '-', dd, ' ', hh, ':', mi].join('');
42+
};
943
});

src/app/less/base.less

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,4 +1344,19 @@ input[readonly] {
13441344
font-family: 'Open Sans', helvetica, arial, sans-serif;
13451345
padding-top: 5px;
13461346
padding-bottom: 10px;
1347-
}
1347+
}
1348+
1349+
.edit-tag-info dt{
1350+
width: 120px;
1351+
margin-left: 20px;
1352+
text-align: left;
1353+
font-weight: normal;
1354+
}
1355+
1356+
.edit-tag-info dd{
1357+
margin-left: 50px;
1358+
}
1359+
1360+
.edit-tag-info strong{
1361+
color: #1a7bb9;
1362+
}

src/app/sso/sso.html

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

22
<div class="row wrapper border-bottom white-bg page-heading">
33
<div class="col-lg-10">
4-
<h2>Add SSO Users</h2>
4+
<h2>Import SSO Users</h2>
55
</div>
66
<div class="col-lg-2">
77
</div>

src/app/submissions/submissions.controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
var module = angular.module('supportAdminApp');
44

5-
module.controller('submissions.SearchController', ['$scope', '$rootScope', '$timeout', '$state', '$modal',
5+
module.controller('submissions.SearchController', ['$scope', '$rootScope', '$timeout', '$state', '$uibModal',
66
'AuthService', 'SubmissionService', 'UserService',
77
function ($scope, $rootScope, $timeout, $state, $modal, $authService, $submissionService, $userService) {
88

@@ -102,4 +102,4 @@ module.controller('submissions.SearchController', ['$scope', '$rootScope', '$tim
102102

103103

104104
}
105-
]);
105+
]);

0 commit comments

Comments
 (0)