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
d7214f87
Commit
d7214f87
authored
Aug 06, 2018
by
rammula-nisum-com
Committed by
rbonthala-nisum-com
Aug 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issues in project team module (#115)
parent
a75a4d1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
18 deletions
+40
-18
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+37
-15
projectTeamDetails.html
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
+3
-3
No files found.
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
d7214f87
...
...
@@ -358,8 +358,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
employeeRole
=
undefined
;
$scope
.
empBillableStatus
=
undefined
;
$scope
.
newBillingStartDate
=
undefined
;
$scope
.
startDate
=
undefined
;
$scope
.
endDate
=
undefined
;
$scope
.
startDate
=
new
Date
(
dataToPass
.
projectStartDate
)
;
$scope
.
endDate
=
new
Date
(
dataToPass
.
projectEndDate
)
;
$scope
.
employeeShift
=
undefined
;
$scope
.
employeeModel
=
{};
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
...
...
@@ -581,6 +581,7 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
parentData
.
employeeId
=
row
.
entity
.
employeeId
;
$scope
.
parentData
.
employeeName
=
row
.
entity
.
employeeName
;
$scope
.
parentData
.
emailId
=
row
.
entity
.
emailId
;
$scope
.
parentData
.
id
=
row
.
entity
.
id
;
$scope
.
parentData
.
role
=
row
.
entity
.
role
;
$scope
.
parentData
.
shift
=
row
.
entity
.
shift
;
$scope
.
parentData
.
projectId
=
row
.
entity
.
projectId
;
...
...
@@ -816,6 +817,15 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
return
"Please select project status"
;
}
};
$scope
.
changeEmpBillableStatus
=
function
(){
$scope
.
newBillingStartDate
=
null
;
if
(
$scope
.
templateTitle
==
"Add"
){
$
(
'.md-datepicker-input'
)[
0
].
value
=
null
;
}
else
{
$
(
'.md-datepicker-input'
)[
3
].
value
=
null
;
}
}
var
noDomainError
=
function
(){
$mdDialog
.
show
(
$mdDialog
.
alert
({
...
...
@@ -1011,8 +1021,9 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
var
projectStartDate
=
$scope
.
projectStartDate
;
var
projectEndDate
=
$scope
.
projectEndDate
;
var
projectStatus
=
$scope
.
projectStatus
;
// var projectStartedDate = $scope.startDate;
if
(
action
===
"Add"
||
action
==
"Update"
){
if
(
employeeModel
==
undefined
){
if
(
employeeModel
==
undefined
||
employeeModel
.
employeeName
==
undefined
){
$scope
.
alertMsg
=
"Please select a employee"
;
angular
.
element
(
document
.
getElementById
(
'selectEmp'
)).
focus
();
}
else
if
(
$scope
.
employeeRole
==
undefined
){
...
...
@@ -1022,35 +1033,46 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
$scope
.
alertMsg
=
"Please select a employee shift"
;
angular
.
element
(
document
.
getElementById
(
'empShift'
)).
focus
();
}
else
if
(
$scope
.
empBillableStatus
==
undefined
){
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";
//
angular.element(document.getElementById('endDate')).focus();
//
}
else
if
(
$scope
.
endDate
==
undefined
)
{
$scope
.
alertMsg
=
"Please select End Date"
;
angular
.
element
(
document
.
getElementById
(
'endDate'
)).
focus
();
}
else
if
(
$scope
.
newBillingStartDate
==
undefined
){
$scope
.
alertMsg
=
"Please select new Billing StartDate"
;
angular
.
element
(
document
.
getElementById
(
'newBillingStartDate'
)).
focus
();
}
else
if
(
action
==
"Add"
&&
(
$scope
.
newBillingStartDate
>
$scope
.
endDate
)){
$scope
.
alertMsg
=
"Assignment End Date should be less than New Billability Start Date "
;
}
else
if
(
action
==
"Update"
&&
((
$scope
.
endDate
<
$scope
.
startDate
)
&&
(
$scope
.
startDate
<=
$scope
.
newBillingStartDate
)
&&
(
$scope
.
endDate
<
$scope
.
newBillingStartDate
)))
{
$scope
.
alertMsg
=
"EndDate should be greater than StartDate and new BillingStartDate "
;
}
// else if(action =="Add" && ($scope.newBillingStartDate > $scope.endDate)){
// $scope.alertMsg = "Assignment End Date should be less than New Billability Start Date ";
// }
// else if (action == "Update" && (($scope.endDate < $scope.startDate) && ($scope.startDate <= $scope.newBillingStartDate) && ($scope.endDate < $scope.newBillingStartDate))) {
// $scope.alertMsg = "EndDate should be greater than StartDate and new BillingStartDate ";
// }
// else if (action == "Add"){
// 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
(
employeeModel
!=
undefined
&&
projectModel
!=
undefined
&&
action
==
"Add"
&&
getExistingRecordProjectStatus
(
employeeModel
.
employeeId
,
projectModel
.
projectName
)){
$scope
.
alertMsg
=
"Employee is already assigned to the selected project"
;
return
false
;
}
// else if (action == "Update"){
// if (!(($scope.newBillingStartDate >= $scope.startDate) && ($scope.newBillingStartDate <= $scope.endDate))){
// $scope.alertMsg = $scope.empBillableStatus + "start date should be in between start date and end date";
// }
// }
else
{
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"designation"
:
employeeModel
.
designation
,
"projectId"
:
project
,
"projectName"
:
projectName
,
"managerId"
:
managerId
,
"managerName"
:
managerName
,
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"account"
:
account
,
"role"
:
$scope
.
employeeRole
,
"newBillingStartDate"
:
newBillingStartDate
,
"accountId"
:
$scope
.
accountId
,
"domainId"
:
$scope
.
domainId
,
"shift"
:
$scope
.
employeeShift
,
"projectStartDate"
:
$scope
.
startDate
,
"projectEndDate"
:
$scope
.
endDate
};
var
record
=
{
"
id"
:
$scope
.
id
,
"
employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"designation"
:
employeeModel
.
designation
,
"projectId"
:
project
,
"projectName"
:
projectName
,
"managerId"
:
managerId
,
"managerName"
:
managerName
,
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"account"
:
account
,
"role"
:
$scope
.
employeeRole
,
"newBillingStartDate"
:
newBillingStartDate
,
"accountId"
:
$scope
.
accountId
,
"domainId"
:
$scope
.
domainId
,
"shift"
:
$scope
.
employeeShift
,
"projectStartDate"
:
$scope
.
startDate
,
"projectEndDate"
:
$scope
.
endDate
};
if
(
action
==
"Add"
){
addRecord
(
record
,
action
);
}
else
if
(
action
==
"Update"
){
...
...
src/main/webapp/WEB-INF/templates/projectTeamDetails.html
View file @
d7214f87
...
...
@@ -133,7 +133,7 @@
<tr>
<td
class=
"Employee"
>
Billability Status
</td>
<td>
<md-select
ng-model=
"empBillableStatus "
md-selected-text=
"getSelectedBillableStatus() "
id=
"empBillableStatus"
name=
"empBillableStatus"
>
<md-select
ng-model=
"empBillableStatus "
md-selected-text=
"getSelectedBillableStatus() "
id=
"empBillableStatus"
name=
"empBillableStatus"
ng-change=
"changeEmpBillableStatus()
>
<md-optgroup label="
billable
statuses
"
>
<md-option
ng-value=
"billableStatus "
ng-repeat=
"billableStatus in billableStatuses "
>
{{billableStatus}}
</md-option>
</md-optgroup>
...
...
@@ -258,7 +258,7 @@
<tr>
<td
class=
"Employee"
>
Billability Status
</td>
<td>
<md-select
ng-model=
"empBillableStatus "
md-selected-text=
"getSelectedBillableStatus() "
id=
"empBillableStatus"
name=
"empBillableStatus"
>
<md-select
ng-model=
"empBillableStatus "
md-selected-text=
"getSelectedBillableStatus() "
id=
"empBillableStatus"
name=
"empBillableStatus"
ng-change=
"changeEmpBillableStatus()"
>
<md-optgroup
label=
"billable statuses "
>
<md-option
ng-value=
"billableStatus "
ng-repeat=
"billableStatus in billableStatuses "
>
{{billableStatus}}
</md-option>
</md-optgroup>
...
...
@@ -270,7 +270,7 @@
<td>
{{empBillableStatus}} Start Date
</td>
<td>
<md-datepicker
ng-model=
"newBillingStartDate"
md-placeholder=
"Plase select Date "
id=
"newBillingStartDate "
md-min-date=
"minDate "
md-max-date=
"maxDate "
onkeydown=
"return false "
ng-change=
"currentBillabilityDateChange()"
md-max-date=
"maxDate "
onkeydown=
"return false "
name=
"newBillingStartDate"
></md-datepicker>
</td>
</tr>
...
...
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