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
0a4ebbcf
Commit
0a4ebbcf
authored
Jul 18, 2018
by
vsunke-nisum-com
Committed by
rbonthala-nisum-com
Jul 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-79 (#21)
parent
a7204af0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
795 additions
and
816 deletions
+795
-816
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+438
-581
default-styles.css
src/main/webapp/WEB-INF/css/default-styles.css
+174
-156
index.html
src/main/webapp/WEB-INF/templates/index.html
+2
-2
newProject.html
src/main/webapp/WEB-INF/templates/newProject.html
+181
-77
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
0a4ebbcf
myApp
.
controller
(
"projectController"
,
function
(
$scope
,
myFactory
,
exportUiGridService
,
$mdDialog
,
$http
,
appConfig
,
$timeout
,
$window
)
{
myApp
.
controller
(
"projectController"
,
function
(
$scope
,
myFactory
,
exportUiGridService
,
$mdDialog
,
$http
,
appConfig
,
$timeout
,
$window
,
$mdSelect
,
$element
)
{
$scope
.
records
=
[];
$scope
.
empSearchId
=
""
;
$scope
.
parentData
=
{
"projectId"
:
""
,
"projectName"
:
""
,
"account"
:
""
,
"managerId"
:
""
,
"managerId"
:
""
,
"managerName"
:
""
,
"status"
:
""
,
"action"
:
""
"action"
:
""
};
$scope
.
managers
=
[];
var
getCellTemplate
=
'<p class="col-lg-12"><i class="fa fa-book fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,
\'
View
\'
)"></i>'
+
' <i class="fa fa-pencil-square-o fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,
\'
Update
\'
)"></i>'
+
' <i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.getRowData(row,
\'
Delete
\'
)"></i></p>'
;
//code added
$window
.
addEventListener
(
'click'
,
function
(
e
)
{
if
(
e
.
target
.
type
!==
'search'
)
{
$mdSelect
.
hide
();
}
});
//code added
var
getCellTemplate
=
'<p class="col-lg-12"><i class="fa fa-book fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.getRowData(row,
\'
View
\'
)" ></i>'
+
' <i class="fa fa-pencil-square-o fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="View" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.getRowData(row,
\'
Update
\'
)"></i>'
+
' <i class="fa fa-minus-circle fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="left" title="Delete" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.getRowData(row,
\'
Delete
\'
)"></i></p>'
;
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
pageSize
:
10
,
pageSize
:
10
,
enableFiltering
:
true
,
columnDefs
:
[
{
field
:
'projectId'
,
displayName
:
'Project ID'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
120
},
{
field
:
'projectName'
,
displayName
:
'Project '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'account'
,
displayName
:
'Account '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
columnDefs
:
[
{
field
:
'projectId'
,
displayName
:
'Project ID'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
120
,
},
{
field
:
'projectName'
,
displayName
:
'Project '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'account'
,
displayName
:
'Account '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
//{field : 'managerId',displayName: 'Manager ID ', enableColumnMenu: false, enableSorting: false},
{
field
:
'managerName'
,
displayName
:
'Manager Name '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'status'
,
displayName
:
'Status '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
false
},
{
name
:
'Actions'
,
displayName
:
'Actions'
,
cellTemplate
:
getCellTemplate
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
130
}
{
field
:
'managerIds'
,
displayName
:
'Manager Name '
,
cellTemplate
:
'<div ng-repeat= "item in row.entity[col.field]">{{item}}<span ng-hide="$last">,</span></div>'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'status'
,
displayName
:
'Status '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
false
},
{
name
:
'Actions'
,
displayName
:
'Actions'
,
cellTemplate
:
getCellTemplate
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
130
}
]
};
$scope
.
gridOptions
.
data
=
$scope
.
records
;
$scope
.
getRowData
=
function
(
row
,
action
){
$scope
.
getRowData
=
function
(
row
,
action
)
{
$scope
.
parentData
.
projectId
=
row
.
entity
.
projectId
;
$scope
.
parentData
.
projectName
=
row
.
entity
.
projectName
;
$scope
.
parentData
.
account
=
row
.
entity
.
account
;
$scope
.
parentData
.
managerId
=
row
.
entity
.
managerId
;
$scope
.
parentData
.
managerName
=
row
.
entity
.
managerName
;
$scope
.
parentData
.
domain
=
row
.
entity
.
domain
;
$scope
.
parentData
.
domain
=
row
.
entity
.
domain
;
$scope
.
parentData
.
status
=
row
.
entity
.
status
;
if
(
action
==
"Update"
)
if
(
action
==
"Update"
)
$scope
.
addProject
(
action
,
$scope
.
parentData
);
else
if
(
action
==
"Delete"
)
else
if
(
action
==
"Delete"
)
$scope
.
deleteRole
(
row
);
else
if
(
action
==
"View"
)
else
if
(
action
==
"View"
)
$scope
.
viewTeamDetails
(
action
,
$scope
.
parentData
);
}
$scope
.
refreshPage
=
function
(){
$scope
.
refreshPage
=
function
()
{
$scope
.
empSearchId
=
""
;
$scope
.
getProjects
();
$scope
.
getManagerDetails
();
}
$scope
.
getProjects
=
function
()
{
$scope
.
getProjects
=
function
()
{
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"project/getProjects"
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"project/getProjects"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
};
$scope
.
getManagerDetails
=
function
()
{
$scope
.
getManagerDetails
=
function
()
{
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/user/getManagers"
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/user/getManagers"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
managers
=
response
.
data
;
$scope
.
managers
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
};
$scope
.
validateEmpId
=
function
()
{
$scope
.
validateEmpId
=
function
()
{
var
searchId
=
$scope
.
empSearchId
;
if
(
searchId
!=
""
&&
isNaN
(
searchId
))
{
if
(
searchId
!=
""
&&
isNaN
(
searchId
))
{
showAlert
(
'Please enter only digits'
);
$scope
.
empSearchId
=
""
;
document
.
getElementById
(
'empSearchId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
(
searchId
.
length
<
5
||
searchId
.
length
>
5
))
{
}
else
if
(
searchId
!=
""
&&
(
searchId
.
length
<
5
||
searchId
.
length
>
5
))
{
showAlert
(
'Employee ID should be 5 digits'
);
$scope
.
empSearchId
=
""
;
document
.
getElementById
(
'empSearchId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
!
checkEmpIdRange
(
searchId
))
{
showAlert
(
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
);
}
else
if
(
searchId
!=
""
&&
!
checkEmpIdRange
(
searchId
))
{
showAlert
(
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
);
$scope
.
empSearchId
=
""
;
document
.
getElementById
(
'empSearchId'
).
focus
();
}
};
function
checkEmpIdRange
(
searchId
){
function
checkEmpIdRange
(
searchId
)
{
return
parseInt
(
searchId
)
>=
appConfig
.
empStartId
&&
parseInt
(
searchId
)
<=
appConfig
.
empEndId
;
}
$scope
.
getEmployeeRole
=
function
(
type
)
{
$scope
.
getEmployeeRole
=
function
(
type
)
{
var
searchId
=
$scope
.
empSearchId
;
if
(
searchId
==
""
&&
searchId
.
length
==
0
)
{
if
(
searchId
==
""
&&
searchId
.
length
==
0
)
{
showAlert
(
'Employee ID is mandatory'
);
$scope
.
empSearchId
=
""
;
document
.
getElementById
(
'empSearchId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
!
checkEmpIdRange
(
searchId
))
{
showAlert
(
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
);
}
else
if
(
searchId
!=
""
&&
!
checkEmpIdRange
(
searchId
))
{
showAlert
(
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
);
$scope
.
empSearchId
=
""
;
document
.
getElementById
(
'empSearchId'
).
focus
();
}
else
{
}
else
{
$scope
.
gridOptions
.
data
=
[];
getEmployeeRoleData
(
searchId
);
}
};
function
getEmployeeRoleData
(
empId
){
function
getEmployeeRoleData
(
empId
)
{
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"user/getEmployeeRoleData?empId="
+
empId
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"user/getEmployeeRoleData?empId="
+
empId
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
!=
""
&&
response
.
data
.
length
!=
0
)
{
if
(
response
.
data
!=
""
&&
response
.
data
.
length
!=
0
)
{
$scope
.
gridOptions
.
data
.
push
(
response
.
data
);
}
},
function
myError
(
response
)
{
...
...
@@ -138,192 +152,180 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
'Alert Dialog'
).
ok
(
'Ok'
));
}
$scope
.
addProject
=
function
(
action
,
userData
)
{
$scope
.
addProject
=
function
(
action
,
userData
)
{
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
userData
.
action
=
action
;
$mdDialog
.
show
({
controller
:
AddProjectController
,
templateUrl
:
'templates/newProject.html'
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
true
,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
clickOutsideToClose
:
true
,
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
){
$scope
.
refreshPage
();
showAlert
(
'Project created successfully'
);
}
else
if
(
result
==
"Update"
){
$scope
.
refreshPage
();
showAlert
(
'Project updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
.
then
(
function
(
result
)
{
if
(
result
==
"Assign"
)
{
$scope
.
refreshPage
();
showAlert
(
'Project created successfully'
);
}
else
if
(
result
==
"Update"
)
{
$scope
.
refreshPage
();
showAlert
(
'Project updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
showAlert
(
'Project assigning/updation failed!!!'
);
});
};
$scope
.
viewTeamDetails
=
function
(
action
,
userData
)
{
$scope
.
viewTeamDetails
=
function
(
action
,
userData
)
{
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
userData
.
action
=
action
;
$mdDialog
.
show
({
controller
:
AddProjectController
,
templateUrl
:
'templates/projectTeamDetails.html'
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
true
,
preserveScope
:
true
,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
clickOutsideToClose
:
true
,
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
.
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
);
.
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
);
else
showAlert
(
'Manager assigning/updation failed!!!'
);
});
};
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
){
$scope
.
getUnAssignedEmployees
=
function
(
action
,
userData
)
{
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
userData
.
action
=
action
;
$mdDialog
.
show
({
controller
:
AddProjectController
,
templateUrl
:
'templates/projectNotAssignedDetails.html'
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
true
,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
clickOutsideToClose
:
true
,
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
.
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
);
.
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
);
else
showAlert
(
'Manager assigning/updation failed!!!'
);
});
};
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
)
{
$scope
.
getAllocatedEmployees
=
function
(
action
,
userData
)
{
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
userData
.
action
=
action
;
$mdDialog
.
show
({
controller
:
AddProjectController
,
templateUrl
:
'templates/projectAssignedDetails.html'
,
parent
:
angular
.
element
(
document
.
body
),
clickOutsideToClose
:
true
,
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
,
employees
:
$scope
.
employees
},
clickOutsideToClose
:
true
,
locals
:
{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
,
managers
:
$scope
.
managers
},
})
.
then
(
function
(
result
)
{
console
.
log
(
"result"
,
result
);
if
(
result
==
"Assign"
)
showAlert
(
'Manager assigned successfully'
);
else
if
(
result
==
"Update"
)
showAlert
(
'Manager updated successfully'
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
.
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
);
else
showAlert
(
'Manager assigning/updation failed!!!'
);
});
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
$mdDialog
.
hide
();
};
$scope
.
deleteRole
=
function
(
row
){
$scope
.
deleteRole
=
function
(
row
)
{
$
(
'#home'
).
addClass
(
'md-scroll-mask'
);
var
confirm
=
$mdDialog
.
confirm
()
.
clickOutsideToClose
(
true
)
.
textContent
(
'Are you sure you want to delete this project?'
)
.
ok
(
'Ok'
)
.
cancel
(
'Cancel'
);
$mdDialog
.
show
(
confirm
).
then
(
function
()
{
$mdDialog
.
show
(
confirm
).
then
(
function
()
{
deleteUserRole
(
row
.
entity
.
projectId
);
$timeout
(
function
(){
updateGridAfterDelete
(
row
)},
500
);
},
function
()
{
$timeout
(
function
()
{
updateGridAfterDelete
(
row
)
},
500
);
},
function
()
{
console
.
log
(
"Cancelled dialog"
);
});
};
function
deleteUserRole
(
projectId
){
function
deleteUserRole
(
projectId
)
{
var
req
=
{
method
:
'DELETE'
,
url
:
appConfig
.
appUri
+
"project/deleteProject?projectId="
+
projectId
method
:
'DELETE'
,
url
:
appConfig
.
appUri
+
"project/deleteProject?projectId="
+
projectId
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
response
.
data
;
console
.
log
(
$scope
.
result
);
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
$scope
.
result
=
"Error"
;
});
}
function
updateGridAfterDelete
(
row
){
if
(
$scope
.
result
==
"Success"
||
$scope
.
result
==
""
)
{
function
updateGridAfterDelete
(
row
)
{
if
(
$scope
.
result
==
"Success"
||
$scope
.
result
==
""
)
{
var
index
=
$scope
.
gridOptions
.
data
.
indexOf
(
row
.
entity
);
$scope
.
gridOptions
.
data
.
splice
(
index
,
1
);
showAlert
(
'Project deleted successfully'
);
}
else
if
(
$scope
.
result
==
"Error"
)
{
}
else
if
(
$scope
.
result
==
"Error"
)
{
showAlert
(
'Something went wrong while deleting the role.'
)
}
}
function
AddProjectController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
,
$window
,
$mdSelect
)
{
function
AddProjectController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
managers
)
{
$scope
.
templateTitle
=
dataToPass
.
action
;
$scope
.
alertMsg
=
""
;
$scope
.
isDisabled
=
false
;
$scope
.
result
=
""
;
$scope
.
managerDetails
=
managers
;
$scope
.
employee
;
$scope
.
projectModel
;
$scope
.
isSecondTab
=
false
;
$scope
.
prjctStses
=
[
"Active"
,
"Completed"
,
"On Hold"
,
"Proposed"
];
$scope
.
billableStatuses
=
[
"Billable"
,
"Shadow"
,
"Non-Billable"
,
"Reserved"
];
$scope
.
accounts
=
myFactory
.
getAccounts
();
$scope
.
selectedTab
=
0
;
$scope
.
addTab
=
function
()
{
if
(
$scope
.
isSecondTab
===
false
){
$scope
.
templateTitle
=
"Add"
;
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
=
"visible"
;
$scope
.
isSecondTab
=
true
;
$scope
.
selectedTab
=
1
;
}
$scope
.
managersSelectedList
=
[];
$scope
.
employeeInTeam
=
[];
// code added
$scope
.
searchTerm
=
""
;
$scope
.
updateSearch
=
function
(
e
)
{
e
.
stopPropagation
();
}
$scope
.
searchFilter
=
function
(
obj
)
{
var
re
=
new
RegExp
(
$scope
.
searchTerm
,
'i'
);
return
!
$scope
.
searchTerm
||
re
.
test
(
obj
.
employeeName
);
};
// code added
var
removeTab
=
function
(
action
)
{
if
(
action
==
"Add"
){
if
(
$scope
.
isSecondTab
===
true
){
$
(
'.md-select-value'
)[
0
].
childNodes
[
0
].
innerHTML
=
null
$
(
'.md-select-value'
)[
1
].
childNodes
[
0
].
innerHTML
=
null
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
$scope
.
employeeModel
=
{};
}
$scope
.
prjctStses
=
[
"Active"
,
"Completed"
,
"On Hold"
,
"Proposed"
];
$scope
.
clearSearchTerm
=
function
()
{
console
.
log
(
$scope
.
managersSelectedList
);
// $("#lead .lead-search .md-select-value span .md-text").css({
// 'border': '1px solid #000',
// 'padding': '1px',
// }).append('<span class="glyphicon glyphicon-remove" style="margin-left: 5px;"></span>');
// $(".leads-data").text($("#lead .lead-search .md-select-value span .md-text").text().append('<span class="glyphicon glyphicon-remove" style="margin-left: 5px;"></span>'));
}
$scope
.
selectedTab
=
0
;
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
=
"hidden"
;
$scope
.
isSecondTab
=
!
$scope
.
isSecondTab
;
$scope
.
removeSelectedLead
=
function
(
item
)
{
var
index
=
$scope
.
managersSelectedList
.
indexOf
(
item
);
$scope
.
managersSelectedList
.
splice
(
index
,
1
);
}
};
$window
.
addEventListener
(
'click'
,
function
(
e
){
$scope
.
closeSelectBox
=
function
()
{
$mdSelect
.
hide
();
})
$scope
.
getEmployeeDetails
=
function
(){
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"projectTeam/getEmployeesToTeam"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
employeeList
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
}
});
};
getSelectedLead
=
function
()
{
$scope
.
managersSelectedList
.
forEach
(
function
(
manager
)
{
if
(
!
$scope
.
employeeInTeam
.
includes
(
manager
.
employeeId
))
$scope
.
employeeInTeam
.
push
(
manager
.
employeeId
);
})
return
$scope
.
employeeInTeam
;
}
if
(
dataToPass
.
action
==
"Assign"
){
$scope
.
accounts
=
myFactory
.
getAccounts
();
if
(
dataToPass
.
action
==
"Assign"
)
{
$scope
.
projectId
=
""
;
$scope
.
projectName
=
""
;
$scope
.
managerId
=
""
;
$scope
.
managerName
=
""
;
$scope
.
isDisabled
=
false
;
}
else
if
(
dataToPass
.
action
==
"Update"
)
{
}
else
if
(
dataToPass
.
action
==
"Update"
)
{
$scope
.
projectId
=
dataToPass
.
projectId
;
$scope
.
projectName
=
dataToPass
.
projectName
;
$scope
.
managerId
=
dataToPass
.
managerId
;
$scope
.
managerName
=
dataToPass
.
managerName
;
var
accounts1
=
myFactory
.
getAccounts
();
var
accounts1
=
myFactory
.
getAccounts
();
for
(
var
i
=
0
;
i
<
accounts1
.
length
;
i
++
)
{
if
(
accounts1
[
i
].
accountName
=
dataToPass
.
account
)
{
if
(
accounts1
[
i
].
accountName
=
dataToPass
.
account
)
{
$scope
.
account
=
accounts1
[
i
];
}
}
...
...
@@ -336,112 +338,90 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
};
$scope
.
managerDetails
=
managers
;
$scope
.
isDisabled
=
true
;
}
else
if
(
dataToPass
.
action
==
"View"
){
}
else
if
(
dataToPass
.
action
==
"View"
)
{
$scope
.
projectId
=
dataToPass
.
projectId
;
$scope
.
account
=
dataToPass
.
account
;
$scope
.
projectName
=
dataToPass
.
projectName
;
$scope
.
managerId
=
dataToPass
.
managerId
;
$scope
.
managerName
=
dataToPass
.
managerName
;
$scope
.
projectStatus
=
dataToPass
.
status
;
$scope
.
domain
=
dataToPass
.
domain
;
$scope
.
managerModel
=
{
'employeeName'
:
dataToPass
.
managerName
,
'employeeId'
:
dataToPass
.
managerId
};
$scope
.
projectModel
=
{
'projectName'
:
dataToPass
.
projectName
,
'projectId'
:
dataToPass
.
projectId
};
var
employeeModel
=
$scope
.
employeeModel
;
var
getCellActiveTemplate
=
'<div ng-show="COL_FIELD==true"><p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>'
;
var
getCellActiveTemplate
=
'<div ng-show="COL_FIELD==true"><p class="col-lg-12">Y</P></div><div ng-show="COL_FIELD==false"><p class="col-lg-12">N</p></div>'
;
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'experience'
,
displayName
:
'Exp'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
80
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'active'
,
displayName
:
'Status '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellTemplate
:
getCellActiveTemplate
},
{
field
:
'billableStatus'
,
displayName
:
'Billability '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'experience'
,
displayName
:
'Exp'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
80
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'active'
,
displayName
:
'Status '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellTemplate
:
getCellActiveTemplate
},
{
field
:
'billableStatus'
,
displayName
:
'Billability '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
]
};
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getProjectDetails?projectId="
+
$scope
.
projectId
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getProjectDetails?projectId="
+
$scope
.
projectId
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
document
.
addEventListener
(
"DOMSubtreeModified"
,
function
(
e
)
{
if
(
document
.
getElementsByClassName
(
"md-tab"
)[
1
]
&&
(
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
===
""
)){
document
.
getElementsByClassName
(
"md-tab"
)[
1
].
style
.
visibility
=
"hidden"
;
}
},
false
);
}
else
if
(
dataToPass
.
action
==
"UnAssigned"
){
}
else
if
(
dataToPass
.
action
==
"UnAssigned"
)
{
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
]
};
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getUnAssignedEmployees"
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getUnAssignedEmployees"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
});
}
else
if
(
dataToPass
.
action
==
"allocated"
)
{
}
else
if
(
dataToPass
.
action
==
"allocated"
)
{
$scope
.
gridOptions
=
{
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'projectName'
,
displayName
:
'Project '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'managerName'
,
displayName
:
'Manager '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'experience'
,
displayName
:
'Exp'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
50
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'billableStatus'
,
displayName
:
'Billability '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Empl Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'emailId'
,
displayName
:
'Email Id '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'projectName'
,
displayName
:
'Project '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'managerName'
,
displayName
:
'Manager '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'experience'
,
displayName
:
'Exp'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
50
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'billableStatus'
,
displayName
:
'Billability '
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
],
enableGridMenu
:
true
,
enableSelectAll
:
true
,
exporterMenuExcel
:
false
,
exporterMenuCsv
:
false
,
exporterMenuExcel
:
false
,
exporterMenuCsv
:
false
,
exporterCsvFilename
:
'Allocated.csv'
,
exporterExcelFilename
:
'AllocatedResources'
,
exporterPdfDefaultStyle
:
{
fontSize
:
9
},
exporterPdfTableStyle
:
{
margin
:
[
30
,
30
,
30
,
30
]
},
exporterPdfTableHeaderStyle
:
{
fontSize
:
10
,
bold
:
true
,
italics
:
true
,
color
:
'red'
},
exporterExcelFilename
:
'AllocatedResources'
,
exporterPdfDefaultStyle
:
{
fontSize
:
9
},
exporterPdfTableStyle
:
{
margin
:
[
30
,
30
,
30
,
30
]
},
exporterPdfTableHeaderStyle
:
{
fontSize
:
10
,
bold
:
true
,
italics
:
true
,
color
:
'red'
},
exporterPdfHeader
:
{
text
:
"Allocated Resources"
,
style
:
'headerStyle'
},
exporterPdfFooter
:
function
(
currentPage
,
pageCount
)
{
exporterPdfFooter
:
function
(
currentPage
,
pageCount
)
{
return
{
text
:
currentPage
.
toString
()
+
' of '
+
pageCount
.
toString
(),
style
:
'footerStyle'
};
},
exporterPdfCustomFormatter
:
function
(
docDefinition
)
{
exporterPdfCustomFormatter
:
function
(
docDefinition
)
{
docDefinition
.
styles
.
headerStyle
=
{
fontSize
:
22
,
bold
:
true
};
docDefinition
.
styles
.
footerStyle
=
{
fontSize
:
10
,
bold
:
true
};
return
docDefinition
;
...
...
@@ -450,7 +430,7 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
exporterPdfPageSize
:
'LETTER'
,
exporterPdfMaxGridWidth
:
500
,
exporterCsvLinkElement
:
angular
.
element
(
document
.
querySelectorAll
(
".custom-csv-link-location"
)),
onRegisterApi
:
function
(
gridApi
)
{
onRegisterApi
:
function
(
gridApi
)
{
$scope
.
gridApi
=
gridApi
;
},
gridMenuCustomItems
:
[{
...
...
@@ -470,10 +450,9 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
]
};
$scope
.
isDisabled
=
true
;
$http
({
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getProjectAllocations"
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"/projectTeam/getProjectAllocations"
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -481,14 +460,14 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
$scope
.
gridOptions
.
data
=
[];
});
}
$scope
.
getManagers
=
function
()
{
$scope
.
getManagers
=
function
()
{
if
(
$scope
.
managerModel
!==
undefined
)
{
return
$scope
.
managerModel
.
employeeName
;
}
else
{
return
"Please select a manager"
;
}
};
$scope
.
getProjectStatus
=
function
()
{
$scope
.
getProjectStatus
=
function
()
{
if
(
$scope
.
projectStatus
!==
undefined
)
{
return
$scope
.
projectStatus
;
}
else
{
...
...
@@ -498,280 +477,158 @@ myApp.controller("projectController",function($scope, myFactory,exportUiGridServ
$scope
.
getAccountText
=
function
()
{
$scope
.
getAccountText
=
function
()
{
if
(
$scope
.
account
!==
undefined
)
{
return
$scope
.
account
.
accountName
;
}
else
{
return
"Please select account"
;
}
};
$scope
.
getDomainText
=
function
()
{
$scope
.
getDomainText
=
function
()
{
if
(
$scope
.
domain
!==
undefined
)
{
return
$scope
.
domain
;
}
else
{
return
"Please select domain"
;
}
};
$scope
.
validateEmpId
=
function
()
{
$scope
.
validateEmpId
=
function
()
{
var
searchId
=
$scope
.
empId
;
if
(
searchId
!=
""
&&
isNaN
(
searchId
))
{
if
(
searchId
!=
""
&&
isNaN
(
searchId
))
{
$scope
.
alertMsg
=
"Please enter only digits"
;
document
.
getElementById
(
'empId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
((
searchId
.
length
>
0
&&
searchId
.
length
<
5
)
||
searchId
.
length
>
5
))
{
}
else
if
(
searchId
!=
""
&&
((
searchId
.
length
>
0
&&
searchId
.
length
<
5
)
||
searchId
.
length
>
5
))
{
$scope
.
alertMsg
=
"Employee ID should be 5 digits"
;
document
.
getElementById
(
'empId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
!
checkRoleEmpIdRange
(
searchId
))
{
$scope
.
alertMsg
=
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
;
}
else
if
(
searchId
!=
""
&&
!
checkRoleEmpIdRange
(
searchId
))
{
$scope
.
alertMsg
=
'Employee ID should be in between '
+
appConfig
.
empStartId
+
' - '
+
appConfig
.
empEndId
;
document
.
getElementById
(
'empId'
).
focus
();
}
else
if
(
searchId
!=
""
&&
checkRoleExistence
(
searchId
))
{
}
else
if
(
searchId
!=
""
&&
checkRoleExistence
(
searchId
))
{
$scope
.
alertMsg
=
'Employee ID is already assigned a role'
;
document
.
getElementById
(
'empId'
).
focus
();
}
else
{
}
else
{
$scope
.
alertMsg
=
""
;
}
};
function
checkRoleEmpIdRange
(
searchId
){
function
checkRoleEmpIdRange
(
searchId
)
{
return
parseInt
(
searchId
)
>=
appConfig
.
empStartId
&&
parseInt
(
searchId
)
<=
appConfig
.
empEndId
;
}
function
checkRoleExistence
(
searchId
){
for
(
var
i
in
gridOptionsData
)
{
if
(
gridOptionsData
[
i
].
employeeId
==
searchId
)
{
function
checkRoleExistence
(
searchId
)
{
for
(
var
i
in
gridOptionsData
)
{
if
(
gridOptionsData
[
i
].
employeeId
==
searchId
)
{
return
true
;
}
}
return
false
;
}
$scope
.
validateEmailId
=
function
()
{
$scope
.
validateEmailId
=
function
()
{
var
emailId
=
$scope
.
empEmail
;
if
(
emailId
!=
""
&&
!
validateEmail
(
emailId
))
{
if
(
emailId
!=
""
&&
!
validateEmail
(
emailId
))
{
$scope
.
alertMsg
=
"Please enter a valid nisum email id"
;
document
.
getElementById
(
'empEmail'
).
focus
();
}
else
{
}
else
{
$scope
.
alertMsg
=
""
;
}
}
function
validateEmail
(
emailId
){
function
validateEmail
(
emailId
)
{
var
re
=
/^
(([^
<>()[
\]\\
.,;:
\s
@
\"]
+
(\.[^
<>()[
\]\\
.,;:
\s
@
\"]
+
)
*
)
|
(\"
.+
\"))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
if
(
re
.
test
(
emailId
))
{
if
(
emailId
.
indexOf
(
"@nisum.com"
,
emailId
.
length
-
"@nisum.com"
.
length
)
!==
-
1
)
{
if
(
re
.
test
(
emailId
))
{
if
(
emailId
.
indexOf
(
"@nisum.com"
,
emailId
.
length
-
"@nisum.com"
.
length
)
!==
-
1
)
{
return
true
;
}
}
return
false
;
}
$scope
.
currentBillabilityDateChange
=
function
(){
$scope
.
startDate
=
$scope
.
newBillingStartDate
;
$scope
.
getSelected
=
function
()
{
return
null
;
}
$scope
.
validateFields
=
function
(
action
){
$scope
.
validateFields
=
function
()
{
var
project
=
$scope
.
projectId
;
var
projectName
=
$scope
.
projectName
;
var
managerModel
=
$scope
.
managerModel
;
var
account
=
$scope
.
account
;
var
managerId
=
$scope
.
managerId
;
var
managerName
=
$scope
.
managerName
;
var
employeeModel
=
$scope
.
employeeModel
;
var
projectModel
=
$scope
.
projectModel
;
var
domain
=
$scope
.
domain
;
var
newBillingStartDate
=
$scope
.
newBillingStartDate
if
(
action
===
"Add"
){
if
(
employeeModel
==
undefined
){
$scope
.
alertMsg
=
"Please select a employee"
;
angular
.
element
(
document
.
getElementById
(
'selectEmp'
)).
focus
();
}
else
if
(
$scope
.
empBillableStatus
==
undefined
){
$scope
.
alertMsg
=
"Please select a billable status"
;
angular
.
element
(
document
.
getElementById
(
'empBillableStatus'
)).
focus
();
}
else
if
(
$scope
.
startDate
==
undefined
)
{
$scope
.
alertMsg
=
"Please select Start Date"
;
angular
.
element
(
document
.
getElementById
(
'startDate'
)).
focus
();
}
else
if
(
$scope
.
endDate
==
undefined
)
{
$scope
.
alertMsg
=
"Please select End Date"
;
angular
.
element
(
document
.
getElementById
(
'endDate'
)).
focus
();
}
else
if
(
$scope
.
newBillingStartDate
==
undefined
){
$scope
.
alertMsg
=
"Please select new Billing StartDate"
;
angular
.
element
(
document
.
getElementById
(
'newBillingStartDate'
)).
focus
();
}
else
if
(
$scope
.
newBillingStartDate
>
$scope
.
endDate
){
$scope
.
alertMsg
=
"Assignment End Date should be less than Current Billability Start Date "
;
}
else
if
(
employeeModel
!=
undefined
&&
projectModel
!=
undefined
&&
getExistingRecordProjectStatus
(
employeeModel
.
employeeId
,
projectModel
.
projectName
)){
$scope
.
alertMsg
=
"Employee is already assigned to the selected project"
;
return
false
;
}
else
{
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"designation"
:
employeeModel
.
designation
,
"projectId"
:
project
,
"projectName"
:
projectName
,
"managerId"
:
managerId
,
"managerName"
:
managerName
,
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"account"
:
account
,
"newBillingStartDate"
:
newBillingStartDate
};
addRecord
(
record
,
action
);
$timeout
(
function
(){
updateGrid
(
'Add'
,
record
);
removeTab
(
'Add'
);
$mdDialog
.
show
(
$mdDialog
.
alert
({
skipHide
:
true
,
textContent
:
'Employee Added'
,
ok
:
'ok'
}));
},
500
);
}
}
else
{
// if(project == ""){
// $scope.alertMsg = "Project ID is mandatory";
// document.getElementById('projectId').focus();
// }else
if
(
projectName
==
""
){
// if(project == ""){
// $scope.alertMsg = "Project ID is mandatory";
// document.getElementById('projectId').focus();
// }else
if
(
projectName
==
""
)
{
$scope
.
alertMsg
=
"Project Name is mandatory"
;
document
.
getElementById
(
'projectName'
).
focus
();
}
else
if
(
account
==
undefined
||
account
==
""
)
{
}
else
if
(
account
==
undefined
||
account
==
""
)
{
$scope
.
alertMsg
=
"Account is mandatory"
;
document
.
getElementById
(
'account'
).
focus
();
}
else
if
(
domain
==
undefined
||
domain
==
""
)
{
}
else
if
(
domain
==
undefined
||
domain
==
""
)
{
$scope
.
alertMsg
=
"Domain is mandatory"
;
document
.
getElementById
(
'domain'
).
focus
();
}
else
if
(
managerModel
==
undefined
){
$scope
.
alertMsg
=
"Please select a manager
"
;
}
else
{
//
else if(managerModel == undefined){
// $scope.alertMsg = "Please select a Lead
";
//
}
else
{
$scope
.
alertMsg
=
""
;
var
record
=
{
"projectId"
:
$scope
.
projectId
,
"projectName"
:
$scope
.
projectName
,
"managerId"
:
$scope
.
managerModel
.
employeeId
,
"managerName"
:
$scope
.
managerModel
.
employeeName
,
"status"
:
$scope
.
projectStatus
,
"account"
:
$scope
.
account
.
accountName
,
"domain"
:
$scope
.
domain
};
console
.
log
(
getSelectedLead
());
var
record
=
{
"projectId"
:
$scope
.
projectId
,
"projectName"
:
$scope
.
projectName
,
"managerIds"
:
getSelectedLead
(),
"status"
:
$scope
.
projectStatus
,
"account"
:
$scope
.
account
.
accountName
,
"domain"
:
$scope
.
domain
};
addOrUpdateProject
(
record
,
$scope
.
templateTitle
);
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
500
);
$timeout
(
function
()
{
updateGrid
(
$scope
.
templateTitle
,
record
)
},
500
);
}
}
};
$scope
.
cancelDialog
=
function
()
{
$mdDialog
.
hide
(
'Cancelled'
);
};
$scope
.
cancelTab
=
function
()
{
removeTab
(
"cancel"
);
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
$mdDialog
.
hide
(
'Cancelled'
);
};
$scope
.
getEmployeeSelected
=
function
(){
if
(
$scope
.
employeeModel
!==
undefined
)
{
$scope
.
employee
=
$scope
.
employeeModel
;
return
$scope
.
employeeModel
.
employeeName
;
}
else
{
return
"Please select a employee"
;
}
};
// $scope.getProjectSelected = function(){
// if ($scope.projectModel !== undefined) {
// $scope.project=$scope.projectModel;
// return $scope.projectModel.projectName;
// } else {
// return "Please select a project";
// }
// };
$scope
.
getSelectedBillableStatus
=
function
(){
if
(
$scope
.
empBillableStatus
!==
undefined
)
{
return
$scope
.
empBillableStatus
;
}
else
{
return
"Please select a billable status"
;
}
};
function
updateGrid
(
action
,
record
){
if
(
$scope
.
alertMsg
==
""
){
if
(
$scope
.
result
==
"Success"
){
if
(
action
==
"Assign"
){
function
updateGrid
(
action
,
record
)
{
if
(
$scope
.
alertMsg
==
""
)
{
if
(
$scope
.
result
==
"Success"
)
{
if
(
action
==
"Assign"
)
{
gridOptionsData
.
push
(
record
);
$mdDialog
.
hide
(
action
);
}
else
if
(
action
==
"Update"
){
}
else
if
(
action
==
"Update"
)
{
var
existingRecord
=
getRowEntity
(
$scope
.
projectId
);
var
index
=
gridOptionsData
.
indexOf
(
existingRecord
);
gridOptionsData
[
index
]
=
record
;
$mdDialog
.
hide
(
action
);
}
else
if
(
action
==
"Add"
){
$scope
.
gridOptions
.
data
.
push
(
record
);
}
//
$mdDialog.hide(action);
}
else
{
$mdDialog
.
hide
(
action
);
}
else
{
$mdDialog
.
hide
(
"Error"
);
}
}
}
function
addRecord
(
record
,
action
){
var
urlRequest
=
""
;
urlRequest
=
appConfig
.
appUri
+
"projectTeam/addEmployeeToTeam"
;
var
req
=
{
method
:
'POST'
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
},
data
:
record
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
$scope
.
objectId
=
response
.
data
.
id
;
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
});
}
function
addOrUpdateProject
(
record
,
action
){
function
addOrUpdateProject
(
record
,
action
)
{
var
urlRequest
=
""
;
if
(
action
==
"Assign"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/addProject"
;
}
else
if
(
action
==
"Update"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/updateProject"
;
if
(
action
==
"Assign"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/addProject"
;
}
else
if
(
action
==
"Update"
)
{
urlRequest
=
appConfig
.
appUri
+
"project/updateProject"
;
}
var
req
=
{
method
:
'POST'
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
method
:
'POST'
,
url
:
urlRequest
,
headers
:
{
"Content-type"
:
"application/json"
},
data
:
record
data
:
record
}
$http
(
req
).
then
(
function
mySuccess
(
response
)
{
$scope
.
result
=
"Success"
;
},
function
myError
(
response
)
{
},
function
myError
(
response
)
{
$scope
.
result
=
"Error"
;
});
}
function
getRowEntity
(
empId
){
for
(
var
i
=
0
;
i
<
gridOptionsData
.
length
;
i
++
)
{
function
getRowEntity
(
empId
)
{
for
(
var
i
=
0
;
i
<
gridOptionsData
.
length
;
i
++
)
{
var
record
=
gridOptionsData
[
i
];
if
(
record
.
projectId
==
empId
)
{
if
(
record
.
projectId
==
empId
)
{
return
record
;
}
}
}
function
getExistingRecordProjectStatus
(
empId
,
projectName
){
for
(
var
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
var
record
=
$scope
.
gridOptions
.
data
[
i
];
if
(
record
.
employeeId
==
empId
){
if
(
record
.
active
==
true
&&
record
.
projectName
==
projectName
)
return
true
;
}
}
return
false
;
}
}
});
src/main/webapp/WEB-INF/css/default-styles.css
View file @
0a4ebbcf
#header
{
width
:
100%
;
height
:
8%
;
background-color
:
darkslategray
;
}
width
:
100%
;
height
:
8%
;
background-color
:
darkslategray
;
}
#sidebar-left
{
float
:
left
;
width
:
20%
;
height
:
87.5%
;
}
#main
{
float
:
left
;
width
:
80%
;
height
:
87.5%
;
background-color
:
floralwhite
;
margin-left
:
-7px
;
}
#sidebar-left
{
float
:
left
;
width
:
20%
;
height
:
87.5%
;
}
#main
{
float
:
left
;
width
:
80%
;
height
:
87.5%
;
background-color
:
floralwhite
;
margin-left
:
-7px
;
}
#footer
{
height
:
8%
;
width
:
100%
;
}
#footer
{
height
:
8%
;
width
:
100%
;
}
.myGrid
{
width
:
98.5%
;
height
:
300px
;
margin-left
:
5px
;
}
#gridTest
,
#gridTest1
.ui-grid-cell-contents
{
text-align
:
center
;
}
.watermark
{
.myGrid
{
width
:
98.5%
;
height
:
300px
;
margin-left
:
5px
;
}
#gridTest
,
#gridTest1
.ui-grid-cell-contents
{
text-align
:
center
;
}
.watermark
{
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-50%
);
...
...
@@ -38,50 +38,50 @@
width
:
100%
;
text-align
:
center
;
z-index
:
1000
;
}
}
.md-button
{
.md-button
{
text-transform
:
capitalize
!important
;
}
}
.carousel-indicators
li
{
background-color
:
orange
;
border-color
:
#ff9200
;
}
.carousel-indicators
li
{
background-color
:
orange
;
border-color
:
#ff9200
;
}
.carousel-indicators
.active
{
background-color
:
orange
;
border-color
:
#ff9200
;
}
.carousel-indicators
.active
{
background-color
:
orange
;
border-color
:
#ff9200
;
}
md-dialog
{
margin-left
:
15%
;
}
md-dialog
{
margin-left
:
15%
;
}
.navbar-inverse
{
.navbar-inverse
{
background-color
:
darkslategray
;
border-color
:
darkslategray
;
color
:
#fff
;
}
}
.navbar-inverse
.navbar-nav
>
.dropdown
>
a
.caret
{
.navbar-inverse
.navbar-nav
>
.dropdown
>
a
.caret
{
border-top-color
:
#fff
;
border-bottom-color
:
#fff
;
}
}
.navbar-inverse
.navbar-nav
>
.active
>
a
,
.navbar-inverse
.navbar-nav
>
.active
>
a
:hover
,
.navbar-inverse
.navbar-nav
>
.active
>
a
:focus
{
.navbar-inverse
.navbar-nav
>
.active
>
a
,
.navbar-inverse
.navbar-nav
>
.active
>
a
:hover
,
.navbar-inverse
.navbar-nav
>
.active
>
a
:focus
{
color
:
#fff
;
background-color
:
darkslategray
;
}
}
.mainDivHeaderClass
{
text-align
:
center
;
.mainDivHeaderClass
{
text-align
:
center
;
background
:
cadetblue
;
color
:
floralwhite
;
border-radius
:
5px
;
}
}
.dropdown-menu
{
.dropdown-menu
{
position
:
absolute
;
top
:
100%
;
left
:
0
;
...
...
@@ -99,59 +99,77 @@ md-dialog{
-webkit-box-shadow
:
0
6px
6px
rgba
(
0
,
0
,
0
,
0.175
);
box-shadow
:
0
6px
6px
rgba
(
0
,
0
,
0
,
0.175
);
background-clip
:
padding-box
;
}
}
.autoComplete-dropdown
{
font
:
inherit
;
border-color
:
#ececec
;
border-width
:
1px
;
width
:
206px
;
cursor
:
pointer
;
position
:
absolute
;
z-index
:
9999
;
top
:
35px
;
overflow-y
:
auto
;
max-height
:
206px
;
}
.autoComplete-dropdown
{
font
:
inherit
;
border-color
:
#ececec
;
border-width
:
1px
;
width
:
206px
;
cursor
:
pointer
;
position
:
absolute
;
z-index
:
9999
;
top
:
35px
;
overflow-y
:
auto
;
max-height
:
206px
;
}
.selectHeader
{
.selectHeader
{
Please
note
:
All
these
selectors
are
only
applied
to
children
of
elements
with
the
'selectdemoSelectHeader'
class
}
.selectHeader
.searchBoxHeader
{
border
:
none
;
outline
:
none
;
}
}
.selectHeader
.selectHeaderChild
{
box-shadow
:
0
1px
0
0
rgba
(
0
,
0
,
0
,
0.1
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.14
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.12
);
padding-left
:
10.667px
;
height
:
48px
;
cursor
:
pointer
;
position
:
relative
;
display
:
flex
;
width
:
auto
;
position
:
fixed
;
z-index
:
10
;
background
:
white
;
width
:
100%
;
}
.optionScroll
{
margin-top
:
50px
;
}
.selectHeader
.md-content._md
{
max-height
:
240px
;
}
.md-dialog-container
{
z-index
:
100
!important
;
}
.md-select-menu-container
{
z-index
:
100
!important
;
}
.md-dialog-custom-height
{
max-height
:
95%
!important
;
}
box-shadow
:
0
1px
0
0
rgba
(
0
,
0
,
0
,
0.1
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.14
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.12
);
padding-left
:
10.667px
;
height
:
48px
;
cursor
:
pointer
;
position
:
relative
;
display
:
flex
;
width
:
auto
;
position
:
fixed
;
z-index
:
10
;
background
:
white
;
width
:
100%
;
}
.optionScroll
{
margin-top
:
50px
;
}
.selectHeader
.md-content._md
{
max-height
:
240px
;
}
.md-dialog-container
{
z-index
:
100
!important
;
}
.md-select-menu-container
{
z-index
:
100
!important
;
}
/* Styles added*/
.selectdemoSelectHeader
{
/* Please note: All these selectors are only applied to children of elements with the 'selectdemoSelectHeader' class */
}
.selectdemoSelectHeader
.demo-header-searchbox
{
border
:
none
;
outline
:
none
;
height
:
100%
;
width
:
100%
;
padding
:
0
;
}
.selectdemoSelectHeader
.demo-select-header
{
box-shadow
:
0
1px
0
0
rgba
(
0
,
0
,
0
,
0.1
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.14
),
0
0
0
0
rgba
(
0
,
0
,
0
,
0.12
);
padding-left
:
10.667px
;
height
:
48px
;
cursor
:
pointer
;
position
:
relative
;
display
:
flex
;
align-items
:
center
;
width
:
auto
;
}
.selectdemoSelectHeader
md-content
._md
{
max-height
:
240px
;
}
.leads-data
{
border
:
1px
solid
#ccc
;
padding
:
5px
10px
;
float
:
left
;
width
:
100%
;}
.leads-data
p
{
float
:
left
;
width
:
auto
;
background
:
#ccc
;
margin-right
:
5px
;
padding
:
2px
2px
;}
.close-mdselect
{
right
:
9px
;
position
:
absolute
;
top
:
17px
;}
.search-spacingleft
{
height
:
48px
!important
;
padding-left
:
5px
;}
.header-spacing
{
padding-left
:
0px
!important
;}
/* Styles added*/
\ No newline at end of file
.md-content
{
height
:
1100px
!important
;
}
\ No newline at end of file
src/main/webapp/WEB-INF/templates/index.html
View file @
0a4ebbcf
...
...
@@ -15,7 +15,7 @@
<script
src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-route.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-animate.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-sanitize.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/angular_material/1.1.
9
/angular-material.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/angular_material/1.1.
0
/angular-material.min.js"
></script>
<script
src=
"https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular-aria.min.js"
></script>
<script
src=
"https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.5.0.js"
></script>
<script
src=
"https://code.highcharts.com/highcharts.js"
></script>
...
...
@@ -23,7 +23,7 @@
<script
src=
"https://code.highcharts.com/modules/exporting.js"
></script>
<script
src=
"https://code.highcharts.com/modules/export-data.js"
></script>
<script
src=
"https://code.highcharts.com/modules/data.js"
></script>
<link
rel=
"stylesheet"
href=
"https://ajax.googleapis.com/ajax/libs/angular_material/1.1.
9
/angular-material.min.css"
></link>
<link
rel=
"stylesheet"
href=
"https://ajax.googleapis.com/ajax/libs/angular_material/1.1.
0
/angular-material.min.css"
></link>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
></link>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"
></link>
<link
href=
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css"
rel=
"stylesheet"
>
...
...
src/main/webapp/WEB-INF/templates/newProject.html
View file @
0a4ebbcf
<md-dialog
aria-label=
"Role Template"
style=
"width:520px;height:450px;"
>
<form
ng-cloak
name=
"myForm"
>
<form
ng-cloak
name=
"myForm"
>
<md-toolbar>
<div
class=
"md-toolbar-tools"
style=
"background: cadetblue;"
>
<div
class=
"md-toolbar-tools"
style=
"background: cadetblue;"
>
<h2>
{{templateTitle}} Project
</h2>
<span
flex
></span>
<md-button
class=
"md-icon-button"
ng-click=
"cancel()"
>
<i
class=
"fa fa-times fa-2x"
style=
"margin-top: 5px; font-size: 1.5em; float: left"
></i>
</md-button>
<md-button
class=
"md-icon-button"
ng-click=
"cancel()"
>
<i
class=
"fa fa-times fa-2x"
style=
"margin-top: 5px; font-size: 1.5em; float: left"
></i>
</md-button>
</div>
</md-toolbar>
<md-dialog-content>
<div
class=
"md-dialog-content"
>
<div
class=
"form-group"
>
<div
class=
"row"
>
<div
class=
"row"
>
<table
width=
"450px"
>
<tr>
<td
colspan=
"4"
>
<b
>
Project ID
</b></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"projectId"
name=
"projectId"
ng-model=
"projectId"
placeholder=
"Project Id Auto Generates"
ng-blur=
""
ng-disabled=
"true"
/>
<b>
Project ID
</b>
</td>
<td
colspan=
"8"
>
<input
type=
"text"
class=
"form-control"
id=
"projectId"
name=
"projectId"
ng-model=
"projectId"
placeholder=
"Project Id Auto Generates"
ng-blur=
""
ng-disabled=
"true"
/>
</td>
<tr>
<td
colspan=
"4"
>
<b
>
Project Name
</b></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"projectName"
name=
"projectName"
ng-model=
"projectName"
placeholder=
"Project Name"
/>
<b>
Project Name
</b>
</td>
<td
colspan=
"8"
>
<input
type=
"text"
class=
"form-control"
id=
"projectName"
name=
"projectName"
ng-model=
"projectName"
placeholder=
"Project Name"
/>
</td>
</tr>
<tr>
<td
colspan=
"4"
>
<b
>
Account
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"account"
md-selected-text=
"getAccountText()"
id=
"account"
>
<md-optgroup
label=
"account"
>
<md-option
ng-value=
"account1"
ng-repeat=
"account1 in accounts"
>
{{account1.accountName}}
</md-option>
</md-optgroup>
</md-select>
<b>
Account
</b>
</td>
<td
colspan=
"8"
>
<md-select
ng-model=
"account"
md-selected-text=
"getAccountText()"
id=
"account"
>
<md-optgroup
label=
"account"
>
<md-option
ng-value=
"account1"
ng-repeat=
"account1 in accounts"
>
{{account1.accountName}}
</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
<tr>
<td
colspan=
"4"
>
<b
>
Domain
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"domain"
md-selected-text=
"getDomainText()"
id=
"domain"
>
<md-optgroup
label=
"domain"
>
<md-option
ng-value=
"domain"
ng-repeat=
"domain in account.subDomains"
>
{{domain}}
</md-option>
</md-optgroup>
</md-select>
<b>
Domain
</b>
</td>
<td
colspan=
"8"
>
<md-select
ng-model=
"domain"
md-selected-text=
"getDomainText()"
id=
"domain"
>
<md-optgroup
label=
"domain"
>
<md-option
ng-value=
"domain"
ng-repeat=
"domain in account.subDomains"
>
{{domain}}
</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
<tr>
<td
colspan=
"4"
>
<b
>
Manager
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"managerModel"
md-selected-text=
"getManagers()"
>
<md-optgroup
label=
"managers"
>
<md-option
ng-value=
"manager"
ng-repeat=
"manager in managerDetails"
>
{{manager.employeeName}}
</md-option>
</md-optgroup>
</md-select>
<b>
Lead
</b>
</td>
<!-- <td colspan="8"><md-select ng-model="managerModel" md-selected-text="getManagers()" >
<md-optgroup label="managers"> <md-option<< ng-value="manager"
ng-repeat="manager in managerDetails">{{manager.employeeName}}</md-option> </md-optgroup> </md-select>
</td> -->
<td
id=
"lead"
>
<div
class=
"leads-data"
ng-show=
"managersSelectedList.length > 0"
>
<div
ng-repeat=
"item in managersSelectedList"
>
<p>
{{item.employeeName}}
<span
ng-click=
"removeSelectedLead(item)"
class=
"glyphicon glyphicon-remove"
></span>
</p>
</div>
</div>
<md-input-container
style=
"display: block; float: left; width: 100%;"
>
<label>
Lead
</label>
<md-select
class=
"lead-search"
ng-model=
"managersSelectedList"
data-md-container-class=
"selectHeader"
md-selected-text=
"getSelected()"
multiple
>
<md-select-header
class=
"selectHeaderChild header-spacing"
layout=
"column"
>
<input
ng-model=
"searchTerm"
type=
"search"
ng-keydown=
"updateSearch($event)"
ng-model-options=
"{debounce: {'default': 500, 'blur': 0}}"
placeholder=
"Please Search for a lead"
class=
"demo-header-searchbox md-text search-spacingleft"
/>
<span
class=
"glyphicon glyphicon-remove close-mdselect"
ng-click=
"closeSelectBox()"
></span>
</md-select-header>
<md-optgroup
label=
"managers"
class=
"optionScroll"
>
<md-option
ng-value=
"manager"
ng-repeat=
"manager in managerDetails | filter:searchTerm"
>
{{manager.employeeName}}
</md-option>
</md-optgroup>
</md-select>
</md-input-container>
</td>
</tr>
<tr>
<td
colspan=
"4"
>
<b
>
Project Status
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"projectStatus"
md-selected-text=
"getProjectStatus()"
id=
"projectStatus"
>
<md-optgroup
label=
"projectStatus"
>
<md-option
ng-value=
"prjctSts"
ng-repeat=
"prjctSts in prjctStses"
>
{{prjctSts}}
</md-option>
</md-optgroup>
</md-select>
<b>
Project Status
</b>
</td>
<td
colspan=
"8"
>
<md-select
ng-model=
"projectStatus"
md-selected-text=
"getProjectStatus()"
id=
"projectStatus"
>
<md-optgroup
label=
"projectStatus"
>
<md-option
ng-value=
"prjctSts"
ng-repeat=
"prjctSts in prjctStses"
>
{{prjctSts}}
</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
</table>
<div
role=
"alert"
>
<span
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
</div>
</div>
...
...
@@ -71,9 +170,14 @@
</div>
</md-dialog-content>
<md-dialog-actions
layout=
"row"
>
<md-button
class=
"md-raised"
data-ng-click=
"validateFields()"
style=
"width:120px;background: cadetblue;color:white;"
>
{{templateTitle}}
</md-button>
<md-button
class=
"md-raised"
ng-click=
"cancel()"
style=
"width:120px;background: cadetblue;color:white;"
>
Cancel
</md-button>
</md-dialog-actions>
</form>
<md-dialog-actions
layout=
"row"
>
<md-button
class=
"md-raised"
data-ng-click=
"validateFields()"
style=
"width:120px;background: cadetblue;color:white;"
>
{{templateTitle}}
</md-button>
<md-button
class=
"md-raised"
ng-click=
"cancel()"
style=
"width:120px;background: cadetblue;color:white;"
>
Cancel
</md-button>
</md-dialog-actions>
</form>
</md-dialog>
\ No newline at end of file
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