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
6a32a38d
Commit
6a32a38d
authored
Jul 31, 2018
by
Manikanta SKPB Duppanapudi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugs fix in update project and validations
parent
8d974640
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
65 deletions
+81
-65
LoginController.js
src/main/webapp/WEB-INF/controllers/LoginController.js
+1
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+80
-64
No files found.
src/main/webapp/WEB-INF/controllers/LoginController.js
View file @
6a32a38d
...
...
@@ -324,7 +324,7 @@ myApp.controller("loginController",function($scope, myFactory, $compile, $window
menuItems
.
push
({
"menu"
:
"My Org"
,
"icon"
:
"fa fa-address-card-o fa-2x"
,
"path"
:
"templates/myOrg.html"
});
menuItems
.
push
({
"menu"
:
"My Profile"
,
"icon"
:
"fa fa-address-book-o fa-2x"
,
"path"
:
"templates/profile.html"
});
}
else
{
//
menuItems.push({"menu" : "My Team","icon" : "fa fa-futbol-o fa-2x","path" : "templates/myTeam.html"});
menuItems
.
push
({
"menu"
:
"My Team"
,
"icon"
:
"fa fa-futbol-o fa-2x"
,
"path"
:
"templates/myTeam.html"
});
menuItems
.
push
({
"menu"
:
"My Project Allocations"
,
"icon"
:
"fa fa-life-ring fa-2x"
,
"path"
:
"templates/myProjectAllocations.html"
});
menuItems
.
push
({
"menu"
:
"My Login Details"
,
"icon"
:
"fa fa-indent fa-2x"
,
"path"
:
"templates/employee.html"
});
menuItems
.
push
({
"menu"
:
"My Org"
,
"icon"
:
"fa fa-address-card-o fa-2x"
,
"path"
:
"templates/myOrg.html"
});
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
6a32a38d
...
...
@@ -200,7 +200,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
{
showAlert
(
'Manager assigned successfully'
);}
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
else
if
(
result
==
"Cancelled"
)
{
console
.
log
(
result
);
$scope
.
getProjects
();}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
showAlert
(
'Manager assigning/updation failed!!!'
);
});
};
...
...
@@ -433,7 +433,11 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
});
};
function
setDomain
(
action
)
{
$scope
.
domain
=
{
"domainName"
:
dataToPass
.
domain
,
"domainId"
:
dataToPass
.
domainId
};
$scope
.
domains
.
forEach
(
function
(
domain
){
if
(
domain
.
domainId
==
dataToPass
.
domainId
){
$scope
.
domain
=
domain
}
})
if
(
$scope
.
domain
.
domainId
!=
undefined
){
getManagersAssociatedToDomain
(
$scope
.
domain
.
domainId
,
action
);
}
...
...
@@ -798,6 +802,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// ]
noDomainError
();
$scope
.
domains
=
[];
$scope
.
managerDetails
=
[];
}
if
(
action
==
"Update"
){
setDomain
(
action
);
...
...
@@ -813,7 +818,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
getDomainsAssoicatedToAccount
(
$scope
.
account
.
accountId
);
}
$scope
.
domain
=
undefined
;
$scope
.
domains
=
[];
$scope
.
deliveryLeadsSelectedList
=
{};
$scope
.
managerDetails
=
[];
$scope
.
projectStatus
=
undefined
;
}
...
...
@@ -824,10 +831,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if
(
$scope
.
domain
.
domainId
!=
undefined
){
getManagersAssociatedToDomain
(
$scope
.
domain
.
domainId
);
}
else
{
$scope
.
managerDetails
=
managers
;
}
$scope
.
deliveryLeadsSelectedList
=
{};
$scope
.
managerDetails
=
[];
$scope
.
projectStatus
=
undefined
;
}
}
...
...
@@ -835,17 +840,19 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if
(
$scope
.
domain
.
domainId
!=
undefined
){
getManagersAssociatedToDomain
(
$scope
.
domain
.
domainId
);
}
else
{
$scope
.
managerDetails
=
managers
;
}
$scope
.
deliveryLeadsSelectedList
=
{};
$scope
.
managerDetails
=
[];
$scope
.
projectStatus
=
undefined
;
}
}
function
setDeliveryLead
(){
$scope
.
deliveryLeadsSelectedList
=
dataToPass
.
deliveryLeadIds
[
0
];
$scope
.
managerDetails
.
forEach
(
function
(
deliveryLead
){
if
(
deliveryLead
.
employeeId
==
dataToPass
.
deliveryLeadIds
[
0
].
employeeId
){
$scope
.
deliveryLeadsSelectedList
=
deliveryLead
;
}
});
}
$scope
.
getAccountText
=
function
()
{
...
...
@@ -884,9 +891,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if
(
result
!=
""
||
result
.
length
!=
0
){
$scope
.
managerDetails
=
result
;
}
else
{
$scope
.
managerDetails
=
managers
;
}
if
(
action
==
"Update"
){
setDeliveryLead
();
}
...
...
@@ -1063,62 +1067,74 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
console
.
log
(
dataToPass
);
if
(
dataToPass
.
action
==
"Update"
){
$scope
.
previousData
=
{
ProjectID
:
dataToPass
.
projectId
,
ProjectName
:
dataToPass
.
projectName
,
Account
:
dataToPass
.
account
,
Domain
:
dataToPass
.
domain
,
ProjectStatus
:
dataToPass
.
status
}
$scope
.
currentData
=
{
ProjectID
:
$scope
.
projectId
,
ProjectName
:
$scope
.
projectName
,
Account
:
$scope
.
account
.
accountName
,
Domain
:
$scope
.
domain
.
domainName
,
ProjectStatus
:
$scope
.
projectStatus
,
}
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
var
exsistingMangersList
=
dataToPass
.
deliveryLeadIds
;
var
temp
=
[];
temp
.
push
(
$scope
.
deliveryLeadsSelectedList
);
var
currentMangersList
=
temp
;
var
managerCheck
=
false
;
if
(
exsistingMangersList
.
length
===
currentMangersList
.
length
){
var
temp1
=
[];
var
temp2
=
[];
for
(
var
i
in
exsistingMangersList
){
temp1
.
push
(
exsistingMangersList
[
i
].
employeeId
);
}
for
(
var
j
in
currentMangersList
){
temp2
.
push
(
currentMangersList
[
j
].
employeeId
);
if
(
$scope
.
domain
!=
undefined
){
$scope
.
previousData
=
{
ProjectID
:
dataToPass
.
projectId
,
ProjectName
:
dataToPass
.
projectName
,
Account
:
dataToPass
.
account
,
Domain
:
dataToPass
.
domain
,
ProjectStatus
:
dataToPass
.
status
}
$scope
.
currentData
=
{
ProjectID
:
$scope
.
projectId
,
ProjectName
:
$scope
.
projectName
,
Account
:
$scope
.
account
.
accountName
,
Domain
:
$scope
.
domain
.
domainName
,
ProjectStatus
:
$scope
.
projectStatus
,
}
for
(
var
k
=
0
;
k
<
exsistingMangersList
.
length
;
k
++
){
if
(
temp2
.
indexOf
(
temp1
[
k
])
>
-
1
){
managerCheck
=
true
;
}
else
{
managerCheck
=
false
;
var
predata
=
JSON
.
stringify
(
$scope
.
previousData
);
var
curdata
=
JSON
.
stringify
(
$scope
.
currentData
);
var
exsistingMangersList
=
dataToPass
.
deliveryLeadIds
;
var
temp
=
[];
temp
.
push
(
$scope
.
deliveryLeadsSelectedList
);
var
currentMangersList
=
temp
;
var
managerCheck
=
false
;
if
(
exsistingMangersList
.
length
===
currentMangersList
.
length
){
var
temp1
=
[];
var
temp2
=
[];
for
(
var
i
in
exsistingMangersList
){
temp1
.
push
(
exsistingMangersList
[
i
].
employeeId
);
}
for
(
var
j
in
currentMangersList
){
temp2
.
push
(
currentMangersList
[
j
].
employeeId
);
}
for
(
var
k
=
0
;
k
<
exsistingMangersList
.
length
;
k
++
){
if
(
temp2
.
indexOf
(
temp1
[
k
])
>
-
1
){
managerCheck
=
true
;
}
else
{
managerCheck
=
false
;
}
}
}
else
{
managerCheck
=
false
;
}
}
else
{
managerCheck
=
false
;
}
if
(
predata
===
curdata
&&
managerCheck
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
if
(
predata
===
curdata
&&
managerCheck
){
$mdDialog
.
hide
(
'Cancelled'
);
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
else
{
$mdDialog
.
show
(
$mdDialog
.
confirm
({
skipHide
:
true
,
textContent
:
'Are you sure you want to cancel this?'
,
ok
:
'ok'
,
cancel
:
'cancel'
})).
then
(
function
(){
$mdDialog
.
hide
(
'Cancelled'
);
})
}
}
if
(
dataToPass
.
action
==
"Assign"
){
var
totalFields
=
$scope
.
myForm
.
$$controls
;
...
...
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