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
0ef7ffad
Commit
0ef7ffad
authored
Jul 19, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added billability status in dashboard and added alias feature in project teammate
parent
fbbc47e2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
36 deletions
+63
-36
DashboardController.js
src/main/webapp/WEB-INF/controllers/DashboardController.js
+2
-1
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+34
-16
projectTeamDetails.html
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
+27
-19
No files found.
src/main/webapp/WEB-INF/controllers/DashboardController.js
View file @
0ef7ffad
...
...
@@ -34,9 +34,10 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
{
field
:
'accountName'
,
displayName
:
'Client'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
100
},
{
field
:
'domain'
,
displayName
:
'Domain'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
100
},
{
field
:
'projectName'
,
displayName
:
'Project'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
150
},
{
field
:
'onBehalfOf'
,
displayName
:
'Alias For'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
180
},
{
field
:
'billableStatus'
,
displayName
:
'Billable Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
},
{
field
:
'billingStartDate'
,
displayName
:
'Billing Start Date'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableFiltering
:
false
,
width
:
150
},
{
field
:
'billingEndDate'
,
displayName
:
'Billing End Date'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableFiltering
:
false
,
width
:
150
},
{
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
){
if
(
grid
.
getCellValue
(
row
,
col
)
===
'Maternity Leave'
)
{
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
0ef7ffad
myApp
.
controller
(
"projectController"
,
function
(
$scope
,
uiGridConstants
,
myFactory
,
exportUiGridService
,
$mdDialog
,
$http
,
appConfig
,
$timeout
,
$window
,
$mdSelect
,
$element
)
{
$scope
.
records
=
[];
$scope
.
isEditable
=
false
;
$scope
.
aliasModel
=
{};
$scope
.
empSearchId
=
""
;
$scope
.
parentData
=
{
"projectId"
:
""
,
...
...
@@ -90,9 +91,8 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
getProjects
();
$scope
.
getManagerDetails
();
}
getLeads
=
function
(){
}
$scope
.
getProjects
=
function
(
type
)
{
$scope
.
status
=
"Active"
;
...
...
@@ -470,6 +470,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
empAllocationStatus
=
undefined
;
$scope
.
employeeModel
=
{};
$scope
.
aliasModel
=
{};
$scope
.
toggleAlias
=
false
;
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
1
].
value
=
null
;
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
...
...
@@ -497,6 +498,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$
(
'.md-datepicker-input'
)[
2
].
value
=
null
;
$scope
.
employeeModel
=
{};
$scope
.
aliasModel
=
{};
$scope
.
toggleAlias
=
false
;
}
}
$scope
.
selectedTab
=
0
;
...
...
@@ -647,6 +649,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
direction
:
uiGridConstants
.
ASC
,
priority
:
0
,
}
},
{
name
:
'onBehalfOf'
,
displayName
:
'Alias For'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
'*'
},
// { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false },
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{
...
...
@@ -796,6 +799,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
'emailId'
:
row
.
emailId
,
'designation'
:
row
.
designation
};
$scope
.
parentData
.
onBehalfOf
=
row
.
onBehalfOf
;
$scope
.
parentData
.
newBillingStartDate
=
row
.
billingStartDate
;
$scope
.
parentData
.
endDate
=
row
.
billingEndDate
;
$scope
.
parentData
.
empAllocationStatus
=
row
.
status
;
...
...
@@ -961,6 +965,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$scope
.
employeeRole
=
row
.
resourceRole
;
$scope
.
empBillableStatus
=
row
.
billableStatus
;
$scope
.
empAllocationStatus
=
row
.
status
;
$scope
.
aliasResourceName
=
row
.
onBehalfOf
;
$scope
.
id
=
row
.
id
;
if
(
action
==
'Update'
){
$scope
.
validateFields
(
action
,
row
);
...
...
@@ -1222,6 +1227,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
};
$scope
.
changeEmpBillableStatus
=
function
(){
// $scope.newBillingStartDate = null;
console
.
log
(
"hi"
);
if
(
$scope
.
templateTitle
==
"Add"
){
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
...
...
@@ -1231,6 +1237,11 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
$
(
'.md-datepicker-input'
)[
3
].
value
=
new
Date
(
dataToPass
.
projectEndDate
);
}
}
$scope
.
changeCheckboxValue
=
function
(
checkboxValue
){
if
(
checkboxValue
==
false
){
$scope
.
aliasModel
=
{};
}
};
$scope
.
changeBillableStatusList
=
function
()
{
if
(
$scope
.
empAllocationStatus
==
'Proposed'
)
{
...
...
@@ -1507,6 +1518,8 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
var
managerName
=
$scope
.
managerName
;
var
employeeModel
=
$scope
.
employeeModel
;
var
aliasModel
=
$scope
.
aliasModel
;
var
aliasResourceName
=
$scope
.
aliasResourceName
;
var
alias
=
action
==
"Add"
?
alias
=
aliasModel
.
employeeId
:
alias
=
aliasResourceName
;
var
projectModel
=
$scope
.
projectModel
;
var
newBillingStartDate
=
$scope
.
newBillingStartDate
;
var
empAllocationStatus
=
$scope
.
empAllocationStatus
;
...
...
@@ -1521,8 +1534,12 @@ 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"
;
else
if
(
action
===
"Add"
&&
$scope
.
toggleAlias
==
true
&&
aliasModel
.
employeeName
==
undefined
||
aliasModel
==
{}){
$scope
.
alertMsg
=
"Please select a Alias Resource"
;
angular
.
element
(
document
.
getElementById
(
'selectAlias'
)).
focus
();
}
else
if
(
action
===
"Add"
&&
employeeModel
!=
undefined
&&
employeeModel
.
employeeName
!=
undefined
&&
employeeModel
.
employeeName
==
aliasModel
.
employeeName
){
$scope
.
alertMsg
=
"Selected Employee and Alias Resource could not be same"
;
angular
.
element
(
document
.
getElementById
(
'selectAlias'
)).
focus
();
}
else
if
(
action
===
"Add"
&&
$scope
.
empAllocationStatus
==
undefined
){
...
...
@@ -1564,7 +1581,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
,
"onBehalfOf"
:
alias
Model
.
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"
:
alias
,
"projectId"
:
project
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"billingEndDate"
:
$scope
.
endDate
,
"resourceRole"
:
$scope
.
employeeRole
,
"billingStartDate"
:
newBillingStartDate
,
"status"
:
empAllocationStatus
};
if
(
action
==
"Add"
){
addRecord
(
record
,
action
);
$scope
.
myForm
.
$setPristine
();
...
...
@@ -1790,7 +1807,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
};
$scope
.
getSelectedAlias
=
function
(){
if
(
$scope
.
aliasModel
!=
undefined
)
{
if
(
$scope
.
aliasModel
!=
undefined
)
{
if
(
Object
.
keys
(
$scope
.
aliasModel
).
length
>
1
){
$scope
.
alias
=
$scope
.
aliasModel
;
return
$scope
.
aliasModel
.
employeeName
;
...
...
@@ -1802,6 +1819,7 @@ myApp.controller("projectController", function ($scope,uiGridConstants, myFactor
}
else
{
return
"Please select a Alias Resource"
;
}
};
$scope
.
getSelectedEmpRole
=
function
(){
if
(
$scope
.
employeeRole
!=
undefined
)
{
...
...
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
View file @
0ef7ffad
...
...
@@ -88,7 +88,7 @@
</div> -->
<table>
<tr>
<td>
Select a Employee
</td>
<td>
Select a Employee
</td>
<td>
<md-select
ng-model=
"employeeModel"
data-md-container-class=
"selectHeader"
md-selected-text=
"getEmployeeSelected() "
id=
"selectEmp"
name=
"employeeModel"
>
...
...
@@ -150,24 +150,6 @@
</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>
...
...
@@ -200,6 +182,32 @@
onkeydown=
"return false "
name=
"endDate"
></md-datepicker>
</td>
</tr>
<tr>
<td></td>
<td
class=
"Employee"
><md-checkbox
ng-model=
"toggleAlias"
ng-change=
"changeCheckboxValue(toggleAlias)"
aria-label=
"aliasCheck"
class=
"md-primary"
style=
"margin: 10px 0px 10px -7.5pc;"
id=
"selectAlias"
>
Do You want to add alias resource for this Employee ?
</md-checkbox></td>
<!-- <td><input type="checkbox" ng-model="toggleAlias" ng-change="changeCheckboxValue(toggleAlias)" aria-label="aliasCheck" /></td>
<td>Do You want to add alias resource for this Employee ?</td> -->
</tr>
<tr
ng-show=
"toggleAlias"
>
<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>
</table>
<div
ng-if =
'templateTitle == "Add"'
role=
"alert"
>
...
...
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