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
118e5bf3
Commit
118e5bf3
authored
Aug 01, 2018
by
rammula-nisum-com
Committed by
rbonthala-nisum-com
Aug 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issues in new team mate, new role and shift added to form (#98)
parent
a5d233b1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
22 deletions
+65
-22
ProjectTeamController.js
src/main/webapp/WEB-INF/controllers/ProjectTeamController.js
+14
-2
default-styles.css
src/main/webapp/WEB-INF/css/default-styles.css
+3
-0
newTeamMate.html
src/main/webapp/WEB-INF/templates/newTeamMate.html
+48
-20
No files found.
src/main/webapp/WEB-INF/controllers/ProjectTeamController.js
View file @
118e5bf3
...
@@ -295,6 +295,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -295,6 +295,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
function
AddProjectTeamController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
employees
)
{
function
AddProjectTeamController
(
$scope
,
$mdDialog
,
dataToPass
,
gridOptionsData
,
employees
)
{
$scope
.
searchTerm
=
""
;
$scope
.
searchTerm
=
""
;
$scope
.
roles
=
[{
"roleName"
:
"Employee"
},{
"roleName"
:
"Lead"
}];
$scope
.
updateSearch
=
function
(
e
){
$scope
.
updateSearch
=
function
(
e
){
e
.
stopPropagation
();
e
.
stopPropagation
();
}
}
...
@@ -629,6 +630,14 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -629,6 +630,14 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
return
"Please select a employee"
;
return
"Please select a employee"
;
}
}
};
};
$scope
.
getSelectedRole
=
function
(){
if
(
$scope
.
role
!=
undefined
){
return
$scope
.
role
.
roleName
;
}
else
{
return
"Please select the role"
;
}
};
$scope
.
getProjectSelected
=
function
(){
$scope
.
getProjectSelected
=
function
(){
if
(
$scope
.
projectModel
!==
undefined
)
{
if
(
$scope
.
projectModel
!==
undefined
)
{
$scope
.
project
=
$scope
.
projectModel
;
$scope
.
project
=
$scope
.
projectModel
;
...
@@ -664,6 +673,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -664,6 +673,9 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
}
else
if
(
employeeModel
!=
undefined
&&
projectModel
!=
undefined
}
else
if
(
employeeModel
!=
undefined
&&
projectModel
!=
undefined
&&
getExistingRecordProjectStatus
(
employeeModel
.
employeeId
,
projectModel
.
projectName
)){
&&
getExistingRecordProjectStatus
(
employeeModel
.
employeeId
,
projectModel
.
projectName
)){
$scope
.
alertMsg
=
"Employee is already assigned to the selected project"
;
$scope
.
alertMsg
=
"Employee is already assigned to the selected project"
;
}
else
if
(
$scope
.
shift
==
undefined
){
$scope
.
alertMsg
=
"Please select a shift timing"
;
document
.
getElementById
(
'shift'
).
focus
();
}
else
if
(
$scope
.
empBillableStatus
==
undefined
){
}
else
if
(
$scope
.
empBillableStatus
==
undefined
){
$scope
.
alertMsg
=
"Please select a billable status"
;
$scope
.
alertMsg
=
"Please select a billable status"
;
document
.
getElementById
(
'empBillableStatus'
).
focus
();
document
.
getElementById
(
'empBillableStatus'
).
focus
();
...
@@ -682,7 +694,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
...
@@ -682,7 +694,7 @@ myApp.controller("projectTeamController",function($scope, myFactory, $mdDialog,
else
{
else
{
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
var
record
=
{
"employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"role"
:
employeeModel
.
role
,
"designation"
:
employeeModel
.
designation
,
"shift"
:
employeeModel
.
shift
,
"projectId"
:
projectModel
.
projectId
,
"projectName"
:
projectModel
.
projectName
,
"account"
:
$scope
.
projectModel
.
account
,
"managerId"
:
myFactory
.
getEmpId
(),
"managerName"
:
myFactory
.
getEmpName
(),
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"newBillingStartDate"
:
$scope
.
newBillingStartDate
,
"accountId"
:
$scope
.
projectModel
.
accountId
,
"domainId"
:
$scope
.
projectModel
.
domainId
};
var
record
=
{
"employeeId"
:
employeeModel
.
employeeId
,
"employeeName"
:
employeeModel
.
employeeName
,
"emailId"
:
employeeModel
.
emailId
,
"role"
:
$scope
.
role
.
roleName
,
"designation"
:
employeeModel
.
designation
,
"shift"
:
$scope
.
shift
,
"projectId"
:
projectModel
.
projectId
,
"projectName"
:
projectModel
.
projectName
,
"account"
:
$scope
.
projectModel
.
account
,
"managerId"
:
myFactory
.
getEmpId
(),
"managerName"
:
myFactory
.
getEmpName
(),
"mobileNumber"
:
employeeModel
.
mobileNumber
,
"active"
:
true
,
"billableStatus"
:
$scope
.
empBillableStatus
,
"startDate"
:
$scope
.
startDate
,
"endDate"
:
$scope
.
endDate
,
"newBillingStartDate"
:
$scope
.
newBillingStartDate
,
"accountId"
:
$scope
.
projectModel
.
accountId
,
"domainId"
:
$scope
.
projectModel
.
domainId
};
addOrUpdateRole
(
record
,
$scope
.
templateTitle
);
addOrUpdateRole
(
record
,
$scope
.
templateTitle
);
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
500
);
$timeout
(
function
(){
updateGrid
(
$scope
.
templateTitle
,
record
)},
500
);
}
}
...
...
src/main/webapp/WEB-INF/css/default-styles.css
View file @
118e5bf3
...
@@ -216,3 +216,6 @@ md-select {
...
@@ -216,3 +216,6 @@ md-select {
.form-control
{
.form-control
{
text-transform
:
capitalize
;
text-transform
:
capitalize
;
}
}
.md-datepicker-input-container
{
width
:
160px
;
}
\ No newline at end of file
src/main/webapp/WEB-INF/templates/newTeamMate.html
View file @
118e5bf3
...
@@ -54,6 +54,21 @@
...
@@ -54,6 +54,21 @@
<output>
Previous Project End Date : {{project.endDate | date : "dd-MM-yyyy"}}
</output>
<output>
Previous Project End Date : {{project.endDate | date : "dd-MM-yyyy"}}
</output>
</div>
</div>
<md-select
ng-model=
"role"
md-selected-text=
"getSelectedRole()"
id=
"shift"
>
<md-optgroup
label=
"role"
>
<md-option
ng-value=
"role"
ng-repeat=
"role in roles"
>
{{role.roleName}}
</md-option>
</md-optgroup>
</md-select>
<md-select
ng-model=
"shift"
md-selected-text=
"getSelectedShift()"
id=
"shift"
>
<md-optgroup
label=
"shift"
>
<md-option
ng-value=
"shift"
ng-repeat=
"shift in shifts"
>
{{shift}}
</md-option>
</md-optgroup>
</md-select>
<md-select
ng-model=
"empBillableStatus"
<md-select
ng-model=
"empBillableStatus"
md-selected-text=
"getSelectedBillableStatus()"
md-selected-text=
"getSelectedBillableStatus()"
...
@@ -62,25 +77,38 @@
...
@@ -62,25 +77,38 @@
ng-value=
"billableStatus"
ng-value=
"billableStatus"
ng-repeat=
"billableStatus in billableStatuses"
>
{{billableStatus}}
</md-option>
ng-repeat=
"billableStatus in billableStatuses"
>
{{billableStatus}}
</md-option>
</md-optgroup>
</md-select>
</md-optgroup>
</md-select>
<table>
<div
ng-show=
"empBillableStatus"
>
<tr
ng-show=
"empBillableStatus"
>
<td>
Current Billability Start Date
</td>
<output>
Current Billability Start Date :
<md-datepicker
ng-model=
"newBillingStartDate"
md-placeholder=
"Please Select Date"
id =
"newBillingStartDate"
<td>
<md-datepicker
ng-model=
"newBillingStartDate"
md-placeholder=
"Please select the date"
id =
"newBillingStartDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
ng-change=
"currentBillabilityDateChange()"
ng-change=
"currentBillabilityDateChange()"
onkeydown=
"return false"
onkeydown=
"return false"
>
></md-datepicker></br></output>
</md-datepicker>
</div>
</td>
</tr>
<md-datepicker
ng-model=
"startDate"
md-placeholder=
"Assignment Start Date"
id =
"startDate"
<tr>
<td>
Start Date
</td>
<td>
<md-datepicker
ng-model=
"startDate"
md-placeholder=
"Please select the date"
id =
"startDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
ng-disabled=
"newBillingStartDate"
ng-disabled=
"newBillingStartDate"
onkeydown=
"return false"
onkeydown=
"return false"
>
></md-datepicker></br>
</md-datepicker>
<md-datepicker
ng-model=
"endDate"
md-placeholder=
"Assignment End Date"
id=
"endDate"
</td>
</tr>
<tr>
<td>
End Date
&
nbsp
</td>
<td>
<md-datepicker
ng-model=
"endDate"
md-placeholder=
"Please select the date"
id=
"endDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
md-min-date=
"minDate"
md-max-date=
"maxDate"
onkeydown=
"return false"
onkeydown=
"return false"
>
></md-datepicker>
</md-datepicker>
</td>
</tr>
</table>
<div
role=
"alert"
>
<div
role=
"alert"
>
<span
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
<span
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
...
...
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