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
d19e7bde
Unverified
Commit
d19e7bde
authored
Aug 01, 2018
by
mshaik-nisum-com
Committed by
GitHub
Aug 01, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #96 from nisum-inc/BugFixes/Validations
bugs fix in update project and validations
parents
1292cc36
6a32a38d
Changes
2
Show 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 @
d19e7bde
...
...
@@ -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 @
d19e7bde
...
...
@@ -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,8 +1067,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
cancel
=
function
()
{
var
showConfirmDialog
=
false
;
console
.
log
(
dataToPass
);
if
(
dataToPass
.
action
==
"Update"
){
if
(
$scope
.
domain
!=
undefined
){
$scope
.
previousData
=
{
ProjectID
:
dataToPass
.
projectId
,
ProjectName
:
dataToPass
.
projectName
,
...
...
@@ -1120,6 +1124,18 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
})
}
}
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
;
for
(
key
in
totalFields
)
{
...
...
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