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
227b27a6
Commit
227b27a6
authored
Aug 10, 2018
by
vsunke-nisum-com
Committed by
tdutta-nisum-com
Aug 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-129 (#140)
* MT-129 * MT-129
parent
3705b14d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
17 deletions
+45
-17
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+29
-1
newRoleTemplate.html
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
+16
-16
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
227b27a6
...
...
@@ -321,13 +321,40 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
return
false
;
}
$scope
.
validateEmpId
=
function
(){
var
empId
=
$scope
.
empId
;
if
(
empId
==
""
){
$scope
.
alertMsg
=
""
;
document
.
getElementById
(
'empId'
).
focus
();
$scope
.
alertMsg
=
""
;
}
else
{
$scope
.
alertMsg
=
""
;
}
}
$scope
.
validateMessage
=
function
()
{
$scope
.
errorMessage
=
false
;
}
$scope
.
validateEmpName
=
function
(){
var
empName
=
$scope
.
empName
;
if
(
empName
==
""
){
$scope
.
alertMsg
=
""
;
document
.
getElementById
(
'empName'
).
focus
();
$scope
.
alertMsg
=
""
;
}
else
{
$scope
.
alertMsg
=
""
;
}
}
$scope
.
validateEmailId
=
function
(){
var
emailId
=
$scope
.
empEmail
;
if
(
emailId
!=
""
&&
!
validateEmail
(
emailId
)){
$scope
.
alertMsg
=
"Please enter a valid nisum email id"
;
document
.
getElementById
(
'empEmail'
).
focus
();
}
else
{
$scope
.
alertMsg
=
"Email ID is mandatory"
;
//$scope.alertMsg = "Email ID is mandatory";
$scope
.
alertMsg
=
""
;
}
}
...
...
@@ -455,6 +482,7 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}
}
$scope
.
errorMessage
=
true
;
};
isDataUpdated
=
function
(){
...
...
src/main/webapp/WEB-INF/templates/newRoleTemplate.html
View file @
227b27a6
...
...
@@ -23,18 +23,18 @@
<td
colspan=
"4"
><b>
Emp ID:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"empId"
name=
"empId"
ng-model=
"empId"
placeholder=
"Employee ID"
ng-blur=
"validateEmpId()"
ng-disabled=
"isDisabled"
/></td>
placeholder=
"Employee ID"
ng-blur=
"validateEmpId()"
ng-disabled=
"isDisabled"
/></td>
<!-- ng-blur="validateEmpId()'' -->
<tr>
<tr>
<td
colspan=
"4"
><b>
Employee Name:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"empName"
name=
"empName"
ng-model=
"empName"
placeholder=
"Employee Name"
/></td
>
placeholder=
"Employee Name"
ng-blur=
"validateEmpName()"
/></td>
<!-- ng-blur="validateEmpName()"--
>
</tr>
<tr>
<td
colspan=
"-10"
><b>
Gender:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"gender"
<td
colspan=
"8"
><md-select
ng-model=
"gender"
ng-blur=
"validateMessage()"
md-selected-text=
"getSelectedGender()"
id=
"gender"
>
<md-option
ng-model=
"gender"
value=
"Male"
>
Male
</md-option>
<md-option
ng-model=
"gender"
value=
"Female"
>
Female
</md-option>
</md-select></td>
...
...
@@ -45,14 +45,14 @@
<td
colspan=
"8"
><input
type=
"text"
class=
"form-control"
id=
"empEmail"
name=
"empEmail"
ng-model=
"empEmail"
placeholder=
"Email ID"
ng-blur=
"validateEmailId()"
ng-disabled=
"isDisabled"
style=
"text-transform: lowercase;"
/></td>
ng-disabled=
"isDisabled"
style=
"text-transform: lowercase;"
/></td>
<!--ng-blur="validateEmailId()"-->
</tr>
<tr>
<td
colspan=
"4"
><b>
Date of Joining:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-datepicker
ng-model=
"dateOfJoining"
id=
"dateOfJoining"
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"
ng-blur=
"validateMessage()"
></md-datepicker>
</td>
</tr>
...
...
@@ -83,7 +83,7 @@
<tr>
<td
colspan=
"12"
>
<div
role=
"alert"
>
<span
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
<span
ng-if=
"errorMessage"
class=
"error"
style=
"color: red;"
>
{{alertMsg}}
</span>
</div>
</td>
</tr>
...
...
@@ -92,7 +92,7 @@
</div>
<!--form-group-->
</div>
<!---col-lg-4 col-md-4 col-sm-4 col-xs-12-->
<!---col-lg-4 col-md-4 col-sm-4 col-xs-12-->
<div
class=
"col-lg-4 col-md-4 col-sm-4 col-xs-12"
>
<h4>
Organization Info
</h4>
...
...
@@ -101,7 +101,7 @@
<tr>
<td
colspan=
"4"
><b>
Functional Group:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"functionalGroup"
<td
colspan=
"8"
><md-select
ng-
blur=
"validateMessage()"
ng-
model=
"functionalGroup"
md-selected-text=
"getSelectedFunctionalGroup()"
id=
"functionalGroup"
>
<md-optgroup
label=
"Functional Org"
>
<md-option
...
...
@@ -113,7 +113,7 @@
<tr>
<td
colspan=
"4"
><b>
Designation:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"designation"
<td
colspan=
"8"
><md-select
ng-model=
"designation"
ng-blur=
"validateMessage()"
md-selected-text=
"getDesignationText()"
id=
"designation"
>
<md-optgroup
label=
"designations"
>
<md-option
ng-value=
"designation"
ng-repeat=
"designation in designations"
>
{{designation}}
</md-option>
...
...
@@ -122,7 +122,7 @@
<tr>
<td
colspan=
"4"
><b>
Work Location:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"empLocation"
<td
colspan=
"8"
><md-select
ng-model=
"empLocation"
ng-blur=
"validateMessage()"
md-selected-text=
"getSelectedLocation()"
id=
"empLocation"
>
<md-optgroup
label=
"locations"
>
<md-option
ng-value=
"location"
ng-repeat=
"location in locations"
>
{{location}}
</md-option>
...
...
@@ -131,7 +131,7 @@
<tr>
<td
colspan=
"4"
><b>
Employment Type:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"employmentType"
<td
colspan=
"8"
><md-select
ng-model=
"employmentType"
ng-blur=
"validateMessage()"
md-selected-text=
"getSelectedEmploymentType()"
id=
"employmentType"
>
<md-optgroup
label=
"Employment Type"
>
<md-option
...
...
@@ -159,8 +159,8 @@
</tr> -->
<tr>
<td
colspan=
"4"
><b>
App Role:
</b
></td>
<td
colspan=
"8"
><md-select
ng-model=
"empRole"
<td
colspan=
"4"
><b>
Org Role:
</b><span
class=
"mandatory"
></span
></td>
<td
colspan=
"8"
><md-select
ng-model=
"empRole"
ng-blur=
"validateMessage()"
md-selected-text=
"getSelectedRole()"
id=
"empRole"
>
<md-optgroup
label=
"roles"
>
<md-option
ng-value=
"role"
ng-repeat=
"role in roles"
>
{{role}}
</md-option>
</md-optgroup>
</md-select></td>
...
...
@@ -168,7 +168,7 @@
<tr>
<td
colspan=
"1"
><b>
HasPassport:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"hasPassort"
<td
colspan=
"8"
><md-select
ng-model=
"hasPassort"
ng-blur=
"validateMessage()"
id=
"hasPassort"
>
<md-option
ng-model=
"hasPassort"
value=
"Yes"
>
Yes
</md-option>
<md-option
ng-model=
"hasPassort"
value=
"No"
>
No
</md-option>
</md-select></td>
...
...
@@ -184,7 +184,7 @@
<tr>
<td
colspan=
"1"
><b>
Has B1 Visa:
</b><span
class=
"mandatory"
></span></td>
<td
colspan=
"8"
><md-select
ng-model=
"hasB1"
id=
"hasB1"
>
<td
colspan=
"8"
><md-select
ng-model=
"hasB1"
id=
"hasB1"
ng-blur=
"validateMessage()"
>
<md-option
ng-model=
"hasB1"
value=
"Yes"
>
Yes
</md-option>
<md-option
ng-model=
"hasB1"
value=
"No"
>
No
</md-option>
</md-select></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