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
fbbc47e2
Commit
fbbc47e2
authored
Jul 19, 2019
by
Soumya Gouri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dropdown for alias resource
parent
1439d978
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
1 deletion
+49
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+31
-1
projectTeamDetails.html
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
+18
-0
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
fbbc47e2
...
...
@@ -430,6 +430,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
// code added
$scope
.
searchTerm
=
""
;
$scope
.
searchAliasTerm
=
""
;
$scope
.
updateSearch
=
function
(
e
)
{
e
.
stopPropagation
();
}
...
...
@@ -440,6 +441,13 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
return
obj
;
};
$scope
.
aliasFilter
=
function
(
obj
)
{
if
(
$scope
.
searchAliasTerm
.
length
>
3
){
var
re
=
new
RegExp
(
$scope
.
searchAliasTerm
,
'i'
);
return
!
$scope
.
searchAliasTerm
||
re
.
test
(
obj
.
employeeName
);
}
return
obj
;
};
var
today
=
new
Date
();
$scope
.
addTab
=
function
()
{
...
...
@@ -461,6 +469,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
employeeShift
=
undefined
;
$scope
.
empAllocationStatus
=
undefined
;
$scope
.
employeeModel
=
{};
$scope
.
aliasModel
=
{};
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
...
...
@@ -487,6 +496,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
$scope
.
employeeModel
=
{};
$scope
.
aliasModel
=
{};
}
}
$scope
.
selectedTab
=
0
;
...
...
@@ -610,6 +620,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
};
$scope
.
status
=
"Active"
;
var
employeeModel
=
$scope
.
employeeModel
;
var
aliasModel
=
$scope
.
aliasModel
;
var
getCellTemplate1
=
'<p class="col-lg-12"><i ng-show="grid.appScope.showEditIcon(row.entity)" class="fa fa-pencil-square-o fa-2x" data-placement="center" title="Edit" onmouseenter="$(this).tooltip(
\'
show
\'
)" aria-hidden="true" style="font-size:1.5em;margin-top:3px;cursor:pointer;" ng-click="grid.appScope.edit(row)"></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>'
...
...
@@ -1495,6 +1506,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var
managerId
=
$scope
.
managerId
;
var
managerName
=
$scope
.
managerName
;
var
employeeModel
=
$scope
.
employeeModel
;
var
aliasModel
=
$scope
.
aliasModel
;
var
projectModel
=
$scope
.
projectModel
;
var
newBillingStartDate
=
$scope
.
newBillingStartDate
;
var
empAllocationStatus
=
$scope
.
empAllocationStatus
;
...
...
@@ -1509,6 +1521,10 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
alertMsg
=
"Please select a employee role"
;
angular
.
element
(
document
.
getElementById
(
'empRole'
)).
focus
();
}
else
if
(
employeeModel
!=
undefined
&&
employeeModel
.
employeeName
!=
undefined
&&
employeeModel
.
employeeName
==
aliasModel
.
employeeName
){
$scope
.
alertMsg
=
"Both Resource could not be same"
;
angular
.
element
(
document
.
getElementById
(
'selectAlias'
)).
focus
();
}
else
if
(
action
===
"Add"
&&
$scope
.
empAllocationStatus
==
undefined
){
$scope
.
alertMsg
=
"Please select a employee Allocation Status"
;
angular
.
element
(
document
.
getElementById
(
'empAllocationStatus'
)).
focus
();
...
...
@@ -1548,7 +1564,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
else
{
$scope
.
id
=
$scope
.
id
?
$scope
.
id
:
$scope
.
objectId
;
$scope
.
alertMsg
=
""
;
var
record
=
{
"id"
:
$scope
.
id
,
"employeeId"
:
employeeModel
.
employeeId
,
"projectId"
:
project
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"billingEndDate"
:
$scope
.
endDate
,
"resourceRole"
:
$scope
.
employeeRole
,
"billingStartDate"
:
newBillingStartDate
,
"status"
:
empAllocationStatus
};
var
record
=
{
"id"
:
$scope
.
id
,
"employeeId"
:
employeeModel
.
employeeId
,
"
onBehalfOf"
:
aliasModel
.
employeeId
,
"
projectId"
:
project
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"billingEndDate"
:
$scope
.
endDate
,
"resourceRole"
:
$scope
.
employeeRole
,
"billingStartDate"
:
newBillingStartDate
,
"status"
:
empAllocationStatus
};
if
(
action
==
"Add"
){
addRecord
(
record
,
action
);
$scope
.
myForm
.
$setPristine
();
...
...
@@ -1773,6 +1789,20 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
return
"Please select a employee"
;
}
};
$scope
.
getSelectedAlias
=
function
(){
if
(
$scope
.
aliasModel
!=
undefined
)
{
if
(
Object
.
keys
(
$scope
.
aliasModel
).
length
>
1
){
$scope
.
alias
=
$scope
.
aliasModel
;
return
$scope
.
aliasModel
.
employeeName
;
}
else
{
return
"Please select a Alias Resource"
;
}
}
else
{
return
"Please select a Alias Resource"
;
}
};
$scope
.
getSelectedEmpRole
=
function
(){
if
(
$scope
.
employeeRole
!=
undefined
)
{
return
$scope
.
employeeRole
;
...
...
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
View file @
fbbc47e2
...
...
@@ -150,6 +150,24 @@
</md-select>
</td>
</tr>
<tr>
<tr>
<td>
Alias For
</td>
<td>
<md-select
ng-model=
"aliasModel"
data-md-container-class=
"selectHeader"
md-selected-text=
"getSelectedAlias() "
id=
"selectAlias"
name=
"aliasModel"
>
<md-select-header
class=
"selectHeaderChild header-spacing"
layout=
"column"
>
<input
ng-model=
"searchAliasTerm"
type=
"search"
id=
"search"
ng-keydown=
"updateSearch($event)"
ng-model-options=
"{debounce: {'default': 500, 'blur': 0}}"
placeholder=
"Please search for an alias resource"
class=
"searchBoxHeader demo-header-searchbox md-text search-spacingleft"
/>
<span
class=
"glyphicon glyphicon-remove close-mdselect"
ng-click=
"closeSelectBox()"
></span>
</md-select-header>
<md-optgroup
label=
"Alias "
class=
"optionScroll"
>
<md-option
ng-value=
"alias "
ng-repeat=
"alias in employeeList | filter:aliasFilter"
>
{{alias.employeeName}}
</md-option>
</md-optgroup>
</md-select>
</td>
</tr>
<tr
ng-show=
"empAllocationStatus"
>
<td
class=
"Employee"
>
Billability Status
</td>
<td>
...
...
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