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
00214a68
Commit
00214a68
authored
May 13, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update_Team_Details
parent
fe57dccc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
29 deletions
+27
-29
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+19
-21
projectTeamDetails.html
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
+8
-8
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
00214a68
...
...
@@ -619,7 +619,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
{
field
:
'employeeName'
,
displayName
:
'Emp Name '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
// { field: 'emailId', displayName: 'Email Id ', enableColumnMenu: false, enableSorting: false },
// { field: 'experience', displayName: 'Exp', enableColumnMenu: true, enableSorting: true, width: 80 },
{
field
:
'role'
,
displayName
:
'Role'
,
enableColumnMenu
:
true
,
enableSorting
:
false
,
enableFiltering
:
false
},
{
field
:
'r
esourceR
ole'
,
displayName
:
'Role'
,
enableColumnMenu
:
true
,
enableSorting
:
false
,
enableFiltering
:
false
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
},
// { field: 'active', displayName: 'Status ', enableColumnMenu: false, enableSorting: false, cellTemplate: getCellActiveTemplate },
{
field
:
'billableStatus'
,
displayName
:
'Billability '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
},
...
...
@@ -644,10 +644,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
$scope
.
gridOptions
.
data
=
response
.
data
.
records
;
for
(
i
=
0
;
i
<
response
.
data
.
records
.
length
;
i
++
){
if
(
response
.
data
.
records
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
if
(
response
.
data
.
records
[
i
].
r
esourceR
ole
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Lead"
;
}
else
{
$scope
.
gridOptions
.
data
[
i
].
role
=
"Individual Contributor"
;
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Individual Contributor"
;
}
}
},
function
myError
(
response
)
{
...
...
@@ -683,6 +683,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope
.
getRowData
=
function
(
row
,
action
){
console
.
log
(
row
.
entity
)
$scope
.
parentData
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
...
...
@@ -697,9 +698,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
parentData
.
shift
=
row
.
entity
.
shift
;
$scope
.
parentData
.
mobileNumber
=
row
.
entity
.
mobileNumber
;
$scope
.
parentData
.
employeeModel
=
{}
$scope
.
parentData
.
newBillingStartDate
=
row
.
entity
.
newB
illingStartDate
;
$scope
.
parentData
.
newBillingStartDate
=
row
.
entity
.
b
illingStartDate
;
$scope
.
parentData
.
startDate
=
new
Date
(
row
.
entity
.
startDate
);
$scope
.
parentData
.
endDate
=
new
Date
(
row
.
entity
.
endDate
);
$scope
.
parentData
.
endDate
=
new
Date
(
row
.
entity
.
billingEndDate
);
console
.
log
(
$scope
.
parentData
)
if
(
action
==
"UpdateTeam"
){
$scope
.
updateTeamMate
(
action
,
$scope
.
parentData
);
}
...
...
@@ -757,7 +759,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
// $scope.employeeModel.employeeName = userData.employeeName;
// $scope.employeeModel.emailId = userData.emailId;
$scope
.
empBillableStatus
=
userData
.
billableStatus
;
if
(
userData
.
role
==
"Individual Contributor"
){
if
(
userData
.
r
esourceR
ole
==
"Individual Contributor"
){
$scope
.
employeeRole
=
"Employee"
;
}
else
{
$scope
.
employeeRole
=
"Lead"
;
...
...
@@ -923,8 +925,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
if
(
$scope
.
templateTitle
==
"Add"
){
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
}
else
{
$
(
'.md-datepicker-input'
)[
3
].
value
=
n
ull
;
else
{
$
(
'.md-datepicker-input'
)[
3
].
value
=
n
ew
Date
(
$scope
.
projectEndDate
).
toISOString
().
slice
(
0
,
10
)
;
}
}
...
...
@@ -1188,9 +1190,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
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"
;
...
...
@@ -1207,7 +1206,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else
if
(
!
((
$scope
.
newBillingStartDate
>=
new
Date
(
dataToPass
.
projectStartDate
))
&&
(
$scope
.
newBillingStartDate
<=
$scope
.
endDate
))){
$scope
.
alertMsg
=
$scope
.
empBillableStatus
+
" start date should be in between start date and end date"
;
}
else
if
(
!
((
$scope
.
newBillingStartDate
>=
$scope
.
startDate
)
&&
(
$scope
.
newBillingStartDate
<=
$scope
.
endDate
))
&&
action
==
"Update"
){
else
if
(
!
((
$scope
.
newBillingStartDate
>=
new
Date
(
dataToPass
.
projectStartDate
)
)
&&
(
$scope
.
newBillingStartDate
<=
$scope
.
endDate
))
&&
action
==
"Update"
){
$scope
.
alertMsg
=
$scope
.
empBillableStatus
+
" start date should be in between start date and end date"
;
}
else
if
(
$scope
.
endDate
>
new
Date
(
dataToPass
.
projectEndDate
)){
$scope
.
alertMsg
=
"End date should not exceed project end date"
;
...
...
@@ -1357,7 +1356,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
};
$scope
.
DataUpdate
=
function
()
{
var
data
=
$scope
.
parentData
;
if
(
data
.
role
==
"Individual Contributor"
)
{
if
(
data
.
r
esourceR
ole
==
"Individual Contributor"
)
{
var
roleselected
=
"Employee"
;
}
else
{
roleselected
=
data
.
role
;
...
...
@@ -1485,10 +1484,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else
if
(
action
==
"Add"
){
$scope
.
gridOptions
.
data
.
push
(
record
);
for
(
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
if
(
$scope
.
gridOptions
.
data
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
if
(
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Lead"
;
}
else
{
$scope
.
gridOptions
.
data
[
i
].
role
=
"Individual Contributor"
;
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Individual Contributor"
;
}
}
}
...
...
@@ -1532,7 +1531,6 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
else
{
$scope
.
alertMsg
=
response
.
data
.
message
;
}
},
function
myError
(
response
){
$scope
.
result
=
"Error"
;
});
...
...
@@ -1550,10 +1548,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
gridOptions
.
columnDefs
[
5
].
visible
=
true
;
}
for
(
i
=
0
;
i
<
$scope
.
gridOptions
.
data
.
length
;
i
++
){
if
(
$scope
.
gridOptions
.
data
[
i
].
role
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
role
=
"Lead"
;
if
(
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
==
'Lead'
){
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Lead"
;
}
else
{
$scope
.
gridOptions
.
data
[
i
].
role
=
"Individual Contributor"
;
$scope
.
gridOptions
.
data
[
i
].
r
esourceR
ole
=
"Individual Contributor"
;
}
}
},
function
myError
(
response
)
{
...
...
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
View file @
00214a68
...
...
@@ -100,10 +100,10 @@
</md-select>
</td>
</tr>
<!--
<tr>
<!--
<tr>
<td class="Employee">Employee Name : </td>
<td>{{employeeModel.employeeName}}</td>
</tr>
-->
</tr> -->
<tr>
<td
class=
"Employee"
>
Employee Id :
</td>
<td>
{{employeeModel.employeeId}}
</td>
...
...
@@ -251,7 +251,7 @@
</md-select>
</td>
</tr>
<tr>
<!--
<tr>
<td class="Employee">Shift</td>
<td>
<md-select ng-model="employeeShift" md-selected-text="getSelectedEmpShift()" id="empShift">
...
...
@@ -260,7 +260,7 @@
</md-optgroup>
</md-select>
</td>
</tr>
</tr>
-->
<tr>
<td
class=
"Employee"
>
Billability Status
</td>
<td>
...
...
@@ -281,16 +281,16 @@
</td>
</tr>
<tr>
<!--
<tr>
<td class="Employee">Start Date</td>
<td>
<md-datepicker ng-model="startDate" ng-disabled = "true" md-placeholder="Please select Date" id="startDate " md-min-date="minDate " md-max-date="maxDate "
onkeydown="return false " name="startDate"></md-datepicker>
</td>
</tr>
</tr>
-->
<tr>
<td
class=
"Employee"
>
End Date
</td>
<tr
ng-show=
"empBillableStatus"
>
<td
class=
"Employee"
>
{{empBillableStatus}}
End Date
</td>
<td>
<md-datepicker
ng-model=
"endDate "
md-placeholder=
"Please select Date"
id=
"endDate "
md-min-date=
"minDate "
md-max-date=
"maxDate "
onkeydown=
"return false "
name=
"endDate"
></md-datepicker>
...
...
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