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
c387c185
Commit
c387c185
authored
Aug 07, 2018
by
mduppanapudi-nisum-com
Committed by
rbonthala-nisum-com
Aug 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixes in manage employee and manage project (#127)
parent
33d41f29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
10 deletions
+19
-10
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+15
-8
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+2
-0
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+2
-2
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
c387c185
...
@@ -151,8 +151,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -151,8 +151,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
locals
:{
dataToPass
:
userData
,
gridOptionsData
:
$scope
.
gridOptions
.
data
},
})
})
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
if
(
result
==
"Add"
)
showAlert
(
'Role assigned successfully'
);
if
(
result
==
"Add"
)
showAlert
(
'Employee assigned successfully'
);
else
if
(
result
==
"Update"
)
showAlert
(
'Role updated successfully'
);
else
if
(
result
==
"Update"
)
{
$scope
.
getUserRoles
();
showAlert
(
'Employee updated successfully'
);
}
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
if
(
result
==
"Cancelled"
)
console
.
log
(
result
);
else
showAlert
(
'Role assigning/updation failed!!!'
);
else
showAlert
(
'Role assigning/updation failed!!!'
);
});
});
...
@@ -358,6 +361,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -358,6 +361,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
var
hasB1
=
$scope
.
hasB1
;
var
hasB1
=
$scope
.
hasB1
;
var
empStatus
=
$scope
.
empStatus
;
var
empStatus
=
$scope
.
empStatus
;
var
dateOfJoining
=
$scope
.
dateOfJoining
;
var
dateOfJoining
=
$scope
.
dateOfJoining
;
var
dateOfBirth
=
$scope
.
dateOfBirth
;
if
(
searchId
==
""
){
if
(
searchId
==
""
){
$scope
.
alertMsg
=
"Employee Id is mandatory"
;
$scope
.
alertMsg
=
"Employee Id is mandatory"
;
document
.
getElementById
(
'empId'
).
focus
();
document
.
getElementById
(
'empId'
).
focus
();
...
@@ -379,12 +383,15 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -379,12 +383,15 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
else
if
(
dateOfJoining
==
undefined
){
}
else
if
(
dateOfJoining
==
undefined
){
$scope
.
alertMsg
=
"Please select a Date Of Joining"
;
$scope
.
alertMsg
=
"Please select a Date Of Joining"
;
document
.
getElementById
(
'dateOfJoining'
).
focus
();
document
.
getElementById
(
'dateOfJoining'
).
focus
();
}
else
if
(
dateOfBirth
!=
undefined
&&
!
(
today
.
getFullYear
()
-
dateOfBirth
.
getFullYear
()
>
20
)){
$scope
.
alertMsg
=
"Please check your date of birth"
;
document
.
getElementById
(
'dateOfBirth'
).
focus
();
}
else
if
(
empStatus
==
undefined
){
}
else
if
(
empStatus
==
undefined
){
$scope
.
alertMsg
=
"Please select a employee status"
;
$scope
.
alertMsg
=
"Please select a employee status"
;
document
.
getElementById
(
'empStatus'
).
focus
();
document
.
getElementById
(
'empStatus'
).
focus
();
}
else
if
(
empRole
==
undefined
){
}
else
if
(
functionalGroup
==
undefined
){
$scope
.
alertMsg
=
"Please select a
role
"
;
$scope
.
alertMsg
=
"Please select a
Functional Org
"
;
document
.
getElementById
(
'
empRole
'
).
focus
();
document
.
getElementById
(
'
functionalGroup
'
).
focus
();
}
else
if
(
designation
==
undefined
){
}
else
if
(
designation
==
undefined
){
$scope
.
alertMsg
=
"Please select a designation"
;
$scope
.
alertMsg
=
"Please select a designation"
;
document
.
getElementById
(
'designation'
).
focus
();
document
.
getElementById
(
'designation'
).
focus
();
...
@@ -394,9 +401,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
...
@@ -394,9 +401,9 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
else
if
(
employmentType
==
undefined
){
}
else
if
(
employmentType
==
undefined
){
$scope
.
alertMsg
=
"Please select a Employment Type"
;
$scope
.
alertMsg
=
"Please select a Employment Type"
;
document
.
getElementById
(
'employmentType'
).
focus
();
document
.
getElementById
(
'employmentType'
).
focus
();
}
else
if
(
functionalGroup
==
undefined
){
}
else
if
(
empRole
==
undefined
){
$scope
.
alertMsg
=
"Please select a
Functional Org
"
;
$scope
.
alertMsg
=
"Please select a
role
"
;
document
.
getElementById
(
'
functionalGroup
'
).
focus
();
document
.
getElementById
(
'
empRole
'
).
focus
();
}
else
if
(
hasPassort
==
undefined
){
}
else
if
(
hasPassort
==
undefined
){
$scope
.
alertMsg
=
"Please select a Passport"
;
$scope
.
alertMsg
=
"Please select a Passport"
;
document
.
getElementById
(
'hasPassort'
).
focus
();
document
.
getElementById
(
'hasPassort'
).
focus
();
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
c387c185
...
@@ -1062,6 +1062,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
...
@@ -1062,6 +1062,8 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
}
}
else
if
(
!
((
$scope
.
newBillingStartDate
>=
$scope
.
startDate
)
&&
(
$scope
.
newBillingStartDate
<=
$scope
.
endDate
))
&&
action
==
"Update"
){
else
if
(
!
((
$scope
.
newBillingStartDate
>=
$scope
.
startDate
)
&&
(
$scope
.
newBillingStartDate
<=
$scope
.
endDate
))
&&
action
==
"Update"
){
$scope
.
alertMsg
=
$scope
.
empBillableStatus
+
" start date should be in between start date and end date"
;
$scope
.
alertMsg
=
$scope
.
empBillableStatus
+
" start date should be in between start date and end date"
;
}
else
if
(
$scope
.
endDate
>
dataToPass
.
projectEndDate
){
$scope
.
alertMsg
=
"End date should not exceed project end date"
;
}
}
else
{
else
{
$scope
.
alertMsg
=
""
;
$scope
.
alertMsg
=
""
;
...
...
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
c387c185
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<tr>
<tr>
<td
colspan=
"4"
><b>
Date of Joining:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"4"
><b>
Date of Joining:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-datepicker
ng-model=
"dateOfJoining"
id=
"dateOfJoining"
<td
colspan=
"8"
><md-datepicker
ng-model=
"dateOfJoining"
id=
"dateOfJoining"
md-placeholder=
"Date of Joining"
md-min-date=
"minDate"
md-placeholder=
"Date of Joining"
md-min-date=
"minDate"
id=
"dateOfBirth"
md-max-date=
"maxDate"
onkeydown=
"return false"
></md-datepicker>
md-max-date=
"maxDate"
onkeydown=
"return false"
></md-datepicker>
</td>
</td>
</tr>
</tr>
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
</md-optgroup>
</md-select></td>
</md-optgroup>
</md-select></td>
</tr>
</tr>
<tr
ng-show=
"empStatus == 'In Active'"
>
<tr
ng-show=
"empStatus == 'In Active'"
>
<td
colspan=
"4"
><b>
Employ
ment Status
:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"4"
><b>
Employ
ee Exit Date
:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-datepicker
ng-model=
"exitDate"
<td
colspan=
"8"
><md-datepicker
ng-model=
"exitDate"
md-placeholder=
"Exit Date"
md-min-date=
"minDate"
md-placeholder=
"Exit Date"
md-min-date=
"minDate"
md-max-date=
"maxDate"
onkeydown=
"return false"
></md-datepicker>
md-max-date=
"maxDate"
onkeydown=
"return false"
></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