Skip to content

Commit e9d6b3f

Browse files
authored
Merge pull request #32 from appirio-tech/dev
Dev
2 parents 7d0b5df + cf0c746 commit e9d6b3f

File tree

6 files changed

+14
-10
lines changed

6 files changed

+14
-10
lines changed

src/app/users/users.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.controller('users.UserSearchController', [
180180
]);
181181

182182
module.controller('users.UserEditDialogController', [
183-
'$scope', '$rootScope', '$modalInstance', 'UserService', 'Alert', 'user',
183+
'$scope', '$rootScope', '$uibModalInstance', 'UserService', 'Alert', 'user',
184184
function ($scope, $rootScope, $modalInstance, $userService, $alert, user) {
185185

186186
$scope.user = user;
@@ -269,7 +269,7 @@ module.controller('users.UserEditDialogController', [
269269
]);
270270

271271
module.controller('users.StatusUpdateDialogController', [
272-
'$scope', '$rootScope', '$modalInstance', 'UserService', 'users.Constants', 'Alert', 'user',
272+
'$scope', '$rootScope', '$uibModalInstance', 'UserService', 'users.Constants', 'Alert', 'user',
273273
function ($scope, $rootScope, $modalInstance, $userService, $const, $alert, user) {
274274

275275
$scope.form = {
@@ -312,7 +312,7 @@ module.controller('users.StatusUpdateDialogController', [
312312
]);
313313

314314
module.controller('users.StatusHistoryDialogController', [
315-
'$scope', '$rootScope', '$modalInstance', 'UserService', 'users.Constants', 'Alert', 'user',
315+
'$scope', '$rootScope', '$uibModalInstance', 'UserService', 'users.Constants', 'Alert', 'user',
316316
function ($scope, $rootScope, $modalInstance, $userService, $const, $alert, user) {
317317

318318
$scope.init = function() {

src/app/users/users.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ <h2>Users</h2>
105105
<a href="#" ng-show="user.active"><i class="fa fa-check text-navy"></i></a>
106106
</td>
107107
<td>
108-
<div class="btn-group" dropdown >
109-
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" dropdown-toggle>
108+
<div class="btn-group" uib-dropdown >
109+
<button type="button" class="btn btn-primary btn-sm dropdown-toggle" uib-dropdown-toggle>
110110
Edit <i class="fa fa-caret-down"></i>
111111
</button>
112-
<ul class="dropdown-menu" role="menu">
112+
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
113113
<li><a href="" ng-click="openHandleEditDialog($index)">Handle</a></li>
114114
<li><a href="" ng-click="openEmailEditDialog($index)">Primary Email</a></li>
115115
</ul>

src/app/work/projects.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ angular.module('supportAdminApp')
6969
deferred.resolve(); // continue promise chain.
7070
})
7171
.catch(function (err) {
72-
if (err === 'project steps not found') { // not an error, just no work steps found
72+
if (err === workSvc.workStepNotFound) { // not an error, just no work steps found
7373
proj.currentStep = 'N/A'; // placeholder value for projects with no work steps
7474
deferred.resolve(); // continue promise chain.
7575
} else {

src/app/work/work.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.controller('workController', ['$scope', '$rootScope', '$timeout', '$state
7070
$scope.work = null;
7171
var errorMessage = error.error;
7272
if (error.status == 404) {
73-
errorMessage = 'work with id ' + $scope.workSearch.workId +
73+
errorMessage = 'project with id ' + $scope.workSearch.workId +
7474
' not found';
7575
}
7676
$scope.$broadcast('alert.AlertIssued', {

src/app/work/work.service.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ angular.module('supportAdminApp')
44
.factory('WorkService', ['$q', '$http', 'WORK_API_URL', '$log', 'API_VERSION_PATH',
55
function($q, $http, WORK_API_URL, $log, API_VERSION_PATH) {
66

7+
var workStepNotFound = 'Project steps not found';
78
var service = {
89
getWorkSteps: getWorkSteps,
910
findWorkById: findWorkById,
10-
putWorkStep: putWorkStep
11+
putWorkStep: putWorkStep,
12+
workStepNotFound: workStepNotFound
1113
};
1214

1315
/**
@@ -114,7 +116,7 @@ angular.module('supportAdminApp')
114116
return steps;
115117

116118
} else {
117-
return $q.reject("project steps not found");
119+
return $q.reject(workStepNotFound);
118120
}
119121
},
120122
function(error) {
@@ -156,6 +158,7 @@ angular.module('supportAdminApp')
156158
if (response.data && response.data.result && response.data.result.content) {
157159
return response.data.result.content;
158160
} else {
161+
console.log("project with '" + workId + "' not found.");
159162
return $q.reject({
160163
error: "project with '" + workId + "' not found."
161164
});

src/components/common/navigation.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
angular.module('supportAdminApp')
44
.controller('NavController', ['$scope', '$state',
55
function ($scope, $state) {
6+
$scope.$state = $state;
67

78
$scope.forceStateProjects = function () {
89
$state.go('index.projects');

0 commit comments

Comments
 (0)