Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
5a51b08a
Commit
5a51b08a
authored
May 06, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed_Console_Logs
parent
1b16f1cd
Changes
18
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
283 additions
and
170 deletions
+283
-170
AccountsController.js
src/main/webapp/WEB-INF/controllers/AccountsController.js
+13
-8
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+10
-5
AttendanceReportController.js
.../webapp/WEB-INF/controllers/AttendanceReportController.js
+1
-1
DashboardController.js
src/main/webapp/WEB-INF/controllers/DashboardController.js
+2
-2
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+6
-11
ExportDataController.js
src/main/webapp/WEB-INF/controllers/ExportDataController.js
+0
-1
HeaderController.js
src/main/webapp/WEB-INF/controllers/HeaderController.js
+0
-1
LeftMenuController.js
src/main/webapp/WEB-INF/controllers/LeftMenuController.js
+0
-2
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+2
-5
MyProjectAllocations.js
src/main/webapp/WEB-INF/controllers/MyProjectAllocations.js
+0
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+54
-42
ProjectMyTeamController.js
...ain/webapp/WEB-INF/controllers/ProjectMyTeamController.js
+25
-10
ReportsController.js
src/main/webapp/WEB-INF/controllers/ReportsController.js
+5
-6
ResourceController.js
src/main/webapp/WEB-INF/controllers/ResourceController.js
+39
-23
SessionHandlerController.js
...in/webapp/WEB-INF/controllers/SessionHandlerController.js
+1
-1
TravelController.js
src/main/webapp/WEB-INF/controllers/TravelController.js
+42
-19
ViewProjectController.js
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
+49
-18
VisaController.js
src/main/webapp/WEB-INF/controllers/VisaController.js
+34
-14
No files found.
src/main/webapp/WEB-INF/controllers/AccountsController.js
View file @
5a51b08a
...
@@ -50,7 +50,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -50,7 +50,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"accounts"
url
:
appConfig
.
appUri
+
"accounts"
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
response
)
if
(
response
.
data
.
records
.
length
>
10
){
if
(
response
.
data
.
records
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
}
...
@@ -84,10 +83,18 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -84,10 +83,18 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
controller
:
addController
,
controller
:
addController
,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
}).
then
(
function
(
result
)
{
}).
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'Account assigned successfully'
);
if
(
result
==
"Add"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Account updated successfully'
);
showAlert
(
'Account assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Account assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Account updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Account assigning/updation failed!!!'
);
}
});
});
}
}
function
showAlert
(
message
)
{
function
showAlert
(
message
)
{
...
@@ -107,7 +114,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -107,7 +114,7 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
deleteAccountRole
(
row
.
entity
.
accountId
);
deleteAccountRole
(
row
.
entity
.
accountId
);
$timeout
(
function
(){
updateGridAfterDelete
()},
500
);
$timeout
(
function
(){
updateGridAfterDelete
()},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
function
deleteAccountRole
(
accountId
){
function
deleteAccountRole
(
accountId
){
...
@@ -318,7 +325,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -318,7 +325,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
200
);
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
200
);
}
}
}
else
if
(
action
==
"Update"
){
}
else
if
(
action
==
"Update"
){
console
.
log
(
$scope
.
myForm
);
if
(
accountName
==
undefined
||
accountName
==
""
){
if
(
accountName
==
undefined
||
accountName
==
""
){
$scope
.
alertMsg
=
"Please enter the account Name"
;
$scope
.
alertMsg
=
"Please enter the account Name"
;
document
.
getElementById
(
'accountName'
).
focus
();
document
.
getElementById
(
'accountName'
).
focus
();
...
@@ -339,7 +345,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
...
@@ -339,7 +345,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
var
record
=
{
"accountId"
:
$scope
.
accountId
,
"accountName"
:
$scope
.
accountName
,
"industryType"
:
$scope
.
industryType
,
"clientAddress"
:
$scope
.
clientAddress
,
"deliveryManagers"
:
$scope
.
accountManagers
()};
var
record
=
{
"accountId"
:
$scope
.
accountId
,
"accountName"
:
$scope
.
accountName
,
"industryType"
:
$scope
.
industryType
,
"clientAddress"
:
$scope
.
clientAddress
,
"deliveryManagers"
:
$scope
.
accountManagers
()};
var
dataRequired
=
{
"accountName"
:
dataToPass
.
accountName
,
"industryType"
:
dataToPass
.
industryType
,
"clientAddress"
:
dataToPass
.
clientAddress
,
"deliveryManagers"
:
getDeliveryManagersFromService
()};
var
dataRequired
=
{
"accountName"
:
dataToPass
.
accountName
,
"industryType"
:
dataToPass
.
industryType
,
"clientAddress"
:
dataToPass
.
clientAddress
,
"deliveryManagers"
:
getDeliveryManagersFromService
()};
console
.
log
(
$scope
.
myForm
);
var
isFormUpated
=
myFactory
.
updateFormDataCheck
(
$scope
.
myForm
,
dataRequired
);
var
isFormUpated
=
myFactory
.
updateFormDataCheck
(
$scope
.
myForm
,
dataRequired
);
if
(
isFormUpated
==
true
){
if
(
isFormUpated
==
true
){
addOrUpdateAccount
(
record
,
$scope
.
templateTitle
,
"U"
);
addOrUpdateAccount
(
record
,
$scope
.
templateTitle
,
"U"
);
...
...
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
5a51b08a
...
@@ -159,13 +159,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -159,13 +159,19 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'Employee assigned successfully'
);
if
(
result
==
"Add"
){
showAlert
(
'Employee assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
getUserRoles
();
$scope
.
getUserRoles
();
showAlert
(
'Employee updated successfully'
);
showAlert
(
'Employee updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Role assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Role assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -183,7 +189,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -183,7 +189,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
deleteUserRole
(
row
.
entity
.
employeeId
);
deleteUserRole
(
row
.
entity
.
employeeId
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
function
deleteUserRole
(
empId
){
function
deleteUserRole
(
empId
){
...
@@ -193,7 +199,6 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -193,7 +199,6 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
$scope
.
result
=
response
.
data
;
console
.
log
(
$scope
.
result
);
},
function
myError
(
response
){
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
$scope
.
result
=
"Error"
;
});
});
...
...
src/main/webapp/WEB-INF/controllers/AttendanceReportController.js
View file @
5a51b08a
...
@@ -76,7 +76,7 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
...
@@ -76,7 +76,7 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
else
if
(
type
==
"onclick"
&&
$scope
.
reportDate
<
today
){
else
if
(
type
==
"onclick"
&&
$scope
.
reportDate
<
today
){
showProgressDialog
(
"Fetching data please wait..."
);
showProgressDialog
(
"Fetching data please wait..."
);
}
else
{
}
else
{
console
.
log
(
""
);
}
}
var
reportDate
=
getFormattedDate
(
$scope
.
reportDate
);
var
reportDate
=
getFormattedDate
(
$scope
.
reportDate
);
var
shiftV
=
$scope
.
shiftValue
;
var
shiftV
=
$scope
.
shiftValue
;
...
...
src/main/webapp/WEB-INF/controllers/DashboardController.js
View file @
5a51b08a
...
@@ -116,7 +116,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
...
@@ -116,7 +116,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
.
then
(
function
(
result
)
{
/*
.
then
(
function
(
result
)
{
/*
if(result == "Assign") showAlert('Manager assigned successfully');
if(result == "Assign") showAlert('Manager assigned successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Update") showAlert('Manager updated successfully');
else if(result == "Cancelled")
console.log(result);
else if(result == "Cancelled")
{}
else showAlert('Manager assigning/updation failed!!!');
else showAlert('Manager assigning/updation failed!!!');
*/
});
*/
});
};
};
...
@@ -189,7 +189,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
...
@@ -189,7 +189,7 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
{
field
:
'billableStatus'
,
displayName
:
'Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
minWidth
:
100
,
width
:
150
},
{
field
:
'billableStatus'
,
displayName
:
'Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
minWidth
:
100
,
width
:
150
},
{
field
:
'projectStartDate'
,
displayName
:
'Start Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
minWidth
:
100
,
width
:
150
},
{
field
:
'projectStartDate'
,
displayName
:
'Start Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
minWidth
:
100
,
width
:
150
},
{
field
:
'projectEndDate'
,
displayName
:
'End Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
minWidth
:
100
,
width
:
150
},
{
field
:
'projectEndDate'
,
displayName
:
'End Date'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
minWidth
:
100
,
width
:
150
},
{
field
:
'
active
'
,
displayName
:
'Active'
,
enableColumnMenu
:
false
,
cellTemplate
:
getCellActiveTemplate
,
enableSorting
:
false
,
minWidth
:
100
,
width
:
150
}
{
field
:
'
status
'
,
displayName
:
'Active'
,
enableColumnMenu
:
false
,
cellTemplate
:
getCellActiveTemplate
,
enableSorting
:
false
,
minWidth
:
100
,
width
:
150
}
]
]
};
};
...
...
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
5a51b08a
...
@@ -154,10 +154,12 @@ myApp.controller("domainController",
...
@@ -154,10 +154,12 @@ myApp.controller("domainController",
showAlert
(
'Domain created successfully'
);
showAlert
(
'Domain created successfully'
);
}
else
if
(
result
==
"Update"
)
{
}
else
if
(
result
==
"Update"
)
{
showAlert
(
'Domain updated successfully'
);
showAlert
(
'Domain updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
}
else
if
(
result
==
"Cancelled"
)
{
console
.
log
(
result
);
else
}
else
{
showAlert
(
'Domain assigning/updation failed!!!'
);
showAlert
(
'Domain assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -171,7 +173,7 @@ myApp.controller("domainController",
...
@@ -171,7 +173,7 @@ myApp.controller("domainController",
deleteDomainRow
(
row
.
entity
.
domainId
);
deleteDomainRow
(
row
.
entity
.
domainId
);
showAlert
(
"Domain Inactivated successfully"
);
showAlert
(
"Domain Inactivated successfully"
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -340,7 +342,6 @@ myApp.controller("domainController",
...
@@ -340,7 +342,6 @@ myApp.controller("domainController",
if
(
dataToPass
.
action
==
"Add"
)
{
if
(
dataToPass
.
action
==
"Add"
)
{
var
totalFields
=
$scope
.
myForm
.
$$controls
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
showConfirmDialog
=
true
;
showConfirmDialog
=
true
;
}
}
...
@@ -363,7 +364,6 @@ myApp.controller("domainController",
...
@@ -363,7 +364,6 @@ myApp.controller("domainController",
$scope
.
deliveryHeads
=
function
()
{
$scope
.
deliveryHeads
=
function
()
{
var
length
=
$scope
.
employeeModel
.
length
;
var
length
=
$scope
.
employeeModel
.
length
;
console
.
log
(
length
);
for
(
i
=
0
;
i
<
length
;
i
++
)
{
for
(
i
=
0
;
i
<
length
;
i
++
)
{
$scope
.
employeeNamesArray
[
i
]
=
$scope
.
employeeModel
[
i
].
employeeId
;
$scope
.
employeeNamesArray
[
i
]
=
$scope
.
employeeModel
[
i
].
employeeId
;
}
}
...
@@ -373,10 +373,8 @@ myApp.controller("domainController",
...
@@ -373,10 +373,8 @@ myApp.controller("domainController",
$scope
.
removeSelectedLead
=
function
(
item
)
{
$scope
.
removeSelectedLead
=
function
(
item
)
{
var
index
=
$scope
.
employeeModel
.
indexOf
(
item
);
var
index
=
$scope
.
employeeModel
.
indexOf
(
item
);
console
.
log
(
index
);
$scope
.
employeeNamesArray
.
splice
(
index
,
1
);
$scope
.
employeeNamesArray
.
splice
(
index
,
1
);
$scope
.
employeeModel
.
splice
(
index
,
1
);
$scope
.
employeeModel
.
splice
(
index
,
1
);
console
.
log
(
$scope
.
employeeNamesArray
);
}
}
...
@@ -409,7 +407,6 @@ myApp.controller("domainController",
...
@@ -409,7 +407,6 @@ myApp.controller("domainController",
.
then
(
.
then
(
function
mySuccess
(
response
)
{
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
$scope
.
result
=
"Success"
;
console
.
log
(
response
);
updatingGridBasedOnStatus
(
dataToPass
.
action
,
response
.
data
,
$scope
.
result
);
updatingGridBasedOnStatus
(
dataToPass
.
action
,
response
.
data
,
$scope
.
result
);
},
},
function
myError
(
response
)
{
function
myError
(
response
)
{
...
@@ -467,7 +464,6 @@ myApp.controller("domainController",
...
@@ -467,7 +464,6 @@ myApp.controller("domainController",
"accountId"
:
$scope
.
AccountInfo
.
accountId
,
"accountId"
:
$scope
.
AccountInfo
.
accountId
,
"deliveryManagers"
:
$scope
.
deliveryHeads
()
"deliveryManagers"
:
$scope
.
deliveryHeads
()
};
};
console
.
log
(
record
)
$scope
.
addOrUpdateDomain
(
record
,
action
);
$scope
.
addOrUpdateDomain
(
record
,
action
);
}
}
}
else
{
}
else
{
...
@@ -506,7 +502,6 @@ myApp.controller("domainController",
...
@@ -506,7 +502,6 @@ myApp.controller("domainController",
}))
}))
}
}
else
{
else
{
console
.
log
(
record
)
$scope
.
addOrUpdateDomain
(
record
,
action
);
$scope
.
addOrUpdateDomain
(
record
,
action
);
}
}
}
}
...
...
src/main/webapp/WEB-INF/controllers/ExportDataController.js
View file @
5a51b08a
...
@@ -50,7 +50,6 @@ myApp
...
@@ -50,7 +50,6 @@ myApp
$scope
.
refreshPage
();
$scope
.
refreshPage
();
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
$mdDialog
.
hide
();
$mdDialog
.
hide
();
console
.
log
(
response
);
showAlert
(
'Something went wrong while importing the data from file...'
);
showAlert
(
'Something went wrong while importing the data from file...'
);
$scope
.
refreshPage
();
$scope
.
refreshPage
();
});
});
...
...
src/main/webapp/WEB-INF/controllers/HeaderController.js
View file @
5a51b08a
...
@@ -9,7 +9,6 @@ myApp.controller("headerController",function($scope, myFactory, $compile, $mdDia
...
@@ -9,7 +9,6 @@ myApp.controller("headerController",function($scope, myFactory, $compile, $mdDia
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
auth2
.
signOut
().
then
(
function
()
{
auth2
.
signOut
().
then
(
function
()
{
console
.
log
(
"User signed out."
);
});
});
auth2
.
disconnect
();
auth2
.
disconnect
();
...
...
src/main/webapp/WEB-INF/controllers/LeftMenuController.js
View file @
5a51b08a
...
@@ -28,8 +28,6 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
...
@@ -28,8 +28,6 @@ myApp.controller("leftmenuController",function($scope, myFactory, $compile){
$scope
.
nonManageGroup
.
push
(
$scope
.
menuItems
[
i
]);
$scope
.
nonManageGroup
.
push
(
$scope
.
menuItems
[
i
]);
}
}
}
}
console
.
log
(
'MANAGE'
,
$scope
.
manageGroup
);
console
.
log
(
'NONMANAGE'
,
$scope
.
nonManageGroup
);
$scope
.
custom
=
true
;
$scope
.
custom
=
true
;
$scope
.
toggleManage
=
function
(){
$scope
.
toggleManage
=
function
(){
$scope
.
custom
=
$scope
.
custom
===
false
?
true
:
false
;
$scope
.
custom
=
$scope
.
custom
===
false
?
true
:
false
;
...
...
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
5a51b08a
...
@@ -90,7 +90,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -90,7 +90,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"accounts"
url
:
appConfig
.
appUri
+
"accounts"
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
response
.
data
.
records
);
var
accounts
=
response
.
data
.
records
;
var
accounts
=
response
.
data
.
records
;
myFactory
.
setAccounts
(
accounts
);
myFactory
.
setAccounts
(
accounts
);
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
...
@@ -107,10 +106,10 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -107,10 +106,10 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
locals
:{
dataToPass
:
profile
,
rolesData
:
$scope
.
rolesData
},
locals
:{
dataToPass
:
profile
,
rolesData
:
$scope
.
rolesData
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Cancelled"
){
console
.
log
(
result
);
if
(
result
==
"Cancelled"
){
showProgressDialog
(
"Registration cancelled!!! Please wait while redirected to login page."
);
showProgressDialog
(
"Registration cancelled!!! Please wait while redirected to login page."
);
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
}
else
if
(
result
==
"RegAlert"
){
console
.
log
(
result
);
}
else
if
(
result
==
"RegAlert"
){
showProgressDialog
(
"Application access/registration required!!! Please reachout to HR to get required access"
);
showProgressDialog
(
"Application access/registration required!!! Please reachout to HR to get required access"
);
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
}
}
...
@@ -119,7 +118,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -119,7 +118,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
$timeout
(
function
(){
redirectToLoginPage
();},
2000
);
}
else
{
}
else
{
showProgressDialog
(
"Registered successfully!!! Please wait while redirected to home page."
);
showProgressDialog
(
"Registered successfully!!! Please wait while redirected to home page."
);
console
.
log
(
"Result:: "
+
result
.
data
);
$timeout
(
function
(){
setDefaultValues
(
result
.
data
,
profile
.
getImageUrl
());},
2000
);
$timeout
(
function
(){
setDefaultValues
(
result
.
data
,
profile
.
getImageUrl
());},
2000
);
}
}
});
});
...
@@ -353,7 +351,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
...
@@ -353,7 +351,6 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
auth2
.
signOut
().
then
(
function
()
{
auth2
.
signOut
().
then
(
function
()
{
console
.
log
(
'User signed out.'
);
});
});
auth2
.
disconnect
();
auth2
.
disconnect
();
...
...
src/main/webapp/WEB-INF/controllers/MyProjectAllocations.js
View file @
5a51b08a
...
@@ -95,7 +95,6 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
...
@@ -95,7 +95,6 @@ myApp.controller("myProjectAllocationsController",function($scope, myFactory, $m
$mdDialog
.
hide
();
$mdDialog
.
hide
();
};
};
function
ProjectDetailsController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
)
{
function
ProjectDetailsController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
)
{
console
.
log
(
dataToPass
);
$scope
.
templateTitle
=
dataToPass
.
action
;
$scope
.
templateTitle
=
dataToPass
.
action
;
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
$scope
.
isDisabled
=
false
;
$scope
.
isDisabled
=
false
;
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
5a51b08a
...
@@ -62,7 +62,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -62,7 +62,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
};
$scope
.
getRowData
=
function
(
row
,
action
)
{
$scope
.
getRowData
=
function
(
row
,
action
)
{
console
.
log
(
row
.
entity
);
$scope
.
parentData
.
projectId
=
row
.
entity
.
projectId
;
$scope
.
parentData
.
projectId
=
row
.
entity
.
projectId
;
$scope
.
parentData
.
projectName
=
row
.
entity
.
projectName
;
$scope
.
parentData
.
projectName
=
row
.
entity
.
projectName
;
$scope
.
parentData
.
account
=
row
.
entity
.
account
;
$scope
.
parentData
.
account
=
row
.
entity
.
account
;
...
@@ -82,10 +81,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -82,10 +81,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
viewTeamDetails
(
action
,
$scope
.
parentData
);
$scope
.
viewTeamDetails
(
action
,
$scope
.
parentData
);
}
}
// function getColumnName() {
// console.log($scope.gridOptions.data);
// return 'managerIds';
// }
$scope
.
refreshPage
=
function
()
{
$scope
.
refreshPage
=
function
()
{
$scope
.
empSearchId
=
""
;
$scope
.
empSearchId
=
""
;
...
@@ -197,10 +193,20 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -197,10 +193,20 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
{
$scope
.
refreshPage
();
showAlert
(
'Project created successfully'
);
}
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
showAlert
(
'Project updated successfully'
);
}
$scope
.
refreshPage
();
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
showAlert
(
'Project created successfully'
);
else
showAlert
(
'Project assigning/updation failed!!!'
);
}
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
showAlert
(
'Project updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Project assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
viewTeamDetails
=
function
(
action
,
userData
)
{
$scope
.
viewTeamDetails
=
function
(
action
,
userData
)
{
...
@@ -214,10 +220,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -214,10 +220,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
{
showAlert
(
'Manager assigned successfully'
);}
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
)
{
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
)
{
...
@@ -231,10 +245,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -231,10 +245,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
)
{
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
)
{
...
@@ -248,10 +270,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -248,10 +270,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -269,7 +299,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -269,7 +299,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
deleteUserRole
(
row
.
entity
.
projectId
);
deleteUserRole
(
row
.
entity
.
projectId
);
$timeout
(
function
()
{
updateGridAfterDelete
(
row
)
},
500
);
$timeout
(
function
()
{
updateGridAfterDelete
(
row
)
},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -280,7 +310,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -280,7 +310,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
$scope
.
result
=
response
.
data
;
console
.
log
(
$scope
.
result
);
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
$scope
.
result
=
"Error"
;
$scope
.
result
=
"Error"
;
});
});
...
@@ -317,7 +346,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -317,7 +346,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
function
AddProjectController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
,
$window
,
$mdSelect
)
{
function
AddProjectController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
,
$window
,
$mdSelect
)
{
console
.
log
(
managers
,
dataToPass
);
$scope
.
templateTitle
=
dataToPass
.
action
;
$scope
.
templateTitle
=
dataToPass
.
action
;
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
$scope
.
isDisabled
=
false
;
$scope
.
isDisabled
=
false
;
...
@@ -422,7 +450,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -422,7 +450,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// code added
// code added
$scope
.
clearSearchTerm
=
function
()
{
$scope
.
clearSearchTerm
=
function
()
{
console
.
log
(
$scope
.
deliveryLeadsSelectedList
);
// $("#lead .lead-search .md-select-value span .md-text").css({
// $("#lead .lead-search .md-select-value span .md-text").css({
// 'border': '1px solid #000',
// 'border': '1px solid #000',
...
@@ -602,8 +630,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -602,8 +630,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
};
$scope
.
getRowData
=
function
(
row
,
action
){
$scope
.
getRowData
=
function
(
row
,
action
){
console
.
log
(
'row selected'
,
row
);
console
.
log
(
'action'
,
action
);
$scope
.
parentData
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
parentData
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
...
@@ -625,7 +651,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -625,7 +651,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
updateTeamMate
(
action
,
$scope
.
parentData
);
$scope
.
updateTeamMate
(
action
,
$scope
.
parentData
);
}
}
if
(
action
==
"Delete"
){
if
(
action
==
"Delete"
){
console
.
log
(
"deleted"
);
$scope
.
deleteTeamMate
(
row
);
$scope
.
deleteTeamMate
(
row
);
}
}
...
@@ -666,7 +691,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -666,7 +691,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
getProjectDetails
(
$scope
.
projectId
,
$scope
.
status
);
getProjectDetails
(
$scope
.
projectId
,
$scope
.
status
);
}
}
$scope
.
updateTeamMate
=
function
(
action
,
userData
){
$scope
.
updateTeamMate
=
function
(
action
,
userData
){
console
.
log
(
userData
);
$scope
.
updateTab
();
$scope
.
updateTab
();
$scope
.
id
=
userData
.
id
;
$scope
.
id
=
userData
.
id
;
$scope
.
employeeModel
=
{
$scope
.
employeeModel
=
{
...
@@ -701,19 +725,17 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -701,19 +725,17 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
// locals:{dataToPass: userData, gridOptionsData: $scope.gridOptions.data, employees: $scope.employees},
// })
// })
// .then(function(result) {
// .then(function(result) {
// console.log("result");
//// if(result == "Add") showAlert('New Teammate assigned successfully');
//// if(result == "Add") showAlert('New Teammate assigned successfully');
//// else if(result == "Update") {
//// else if(result == "Update") {
//// $scope.refreshPage();
//// $scope.refreshPage();
//// showAlert('Teammate updated successfully');
//// showAlert('Teammate updated successfully');
////
////
//// }
//// }
//// else if(result == "Cancelled")
console.log(result);
//// else if(result == "Cancelled")
{}
//// else showAlert('Teammate assigning/updation failed!!!');
//// else showAlert('Teammate assigning/updation failed!!!');
// });
// });
};
};
$scope
.
deleteTeamMate
=
function
(
row
)
{
$scope
.
deleteTeamMate
=
function
(
row
)
{
console
.
log
(
row
);
$scope
.
id
=
row
.
entity
.
id
;
$scope
.
id
=
row
.
entity
.
id
;
$scope
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
projectId
=
row
.
entity
.
projectId
;
$scope
.
projectId
=
row
.
entity
.
projectId
;
...
@@ -1038,7 +1060,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1038,7 +1060,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
startDate
=
$scope
.
newBillingStartDate
;
$scope
.
startDate
=
$scope
.
newBillingStartDate
;
}
}
isDataUpdated
=
function
()
{
isDataUpdated
=
function
()
{
console
.
log
(
dataToPass
);
if
(
dataToPass
.
action
==
"Update"
)
{
if
(
dataToPass
.
action
==
"Update"
)
{
$scope
.
previousData
=
{
$scope
.
previousData
=
{
ProjectID
:
dataToPass
.
projectId
,
ProjectID
:
dataToPass
.
projectId
,
...
@@ -1049,7 +1070,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1049,7 +1070,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
StartDate
:
new
Date
(
dataToPass
.
projectStartDate
),
StartDate
:
new
Date
(
dataToPass
.
projectStartDate
),
EndDate
:
new
Date
(
dataToPass
.
projectEndDate
)
EndDate
:
new
Date
(
dataToPass
.
projectEndDate
)
}
}
console
.
log
(
$scope
.
projectStartDate
);
$scope
.
currentData
=
{
$scope
.
currentData
=
{
ProjectID
:
$scope
.
projectId
,
ProjectID
:
$scope
.
projectId
,
ProjectName
:
$scope
.
projectName
,
ProjectName
:
$scope
.
projectName
,
...
@@ -1211,9 +1231,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1211,9 +1231,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
else
{
else
{
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
console
.
log
(
$scope
.
projectStatus
,
$scope
.
domain
.
domainId
);
var
record
=
{
"projectId"
:
$scope
.
projectId
,
"projectName"
:
$scope
.
projectName
,
"account"
:
$scope
.
account
.
accountName
,
"domain"
:
$scope
.
domain
.
domainName
,
"accountId"
:
$scope
.
account
.
accountId
,
"domainId"
:
$scope
.
domain
.
domainId
,
"managerIds"
:
[],
"deliveryLeadIds"
:
getSelectedDeliveryLeadIds
(),
"status"
:
$scope
.
projectStatus
,
"projectStartDate"
:
$scope
.
projectStartDate
,
"projectEndDate"
:
$scope
.
projectEndDate
};
var
record
=
{
"projectId"
:
$scope
.
projectId
,
"projectName"
:
$scope
.
projectName
,
"account"
:
$scope
.
account
.
accountName
,
"domain"
:
$scope
.
domain
.
domainName
,
"accountId"
:
$scope
.
account
.
accountId
,
"domainId"
:
$scope
.
domain
.
domainId
,
"managerIds"
:
[],
"deliveryLeadIds"
:
getSelectedDeliveryLeadIds
(),
"status"
:
$scope
.
projectStatus
,
"projectStartDate"
:
$scope
.
projectStartDate
,
"projectEndDate"
:
$scope
.
projectEndDate
};
console
.
log
(
record
);
if
(
action
==
"Update"
){
if
(
action
==
"Update"
){
if
(
isDataUpdated
()
!=
true
)
{
if
(
isDataUpdated
()
!=
true
)
{
$mdDialog
.
show
(
$mdDialog
.
alert
({
$mdDialog
.
show
(
$mdDialog
.
alert
({
...
@@ -1265,9 +1283,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1265,9 +1283,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if
(
dataToPass
.
action
==
"Assign"
)
{
if
(
dataToPass
.
action
==
"Assign"
)
{
var
totalFields
=
$scope
.
myForm
.
$$controls
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
console
.
log
(
"Came here!"
);
showConfirmDialog
=
true
;
showConfirmDialog
=
true
;
}
}
}
}
...
@@ -1339,7 +1355,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1339,7 +1355,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
if
(
$scope
.
templateTitle
==
"Add"
)
{
if
(
$scope
.
templateTitle
==
"Add"
)
{
console
.
log
(
$scope
.
myForm
);
if
(
$scope
.
myForm
.
$dirty
)
{
if
(
$scope
.
myForm
.
$dirty
)
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
skipHide
:
true
,
...
@@ -1419,7 +1434,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1419,7 +1434,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
else
if
(
action
==
"Add"
){
else
if
(
action
==
"Add"
){
$scope
.
gridOptions
.
data
.
push
(
record
);
$scope
.
gridOptions
.
data
.
push
(
record
);
console
.
log
(
$scope
.
gridOptions
.
data
);
for
(
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
for
(
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
if
(
$scope
.
gridOptions
.
data
[
i
].
role
==
'Lead'
){
if
(
$scope
.
gridOptions
.
data
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
...
@@ -1451,7 +1465,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1451,7 +1465,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
result
=
"Success"
;
$scope
.
result
=
"Success"
;
var
titleOfModel
=
"Attention"
;
var
titleOfModel
=
"Attention"
;
$scope
.
objectId
=
response
.
data
.
records
.
id
;
$scope
.
objectId
=
response
.
data
.
records
.
id
;
console
.
log
(
$scope
.
id
,
response
.
data
.
records
.
id
,
"$scope.id "
);
if
(
response
.
data
.
message
==
"TeamMate added successfuly"
){
if
(
response
.
data
.
message
==
"TeamMate added successfuly"
){
titleOfModel
=
""
;
titleOfModel
=
""
;
$timeout
(
function
(){
$timeout
(
function
(){
...
@@ -1549,7 +1562,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1549,7 +1562,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
data
:
record
data
:
record
}
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
response
.
data
);
if
(
response
.
data
.
message
==
"Project name already exist !!! try with new"
){
if
(
response
.
data
.
message
==
"Project name already exist !!! try with new"
){
$mdDialog
.
show
(
$mdDialog
.
alert
({
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
skipHide
:
true
,
...
...
src/main/webapp/WEB-INF/controllers/ProjectMyTeamController.js
View file @
5a51b08a
...
@@ -167,10 +167,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
...
@@ -167,10 +167,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
,
projects
:
$scope
.
projects
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
,
projects
:
$scope
.
projects
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Role assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Role updated successfully'
);
showAlert
(
'Role assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Role assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Role updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Role assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
updateEmployee
=
function
(
action
,
userData
){
$scope
.
updateEmployee
=
function
(
action
,
userData
){
...
@@ -184,10 +192,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
...
@@ -184,10 +192,18 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
,
projects
:
$scope
.
projects
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
,
projects
:
$scope
.
projects
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Role assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Role updated successfully'
);
showAlert
(
'Role assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Role assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Role updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Role assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -205,7 +221,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
...
@@ -205,7 +221,7 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
deleteUserRole
(
row
.
entity
.
employeeId
);
deleteUserRole
(
row
.
entity
.
employeeId
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -216,7 +232,6 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
...
@@ -216,7 +232,6 @@ myApp.controller("projectMyTeamController",function($scope, myFactory, $mdDialog
}
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
$scope
.
result
=
response
.
data
;
console
.
log
(
$scope
.
result
);
},
function
myError
(
response
){
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
$scope
.
result
=
"Error"
;
});
});
...
...
src/main/webapp/WEB-INF/controllers/ReportsController.js
View file @
5a51b08a
...
@@ -257,9 +257,9 @@ myApp
...
@@ -257,9 +257,9 @@ myApp
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"deleteReport/"
+
fileName
url
:
appConfig
.
appUri
+
"deleteReport/"
+
fileName
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
"Report deleted successfully."
);
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
console
.
log
(
"Something went wrong while deleting the report!!!"
);
});
});
}
}
...
@@ -326,7 +326,6 @@ myApp
...
@@ -326,7 +326,6 @@ myApp
// url : defaultURL
// url : defaultURL
// }).then(function mySuccess(response) {
// }).then(function mySuccess(response) {
// if(response.data){
// if(response.data){
// console.log(response.data);
// $scope.jsonToExport = response.data;
// $scope.jsonToExport = response.data;
// excelDataFormation();
// excelDataFormation();
// }
// }
...
@@ -375,7 +374,7 @@ myApp
...
@@ -375,7 +374,7 @@ myApp
deleteReport
(
$scope
.
pdfUrl
);
deleteReport
(
$scope
.
pdfUrl
);
}
}
else
if
(
result
.
data
==
"Cancelled"
||
result
.
data
==
undefined
){
else
if
(
result
.
data
==
"Cancelled"
||
result
.
data
==
undefined
){
console
.
log
(
"Dialog cancelled"
);
}
}
else
{
else
{
showAlert
(
"Something went wrong while sending email!!!"
);
showAlert
(
"Something went wrong while sending email!!!"
);
...
@@ -393,9 +392,9 @@ myApp
...
@@ -393,9 +392,9 @@ myApp
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"deleteReport/"
+
fileName
url
:
appConfig
.
appUri
+
"deleteReport/"
+
fileName
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
console
.
log
(
"Report deleted successfully after sending email."
);
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
console
.
log
(
"Something went wrong while deleting the report!!!"
);
});
});
setDefaults
();
setDefaults
();
}
}
...
...
src/main/webapp/WEB-INF/controllers/ResourceController.js
View file @
5a51b08a
...
@@ -160,10 +160,18 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -160,10 +160,18 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'New Teammate assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Teammate updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -178,14 +186,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -178,14 +186,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -202,14 +216,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -202,14 +216,20 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
ViewBillability
=
function
(
action
,
userData
){
$scope
.
ViewBillability
=
function
(
action
,
userData
){
...
@@ -223,14 +243,19 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -223,14 +243,19 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -249,7 +274,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -249,7 +274,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$timeout
(
function
(){
updateGridAfterDelete
(
row
.
entity
.
employeeId
)},
500
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
.
entity
.
employeeId
)},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -735,10 +760,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -735,10 +760,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
var
showConfirmDialog
=
false
;
// console.log(dataToPass);
// console.log( "nb"+new Date(dataToPass.newBillingStartDate));
// console.log("end"+new Date(dataToPass.endDate));
// console.log("start"+new Date(dataToPass.startDate));
if
(
dataToPass
.
action
==
"Update"
){
if
(
dataToPass
.
action
==
"Update"
){
$scope
.
previousData
=
{
$scope
.
previousData
=
{
EmployeeName
:
dataToPass
.
employeeName
,
EmployeeName
:
dataToPass
.
employeeName
,
...
@@ -755,9 +776,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -755,9 +776,6 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
Enddate
:
new
Date
(
dataToPass
.
endDate
),
Enddate
:
new
Date
(
dataToPass
.
endDate
),
NewBillingStartDate
:
new
Date
(
dataToPass
.
newBillingStartDate
)
NewBillingStartDate
:
new
Date
(
dataToPass
.
newBillingStartDate
)
}
}
// console.log("nb"+$scope.newBillingStartDate);
// console.log("end"+$scope.endDate);
console
.
log
(
$scope
.
shift
);
$scope
.
currentData
=
{
$scope
.
currentData
=
{
EmployeeName
:
$scope
.
employeeName
,
EmployeeName
:
$scope
.
employeeName
,
EmployeeId
:
$scope
.
employeeId
,
EmployeeId
:
$scope
.
employeeId
,
...
@@ -792,9 +810,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -792,9 +810,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
if
(
dataToPass
.
action
==
"Add"
){
if
(
dataToPass
.
action
==
"Add"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
)
{
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
)
{
console
.
log
(
"Came here!"
);
showConfirmDialog
=
true
;
showConfirmDialog
=
true
;
}
}
}
}
...
...
src/main/webapp/WEB-INF/controllers/SessionHandlerController.js
View file @
5a51b08a
...
@@ -45,7 +45,7 @@ myApp.controller('SessionController',
...
@@ -45,7 +45,7 @@ myApp.controller('SessionController',
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
var
auth2
=
gapi
.
auth2
.
getAuthInstance
();
auth2
.
signOut
().
then
(
function
()
{
auth2
.
signOut
().
then
(
function
()
{
console
.
log
(
'User signed out.'
);
});
});
auth2
.
disconnect
();
auth2
.
disconnect
();
...
...
src/main/webapp/WEB-INF/controllers/TravelController.js
View file @
5a51b08a
...
@@ -151,13 +151,21 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -151,13 +151,21 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'Travel request created successfully'
);
if
(
result
==
"Add"
){
else
if
(
result
==
"Update"
)
showAlert
(
'Travel request updated successfully'
);
showAlert
(
'Travel request created successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
){
showAlert
(
'Travel request updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
$scope
.
refreshPage
();
$scope
.
refreshPage
();
});
}
});
};
};
$scope
.
updateEmployee
=
function
(
action
,
userData
){
$scope
.
updateEmployee
=
function
(
action
,
userData
){
...
@@ -171,14 +179,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -171,14 +179,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -195,14 +209,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -195,14 +209,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
ViewBillability
=
function
(
action
,
userData
){
$scope
.
ViewBillability
=
function
(
action
,
userData
){
...
@@ -216,14 +236,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -216,14 +236,20 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
){
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -243,7 +269,6 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -243,7 +269,6 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
$scope
.
refreshPage
();
$scope
.
refreshPage
();
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -461,9 +486,7 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
...
@@ -461,9 +486,7 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
var
showConfirmDialog
=
false
;
var
showConfirmDialog
=
false
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
console
.
log
(
"Came here!"
);
showConfirmDialog
=
true
;
showConfirmDialog
=
true
;
}
}
}
}
...
...
src/main/webapp/WEB-INF/controllers/ViewProjectController.js
View file @
5a51b08a
...
@@ -139,10 +139,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -139,10 +139,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Project created successfully'
);
if
(
result
==
"Assign"
){
else
if
(
result
==
"Update"
)
showAlert
(
'Project updated successfully'
);
showAlert
(
'Project created successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Project assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Project updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Project assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
viewTeamDetails
=
function
(
action
,
userData
){
$scope
.
viewTeamDetails
=
function
(
action
,
userData
){
...
@@ -156,10 +164,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -156,10 +164,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
if
(
result
==
"Assign"
){
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
){
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
){
...
@@ -173,10 +189,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -173,10 +189,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
){
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
){
...
@@ -190,10 +214,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -190,10 +214,18 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
if
(
result
==
"Assign"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Manager assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Manager updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Manager assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -211,7 +243,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -211,7 +243,7 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
deleteUserRole
(
row
.
entity
.
projectId
);
deleteUserRole
(
row
.
entity
.
projectId
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -222,7 +254,6 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
...
@@ -222,7 +254,6 @@ myApp.controller("viewProjectController",function($scope, myFactory,exportUiGrid
}
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
$scope
.
result
=
response
.
data
;
console
.
log
(
$scope
.
result
);
},
function
myError
(
response
){
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
$scope
.
result
=
"Error"
;
});
});
...
...
src/main/webapp/WEB-INF/controllers/VisaController.js
View file @
5a51b08a
...
@@ -143,10 +143,18 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -143,10 +143,18 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
)
{
else
if
(
result
==
"Update"
)
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'New Teammate assigned successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
}
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
else
if
(
result
==
"Update"
)
{
showAlert
(
'Teammate updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
{
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
$scope
.
refreshPage
();
$scope
.
refreshPage
();
});
});
...
@@ -169,8 +177,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -169,8 +177,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
){
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -187,14 +199,20 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -187,14 +199,20 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
employees
:
$scope
.
employees
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'New Teammate assigned successfully'
);
if
(
result
==
"Add"
){
showAlert
(
'New Teammate assigned successfully'
);
}
else
if
(
result
==
"Update"
)
{
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
$scope
.
refreshPage
();
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
){
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
$scope
.
ViewBillability
=
function
(
action
,
userData
){
$scope
.
ViewBillability
=
function
(
action
,
userData
){
...
@@ -214,8 +232,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -214,8 +232,12 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
showAlert
(
'Teammate updated successfully'
);
showAlert
(
'Teammate updated successfully'
);
}
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
{
else
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
else
{
showAlert
(
'Teammate assigning/updation failed!!!'
);
}
});
});
};
};
...
@@ -234,7 +256,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -234,7 +256,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
$timeout
(
function
(){
updateGridAfterDelete
(
row
.
entity
.
employeeId
)},
500
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
.
entity
.
employeeId
)},
500
);
},
function
()
{
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
});
};
};
...
@@ -409,9 +431,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
...
@@ -409,9 +431,7 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
var
showConfirmDialog
=
false
;
var
showConfirmDialog
=
false
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
var
totalFields
=
$scope
.
myForm
.
$$controls
;
for
(
key
in
totalFields
)
{
for
(
key
in
totalFields
)
{
console
.
log
(
"Model value of"
+
key
+
" ==>"
+
totalFields
[
key
].
$modelValue
)
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
if
(
totalFields
[
key
].
$modelValue
!==
''
&&
totalFields
[
key
].
$modelValue
!==
undefined
&&
totalFields
[
key
].
$modelValue
.
length
!==
0
)
{
console
.
log
(
"Came here!"
);
showConfirmDialog
=
true
;
showConfirmDialog
=
true
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment