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
2f529133
Commit
2f529133
authored
Aug 08, 2018
by
dgoud-nisum-com
Committed by
rbonthala-nisum-com
Aug 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PaginationControl code changes and Search Filter changed (#130)
parent
3c54d103
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
81 additions
and
59 deletions
+81
-59
AssignRolesController.js
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
+6
-7
AttendanceReportController.js
.../webapp/WEB-INF/controllers/AttendanceReportController.js
+2
-2
ChartsController.js
src/main/webapp/WEB-INF/controllers/ChartsController.js
+27
-8
DashboardController.js
src/main/webapp/WEB-INF/controllers/DashboardController.js
+14
-13
DomainController.js
src/main/webapp/WEB-INF/controllers/DomainController.js
+8
-6
MyDetailsController.js
src/main/webapp/WEB-INF/controllers/MyDetailsController.js
+2
-2
ProjectController.js
src/main/webapp/WEB-INF/controllers/ProjectController.js
+9
-8
ReporteesController.js
src/main/webapp/WEB-INF/controllers/ReporteesController.js
+2
-2
ShiftDetailsController.js
...main/webapp/WEB-INF/controllers/ShiftDetailsController.js
+2
-2
TravelController.js
src/main/webapp/WEB-INF/controllers/TravelController.js
+2
-2
VisaController.js
src/main/webapp/WEB-INF/controllers/VisaController.js
+2
-2
assignAccountsController.js
...in/webapp/WEB-INF/controllers/assignAccountsController.js
+5
-5
No files found.
src/main/webapp/WEB-INF/controllers/AssignRolesController.js
View file @
2f529133
...
...
@@ -39,12 +39,11 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
enableFiltering
:
true
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Employee ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
},
{
field
:
'employeeName'
,
displayName
:
'Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'employeeName'
,
displayName
:
'
Employee
Name'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'emailId'
,
displayName
:
'Email'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
{
field
:
'baseTechnology'
,
displayName
:
'Skill'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Org'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
}
{
field
:
'baseTechnology'
,
displayName
:
'Skill'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
},
{
field
:
'designation'
,
displayName
:
'Designation'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
false
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Org'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
false
,
width
:
120
}
]
};
...
...
@@ -122,10 +121,10 @@ myApp.controller("assignRoleController",function($scope, myFactory, $mdDialog, $
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptionsOrgView
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/AttendanceReportController.js
View file @
2f529133
...
...
@@ -102,10 +102,10 @@ myApp.controller("attendanceReportController", function($scope, $http, myFactory
}
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/ChartsController.js
View file @
2f529133
...
...
@@ -31,16 +31,17 @@ myApp.directive('hcPieChart', function () {
paginationPageSizes
:
[
10
,
20
,
30
,
40
,
50
,
100
],
paginationPageSize
:
10
,
pageNumber
:
1
,
enableFiltering
:
true
,
pageSize
:
10
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Employee ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
width
:
120
},
{
field
:
'employeeName'
,
displayName
:
'
Name'
,
enableColumnMenu
:
false
,
enableSorting
:
fals
e
},
{
field
:
'emailId'
,
displayName
:
'Email'
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'projectName'
,
displayName
:
'Project Name'
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'billableStatus'
,
displayName
:
'Billable Status'
,
enableColumnMenu
:
false
,
enableSorting
:
false
},
{
field
:
'billingStartDate'
,
displayName
:
'Billing Start Data'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
},
{
field
:
'billingEndDate'
,
displayName
:
'Billing End Data'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Group'
,
enableColumnMenu
:
false
,
enableSorting
:
false
}
{
field
:
'employeeId'
,
displayName
:
'Employee ID'
,
enableColumnMenu
:
true
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
120
},
{
field
:
'employeeName'
,
displayName
:
'
Employee Name'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
tru
e
},
{
field
:
'emailId'
,
displayName
:
'Email'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
{
field
:
'projectName'
,
displayName
:
'Project Name'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
},
{
field
:
'billableStatus'
,
displayName
:
'Billable Status'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
},
{
field
:
'billingStartDate'
,
displayName
:
'Billing Start Data'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableFiltering
:
false
},
{
field
:
'billingEndDate'
,
displayName
:
'Billing End Data'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableFiltering
:
false
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Group'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
}
],
enableGridMenu
:
true
,
enableSelectAll
:
true
,
...
...
@@ -94,6 +95,12 @@ myApp.directive('hcPieChart', function () {
url
:
appConfig
.
appUri
+
"/reports/fetchEmployeeDetailsByFG?fGroup="
+
optionName
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -104,6 +111,12 @@ myApp.directive('hcPieChart', function () {
url
:
appConfig
.
appUri
+
"/reports/fetchEmployeeDetailsByAccountBillability?account="
+
category
+
"&billabilityStatus="
+
seriesName
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
@@ -114,6 +127,12 @@ myApp.directive('hcPieChart', function () {
url
:
appConfig
.
appUri
+
"/reports/fetchEmployeeDetailsByDateBillability?billabilityStatus="
+
seriesName
+
"&reportDate="
+
category
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
$scope
.
gridOptions
.
data
=
[];
...
...
src/main/webapp/WEB-INF/controllers/DashboardController.js
View file @
2f529133
...
...
@@ -30,14 +30,14 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
enableHorizontalScrollbar
:
1
,
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp ID'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
100
,
cellTemplate
:
getEmpDetTemplate
},
{
field
:
'employeeName'
,
displayName
:
'EmployeeName '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
200
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
tru
e
,
width
:
150
},
{
field
:
'role'
,
displayName
:
'Role'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
tru
e
,
width
:
150
},
{
field
:
'baseTechnology'
,
displayName
:
'Skill '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
tru
e
,
width
:
200
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Org'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
tru
e
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Employee
Name '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
200
},
{
field
:
'designation'
,
displayName
:
'Designation '
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
fals
e
,
width
:
150
},
{
field
:
'role'
,
displayName
:
'Role'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
fals
e
,
width
:
150
},
{
field
:
'baseTechnology'
,
displayName
:
'Skill '
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
fals
e
,
width
:
200
},
{
field
:
'functionalGroup'
,
displayName
:
'Functional Org'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
fals
e
,
width
:
100
},
{
field
:
'domain'
,
displayName
:
'Domain'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
100
},
{
field
:
'employmentType'
,
displayName
:
'Employment Type'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
tru
e
,
width
:
150
},
{
field
:
'empStatus'
,
displayName
:
'Employment Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
tru
e
,
width
:
150
},
{
field
:
'employmentType'
,
displayName
:
'Employment Type'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
fals
e
,
width
:
150
},
{
field
:
'empStatus'
,
displayName
:
'Employment Status'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
fals
e
,
width
:
150
},
{
field
:
'account'
,
displayName
:
'Account'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
150
},
{
field
:
'projectName'
,
displayName
:
'Project'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
200
},
/*{field : 'projectAssigned',displayName: 'Allocated ', enableColumnMenu: false, enableSorting: true,enableFiltering:true,cellTemplate: getCellActiveTemplate,filterHeaderTemplate: '<div class="ui-grid-filter-container" ng-repeat="colFilter in col.filters"><div my-custom-dropdown></div></div>',
...
...
@@ -128,11 +128,12 @@ myApp.controller("dashboardController", function($scope, $http, myFactory,export
//alert("response"+response);
// alert("response"+response.data);
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/DomainController.js
View file @
2f529133
...
...
@@ -114,11 +114,12 @@ myApp.controller("domainController",
function
mySuccess
(
response
)
{
console
.
log
(
response
.
data
);
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
},
function
myError
(
response
)
{
...
...
@@ -208,10 +209,11 @@ myApp.controller("domainController",
e
.
stopPropagation
();
}
$scope
.
searchFilter
=
function
(
obj
)
{
var
stringToGoIntoTheRegex
=
$scope
.
searchTerm
;
var
regex
=
new
RegExp
(
"^"
+
stringToGoIntoTheRegex
,
"i"
);
var
filteredWord
=
!
$scope
.
searchTerm
||
obj
.
employeeName
.
match
(
regex
);
return
filteredWord
;
if
(
$scope
.
searchTerm
.
length
>
3
){
var
re
=
new
RegExp
(
$scope
.
searchTerm
,
'i'
);
return
!
$scope
.
searchTerm
||
re
.
test
(
obj
.
employeeName
);
}
return
obj
;
};
$scope
.
clearSearchTerm
=
function
()
{
$scope
.
searchTerm
=
''
;
...
...
src/main/webapp/WEB-INF/controllers/MyDetailsController.js
View file @
2f529133
...
...
@@ -39,10 +39,10 @@ myApp.controller("employeeController", function($scope, $http, myFactory, $mdDia
$scope
.
avgLoginHrs
=
response
.
data
[
0
].
totalAvgTime
+
" Hrs"
;
}
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/ProjectController.js
View file @
2f529133
...
...
@@ -96,10 +96,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
url
:
appConfig
.
appUri
+
"project/getProjects"
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
...
...
@@ -345,10 +345,11 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
e
.
stopPropagation
();
}
$scope
.
searchFilter
=
function
(
obj
)
{
var
stringToGoIntoTheRegex
=
$scope
.
searchTerm
;
var
regex
=
new
RegExp
(
"^"
+
stringToGoIntoTheRegex
,
"i"
);
var
filteredWord
=
!
$scope
.
searchTerm
||
obj
.
employeeName
.
match
(
regex
);
return
filteredWord
;
if
(
$scope
.
searchTerm
.
length
>
3
){
var
re
=
new
RegExp
(
$scope
.
searchTerm
,
'i'
);
return
!
$scope
.
searchTerm
||
re
.
test
(
obj
.
employeeName
);
}
return
obj
;
};
...
...
@@ -530,10 +531,10 @@ myApp.controller("projectController", function ($scope, myFactory, exportUiGridS
url
:
appConfig
.
appUri
+
"/projectTeam/getProjectDetails?projectId="
+
$scope
.
projectId
+
"&status="
+
$scope
.
status
}).
then
(
function
mySuccess
(
response
)
{
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
1
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
1
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
$scope
.
gridOptions
.
data
=
response
.
data
;
for
(
i
=
0
;
i
<
response
.
data
.
length
;
i
++
){
...
...
src/main/webapp/WEB-INF/controllers/ReporteesController.js
View file @
2f529133
...
...
@@ -188,10 +188,10 @@ myApp.controller("employeesController", function($scope, $http, myFactory, $mdDi
}
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/ShiftDetailsController.js
View file @
2f529133
...
...
@@ -85,10 +85,10 @@ myApp.controller("shiftDetailsController",function($scope, myFactory,exportUiGri
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
shiftCount
=
response
.
data
.
length
;
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/TravelController.js
View file @
2f529133
...
...
@@ -110,10 +110,10 @@ myApp.controller("travelController",function($scope, myFactory, $mdDialog, $http
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/VisaController.js
View file @
2f529133
...
...
@@ -102,10 +102,10 @@ myApp.controller("visaController",function($scope, myFactory, $mdDialog, $http,
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"visible"
;
$scope
.
gridOptions
.
enablePaginationControls
=
true
;
}
else
{
document
.
getElementsByClassName
(
"ui-grid-pager-panel"
)[
0
].
style
.
visibility
=
"hidden"
;
$scope
.
gridOptions
.
enablePaginationControls
=
false
;
}
},
function
myError
(
response
)
{
showAlert
(
"Something went wrong while fetching data!!!"
);
...
...
src/main/webapp/WEB-INF/controllers/assignAccountsController.js
View file @
2f529133
...
...
@@ -26,7 +26,6 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
{
name
:
'Actions'
,
displayName
:
'Actions'
,
cellTemplate
:
getCellTemplate
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
}
]
};
$scope
.
nameFields
=
[
'employeeName'
]
$scope
.
gridOptions
.
data
=
$scope
.
records
;
$scope
.
getRowData
=
function
(
row
,
action
){
$scope
.
parentData
.
id
=
row
.
entity
.
id
;
...
...
@@ -275,10 +274,11 @@ myApp.controller("assignAccountsController",function($scope, myFactory, $mdDialo
$scope
.
getSelectedLead
();
}
$scope
.
searchFilter
=
function
(
obj
)
{
var
stringToGoIntoTheRegex
=
$scope
.
searchTerm
;
var
regex
=
new
RegExp
(
"^"
+
stringToGoIntoTheRegex
,
"i"
);
var
filteredWord
=
!
$scope
.
searchTerm
||
obj
.
employeeName
.
match
(
regex
);
return
filteredWord
;
if
(
$scope
.
searchTerm
.
length
>
3
){
var
re
=
new
RegExp
(
$scope
.
searchTerm
,
'i'
);
return
!
$scope
.
searchTerm
||
re
.
test
(
obj
.
employeeName
);
}
return
obj
;
};
$scope
.
removeSelectedLead
=
function
(
item
){
var
index
=
$scope
.
managersSelectedList
.
indexOf
(
item
);
...
...
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