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
1d6f10ce
Commit
1d6f10ce
authored
Jun 20, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated EmpSubStatus as per the changed status from backend
parent
85d15817
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
14 deletions
+26
-14
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+16
-12
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+9
-1
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+1
-1
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
1d6f10ce
...
@@ -25,7 +25,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -25,7 +25,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
,
width
:
180
},
{
field
:
'employeeName'
,
displayName
:
'Employee Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
cellClass
:
'grid-align'
,
width
:
180
},
{
field
:
'mobileNumber'
,
displayName
:
'Mobile'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellClass
:
'grid-align'
},
{
field
:
'mobileNumber'
,
displayName
:
'Mobile'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
cellClass
:
'grid-align'
},
{
field
:
'empStatus'
,
displayName
:
'Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
80
},
{
field
:
'empStatus'
,
displayName
:
'Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
80
},
{
field
:
'empSubStatus'
,
displayName
:
'Sub Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
140
,
cellClass
:
function
(
grid
,
row
,
col
){
{
field
:
'empSubStatus
.subStatus
'
,
displayName
:
'Sub Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
140
,
cellClass
:
function
(
grid
,
row
,
col
){
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Maternity Leave'
)
{
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Maternity Leave'
)
{
return
'blue'
;
return
'blue'
;
...
@@ -78,7 +78,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -78,7 +78,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
parentData
.
designation
=
row
.
entity
.
designation
;
$scope
.
parentData
.
designation
=
row
.
entity
.
designation
;
$scope
.
parentData
.
functionalGroup
=
row
.
entity
.
functionalGroup
;
$scope
.
parentData
.
functionalGroup
=
row
.
entity
.
functionalGroup
;
$scope
.
parentData
.
empStatus
=
row
.
entity
.
empStatus
;
$scope
.
parentData
.
empStatus
=
row
.
entity
.
empStatus
;
$scope
.
parentData
.
empSubStatus
=
row
.
entity
.
empS
ubStatus
;
$scope
.
parentData
.
empSubStatus
=
(
row
.
entity
.
empSubStatus
==
null
)
?
null
:
row
.
entity
.
empSubStatus
.
s
ubStatus
;
$scope
.
parentData
.
employmentType
=
row
.
entity
.
employmentType
;
$scope
.
parentData
.
employmentType
=
row
.
entity
.
employmentType
;
$scope
.
parentData
.
domain
=
row
.
entity
.
domain
;
$scope
.
parentData
.
domain
=
row
.
entity
.
domain
;
$scope
.
parentData
.
dateOfJoining
=
row
.
entity
.
dateOfJoining
;
$scope
.
parentData
.
dateOfJoining
=
row
.
entity
.
dateOfJoining
;
...
@@ -88,8 +88,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -88,8 +88,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
parentData
.
passportExpiryDate
=
row
.
entity
.
passportExpiryDate
;
$scope
.
parentData
.
passportExpiryDate
=
row
.
entity
.
passportExpiryDate
;
$scope
.
parentData
.
b1ExpiryDate
=
row
.
entity
.
b1ExpiryDate
;
$scope
.
parentData
.
b1ExpiryDate
=
row
.
entity
.
b1ExpiryDate
;
$scope
.
parentData
.
endDate
=
row
.
entity
.
endDate
;
$scope
.
parentData
.
endDate
=
row
.
entity
.
endDate
;
$scope
.
parentData
.
subStatusStartDate
=
row
.
entity
.
subStatusStart
Date
;
$scope
.
parentData
.
subStatusStartDate
=
(
row
.
entity
.
empSubStatus
==
null
)
?
null
:
row
.
entity
.
empSubStatus
.
from
Date
;
$scope
.
parentData
.
subStatusEndDate
=
row
.
entity
.
subStatusEnd
Date
;
$scope
.
parentData
.
subStatusEndDate
=
(
row
.
entity
.
empSubStatus
==
null
)
?
null
:
row
.
entity
.
empSubStatus
.
to
Date
;
if
(
action
==
"Update"
)
if
(
action
==
"Update"
)
$scope
.
assignRole
(
action
,
$scope
.
parentData
);
$scope
.
assignRole
(
action
,
$scope
.
parentData
);
else
if
(
action
==
"Delete"
)
else
if
(
action
==
"Delete"
)
...
@@ -439,10 +439,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -439,10 +439,14 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
}
return
false
;
return
false
;
}
}
$scope
.
changeEmpSubStatus
=
function
(){
$scope
.
subStatusStartDate
=
null
;
$scope
.
subStatusEndDate
=
null
;
$
(
'.md-datepicker-input'
)[
3
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
4
].
value
=
null
;
}
$scope
.
validateFields
=
function
(){
$scope
.
validateFields
=
function
(){
var
today
=
new
Date
();
var
today
=
new
Date
();
if
(
$scope
.
templateTitle
==
"Add"
){
if
(
$scope
.
templateTitle
==
"Add"
){
$scope
.
empStatus
=
"Active"
;
$scope
.
empStatus
=
"Active"
;
}
}
...
@@ -474,8 +478,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -474,8 +478,8 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var
prevEmpSubStatusObj
=
{
var
prevEmpSubStatusObj
=
{
employeeID
:
dataToPass
.
employeeId
,
employeeID
:
dataToPass
.
employeeId
,
subStatus
:
dataToPass
.
empSubStatus
,
subStatus
:
dataToPass
.
empSubStatus
,
fromDate
:
dataToPass
.
subStatusStartDate
,
fromDate
:
(
dataToPass
.
subStatusStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
subStatusStartDate
)
,
toDate
:
dataToPass
.
subStatusEndDate
toDate
:
(
dataToPass
.
subStatusEndDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
subStatusEndDate
)
};
};
if
(
searchId
==
""
){
if
(
searchId
==
""
){
$scope
.
alertMsg
=
"Employee Id is mandatory"
;
$scope
.
alertMsg
=
"Employee Id is mandatory"
;
...
@@ -510,7 +514,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -510,7 +514,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
$scope
.
alertMsg
=
"Please select a SubStatus start Date"
;
$scope
.
alertMsg
=
"Please select a SubStatus start Date"
;
document
.
getElementById
(
'subStatusStartDate'
).
focus
();
document
.
getElementById
(
'subStatusStartDate'
).
focus
();
}
}
else
if
(
$scope
.
templateTitle
!=
"Add"
&&
subStatus
Start
Date
==
undefined
&&
empSubStatus
!=
null
&&
empSubStatus
!=
''
){
else
if
(
$scope
.
templateTitle
!=
"Add"
&&
subStatus
End
Date
==
undefined
&&
empSubStatus
!=
null
&&
empSubStatus
!=
''
){
$scope
.
alertMsg
=
"Please select a SubStatus end Date"
;
$scope
.
alertMsg
=
"Please select a SubStatus end Date"
;
document
.
getElementById
(
'subStatusEndDate'
).
focus
();
document
.
getElementById
(
'subStatusEndDate'
).
focus
();
}
}
...
@@ -644,11 +648,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -644,11 +648,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
fromDate
:
$scope
.
subStatusStartDate
,
fromDate
:
$scope
.
subStatusStartDate
,
toDate
:
$scope
.
subStatusEndDate
toDate
:
$scope
.
subStatusEndDate
};
};
var
prevEmpSubStatusObj
=
{
var
prevEmpSubStatusObj
=
{
employeeID
:
dataToPass
.
employeeId
,
employeeID
:
dataToPass
.
employeeId
,
subStatus
:
dataToPass
.
empSubStatus
,
subStatus
:
dataToPass
.
empSubStatus
,
fromDate
:
dataToPass
.
subStatusStartDate
,
fromDate
:
(
dataToPass
.
subStatusStartDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
subStatusStartDate
)
,
toDate
:
dataToPass
.
subStatusEndDate
toDate
:
(
dataToPass
.
subStatusEndDate
==
null
)
?
null
:
new
Date
(
dataToPass
.
subStatusEndDate
)
};
};
var
record
=
{
var
record
=
{
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
"employeeId"
:
$scope
.
empId
,
"employeeName"
:
$scope
.
empName
,
"gender"
:
$scope
.
gender
,
"emailId"
:
$scope
.
empEmail
,
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
1d6f10ce
...
@@ -609,7 +609,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -609,7 +609,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
'<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Save" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.saveRow(row.entity,
\'
Update
\'
)"></i>'
'<i ng-show="row.entity.editrow" class="fa fa-save fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Save" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.saveRow(row.entity,
\'
Update
\'
)"></i>'
+
' <i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Cancel" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+
' <i ng-show="row.entity.editrow" id="cancelEdit" class="fa fa-times fa-2x" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" data-placement="center" title="Cancel" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.cancelEdit(row.entity)"></i>'
+
'<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" id="moveResource" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Release" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.moveToBench(row.entity)"></i>'
+
+
'<i ng-show="grid.appScope.showMoveToBenchIcon(row.entity) && !row.entity.editrow" id="moveResource" class="fa fa-arrow-circle-right fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Release" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.moveToBench(row.entity)"></i>'
+
'<i ng-show="
row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow
" id="moveToProject" class="fa fa-arrow-circle-left fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Engage" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.changeAllocationStatusToEngaged(row.entity)"></i>'
+
'<i ng-show="
grid.appScope.showMoveToEngageIcon(row.entity)
" id="moveToProject" class="fa fa-arrow-circle-left fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Engage" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.changeAllocationStatusToEngaged(row.entity)"></i>'
+
' <i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="deleteResource" class="fa fa-trash fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Delete" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.deleteProposedResource(row.entity)"></i></p>'
;
' <i ng-show="row.entity.status ==
\'
Proposed
\'
&& !row.entity.editrow" id="deleteResource" class="fa fa-trash fa-2x" aria-hidden="true" style="font-size:1.8em;margin-top:3px;cursor:pointer;" data-placement="center" title="Delete" onmouseenter="$(this).tooltip(
\'
show
\'
)" ng-click="grid.appScope.deleteProposedResource(row.entity)"></i></p>'
;
//' <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>';
//' <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>';
...
@@ -700,6 +700,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
...
@@ -700,6 +700,14 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
return
true
;
return
true
;
}
}
}
}
$scope
.
showMoveToEngageIcon
=
function
(
row
){
var
today
=
new
Date
();
today
.
setHours
(
0
,
0
,
0
,
0
);
if
(
row
.
status
==
"Proposed"
&&
!
row
.
editrow
&&
today
>=
new
Date
(
row
.
billingStartDate
))
{
return
true
;
}
}
$scope
.
parentData
=
{
$scope
.
parentData
=
{
"employeeId"
:
""
,
"employeeId"
:
""
,
...
...
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
1d6f10ce
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<tr
ng-show=
"empStatus == 'Active' && templateTitle != 'Add' "
>
<tr
ng-show=
"empStatus == 'Active' && templateTitle != 'Add' "
>
<td
colspan=
"4"
><b>
Select Sub Status :
</b></td>
<td
colspan=
"4"
><b>
Select Sub Status :
</b></td>
<td
colspan=
"8"
><md-select
ng-model=
"empSubStatus"
name =
"empSubStatus"
<td
colspan=
"8"
><md-select
ng-model=
"empSubStatus"
name =
"empSubStatus"
ng-model =
"empSubStatus"
placeholder =
"Select a Sub Status Type"
id=
"empSubStatus"
>
ng-model =
"empSubStatus"
placeholder =
"Select a Sub Status Type"
id=
"empSubStatus"
ng-change=
"changeEmpSubStatus()"
>
<md-optgroup
label=
"Sub Status Type"
>
<md-optgroup
label=
"Sub Status Type"
>
<md-option
ng-value =
"None"
>
None
</md-option>
<md-option
ng-value =
"None"
>
None
</md-option>
<md-option
ng-value=
"status"
ng-repeat=
"status in empSubStatuses"
>
{{status}}
</md-option>
<md-option
ng-value=
"status"
ng-repeat=
"status in empSubStatuses"
>
{{status}}
</md-option>
...
...
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