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
48a6da9f
Unverified
Commit
48a6da9f
authored
May 09, 2018
by
rsayannagari-nisum-com
Committed by
GitHub
May 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from nisum-inc/MT-43
MT-43[Rajeshekar]:Updated Manage Employee to update location
parents
3a919a10
6a08ed6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+12
-2
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+4
-0
roles.html
src/main/webapp/WEB-INF/templates/roles.html
+1
-9
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
48a6da9f
...
...
@@ -55,6 +55,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
$scope
.
parentData
.
role
=
row
.
entity
.
role
;
$scope
.
parentData
.
empLocation
=
row
.
entity
.
empLocation
;
if
(
action
==
"Update"
)
$scope
.
assignRole
(
action
,
$scope
.
parentData
);
else
if
(
action
==
"Delete"
)
...
...
@@ -220,15 +221,18 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
empName
=
""
;
$scope
.
empRole
;
$scope
.
empEmail
=
""
;
$scope
.
empLocation
=
""
;
$scope
.
isDisabled
=
false
;
}
else
if
(
dataToPass
.
action
==
"Update"
){
$scope
.
empId
=
dataToPass
.
employeeId
;
$scope
.
empName
=
dataToPass
.
employeeName
;
$scope
.
empRole
=
dataToPass
.
role
;
$scope
.
empEmail
=
dataToPass
.
emailId
;
$scope
.
empLocation
=
dataToPass
.
empLocation
;
$scope
.
isDisabled
=
true
;
}
$scope
.
roles
=
[
"Delivery Manager"
,
"Director"
,
"Employee"
,
"HR"
,
"HR Manager"
,
"Lead"
,
"Manager"
];
$scope
.
locations
=
myFactory
.
getLocations
();
$scope
.
getSelectedRole
=
function
(){
if
(
$scope
.
empRole
!==
undefined
)
{
return
$scope
.
empRole
;
...
...
@@ -236,7 +240,13 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
return
"Please select a role"
;
}
};
$scope
.
getSelectedLocation
=
function
(){
if
(
$scope
.
empLocation
!==
undefined
)
{
return
$scope
.
empLocation
;
}
else
{
return
"Please select a location"
;
}
};
$scope
.
validateEmpId
=
function
(){
var
searchId
=
$scope
.
empId
;
if
(
searchId
!=
""
&&
isNaN
(
searchId
)){
...
...
@@ -314,7 +324,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
document
.
getElementById
(
'empRole'
).
focus
();
}
else
{
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
};
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"emailId"
:
$scope
.
empEmail
,
"role"
:
$scope
.
empRole
,
"empLocation"
:
$scope
.
empLocation
};
addOrUpdateRole
(
record
,
$scope
.
templateTitle
);
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
500
);
}
...
...
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
48a6da9f
...
...
@@ -26,6 +26,10 @@
<md-select
ng-model=
"empShift"
md-selected-text=
"getSelectedShift()"
id=
"empShift"
ng-disabled=
"isDisabled"
style=
"display:none"
>
<md-optgroup
label=
"shifts"
>
<md-option
ng-value=
"shift"
ng-repeat=
"shift in shifts"
>
{{shift}}
</md-option>
</md-optgroup>
</md-select>
<md-select
ng-model=
"empLocation"
md-selected-text=
"getSelectedLocation()"
id=
"empLocation"
>
<md-optgroup
label=
"locations"
>
<md-option
ng-value=
"location"
ng-repeat=
"location in locations"
>
{{location}}
</md-option>
</md-optgroup>
</md-select>
<div
role=
"alert"
>
<span
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
</div>
...
...
src/main/webapp/WEB-INF/templates/roles.html
View file @
48a6da9f
...
...
@@ -50,15 +50,7 @@
</div>
</div>
<div
class=
"col-lg-1"
style=
"cursor: pointer; float: right; right: 75px;"
>
<md-button
class=
"md-raised md-primary"
style=
"width:142px;background: cadetblue;"
ng-click=
"assignRole('Add', parentData)"
>
<i
class=
"fa fa-plus-circle fa-2x"
style=
"margin-top: 5px; font-size: 1.5em; float: left"
></i>
Add
Employee
</md-button>
</div>
</div>
<div
class=
"row col-lg-12"
style=
"height: 15px;"
></div>
<div
class=
"row col-lg-12"
style=
"margin-left: 0px;"
>
...
...
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