Merge pull request #1803 from TypicalGitHubUser/pending-tasks-pagination

Add pagination in "Pending Tasks"
This commit is contained in:
Shaik Nazeer Hussain 2017-01-23 13:24:38 +05:30 committed by GitHub
commit 15b7cbca20
2 changed files with 97 additions and 78 deletions

View File

@ -16,6 +16,8 @@
//this value will be changed within each specific tab
scope.requestIdentifier = "loanId";
scope.itemsPerPage = 15;
resourceFactory.checkerInboxResource.get({templateResource: 'searchtemplate'}, function (data) {
scope.checkerTemplate = data;
});

View File

@ -107,7 +107,7 @@
</tr>
</thead>
<tbody>
<tr class="pointer-main" ng-repeat="data in searchData">
<tr class="pointer-main" dir-paginate="data in searchData | itemsPerPage: itemsPerPage" pagination-id="inbox">
<td><input type="checkbox" data-ng-model="checkData[data.id]"/></td>
<td class="pointer" data-ng-click="routeTo(data.id)">{{data.id}}</td>
<td class="pointer" data-ng-click="routeTo(data.id)">{{data.madeOnDate | DateFormat}}</td>
@ -119,6 +119,12 @@
</tbody>
</table>
</div>
<div>
<center>
<dir-pagination-controls pagination-id="inbox"
boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html" />
</center>
</div>
</tab>
<tab heading="{{'label.heading.clientapproval' | translate}}" has-permission='READ_CLIENT'>
<div class="head-affix">
@ -151,11 +157,11 @@
</div>
<div class="modal-footer">
<button class="btn btn-warning" ng-click="cancel()">{{'label.button.cancel' | translate}}</button>
<button class="btn btn-primary" ng-click="approve(date.actDate)">{{'label.button.confirm' | translate}}
</button>
<button class="btn btn-primary" ng-click="approve(date.actDate)">{{'label.button.confirm' | translate}}</button>
</div>
</script>
<table class="table condensed-table" ng-repeat="(officeName,values) in groupedClients">
<div ng-repeat="(officeName,values) in groupedClients">
<table class="table condensed-table">
<tr>
<td>
<strong>{{officeName}}</strong>
@ -174,7 +180,8 @@
</thead>
<tbody>
<tr class="pointer-main"
data-ng-repeat="client in values | filter : {active: 'false', status.value:'Pending'} | filter:filterText">
dir-paginate="client in values | filter : {active: 'false', status.value:'Pending'} | filter:filterText | itemsPerPage: itemsPerPage"
pagination-id="'_' + $index">
<td><input type="checkbox" data-ng-model="approveData[client.id]"/></td>
<td class="pointer" data-ng-click="routeToClient(client.id)">{{client.displayName}}</td>
<td class="pointer" data-ng-click="routeToClient(client.id)">{{client.accountNo}}</td>
@ -185,6 +192,9 @@
</td>
</tr>
</table>
<dir-pagination-controls pagination-id="'_' + $index"
boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"/>
</div>
</tab>
<tab heading="{{'label.heading.loanapproval' | translate}}" has-permission='READ_LOAN'>
<div class="head-affix">
@ -215,7 +225,8 @@
<button class="btn btn-primary" ng-click="approve()">{{'label.button.confirm' | translate}}</button>
</div>
</script>
<table ng-repeat="office in offices" class="table condensed-table">
<div ng-repeat="office in offices">
<table class="table condensed-table">
<tr ng-show="office.loans.length > 0">
<td><strong>{{office.name}}</strong></td>
</tr>
@ -232,7 +243,7 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="loan in office.loans | filter:filterText1">
<tr dir-paginate="loan in office.loans | filter:filterText1 | itemsPerPage:itemsPerPage" pagination-id="'__' + $index">
<td><input type="checkbox" ng-model="loanTemplate[loan.id]"></td>
<td class="pointer"><a href='#/viewclient/{{loan.clientId}}'>{{loan.clientName}}</a></td>
<td class="pointer"><a href='#/viewloanaccount/{{loan.id}}'>{{loan.loanProductName}}({{loan.accountNo}})</a>
@ -245,6 +256,9 @@
</td>
</tr>
</table>
<dir-pagination-controls pagination-id="'__' + $index"
boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"/>
</div>
</tab>
<tab heading="{{'label.heading.loandisbursal' | translate}}" has-permission='READ_LOAN'>
<div class="head-affix">
@ -287,7 +301,8 @@
</tr>
</thead>
<tbody>
<tr ng-repeat="loan in loans | filter : {status.waitingForDisbursal :'true' }| filter:filterText2">
<tr dir-paginate="loan in loans | filter : {status.waitingForDisbursal :'true' }| filter:filterText2 | itemsPerPage: itemsPerPage"
pagination-id="loan-disbursal">
<td><input type="checkbox" ng-model="loanDisbursalTemplate[loan.id]"></td>
<td><a href="#/viewclient/{{loan.clientId}}">{{loan.clientName}}</a></td>
<td><a href="#/viewloanaccount/{{loan.id}}">{{loan.accountNo}}</a></td>
@ -296,6 +311,8 @@
</tr>
</tbody>
</table>
<dir-pagination-controls pagination-id="loan-disbursal"
boundary-links="true" template-url="bower_components/angular-utils-pagination/dirPagination.tpl.html"/>
</div>
</tab>