mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 13:51:55 +00:00
MIFOSX-1348 sorting for RD transactions
This commit is contained in:
parent
e02f788b05
commit
e8af78c18f
@ -286,6 +286,20 @@
|
||||
};
|
||||
};
|
||||
|
||||
scope.transactionSort = {
|
||||
column: 'date',
|
||||
descending: true
|
||||
};
|
||||
scope.changeTransactionSort = function(column) {
|
||||
var sort = scope.transactionSort;
|
||||
if (sort.column == column) {
|
||||
sort.descending = !sort.descending;
|
||||
} else {
|
||||
sort.column = column;
|
||||
sort.descending = true;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
mifosX.ng.application.controller('ViewRecurringDepositAccountDetailsController', ['$scope', '$routeParams', 'ResourceFactory', '$location', '$route', 'dateFilter','$modal', mifosX.controllers.ViewRecurringDepositAccountDetailsController]).run(function ($log) {
|
||||
|
||||
@ -204,17 +204,17 @@
|
||||
<colgroup span="4"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{'label.heading.id' | translate}}</th>
|
||||
<th>{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th>{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th>{{'label.heading.debit' | translate}}</th>
|
||||
<th>{{'label.heading.credit' | translate}}</th>
|
||||
<th>{{'label.heading.balance' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('id')">{{'label.heading.id' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('date')">{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('transactionType.value')">{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('amount')">{{'label.heading.debit' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('amount')">{{'label.heading.credit' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('runningBalance')">{{'label.heading.balance' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="pointer-main" ng-class="{strikeoff : transaction.reversed==true}"
|
||||
ng-repeat="transaction in savingaccountdetails.transactions">
|
||||
ng-repeat="transaction in savingaccountdetails.transactions | orderBy:transactionSort.column:transactionSort.descending ">
|
||||
<td class="pointer"
|
||||
data-ng-click="routeTo(transaction.accountId,transaction.id,transaction.transfer,transaction.transfer.id)">
|
||||
{{transaction.id}}
|
||||
|
||||
@ -479,12 +479,12 @@
|
||||
<colgroup span="4"></colgroup>
|
||||
<thead>
|
||||
<tr class="graybg">
|
||||
<th ng-click="changeTransactionSort('id')">{{'label.heading.id' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('officeName')">{{'label.heading.office' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('date')">{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('type.value')">{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('amount')">{{'label.heading.amount' | translate}}</th>
|
||||
<th colspan="5" scope="colgroup">{{'label.heading.breakdown' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('id')">{{'label.heading.id' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('officeName')">{{'label.heading.office' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('date')">{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('type.value')">{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('amount')">{{'label.heading.amount' | translate}}</th>
|
||||
<th class="pointer" colspan="5" scope="colgroup">{{'label.heading.breakdown' | translate}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col"> </th>
|
||||
@ -492,10 +492,10 @@
|
||||
<th scope="col"> </th>
|
||||
<th scope="col"> </th>
|
||||
<th scope="col"> </th>
|
||||
<th scope="col" ng-click="changeTransactionSort('principalPortion')">{{'label.heading.principal' | translate}}</th>
|
||||
<th scope="col" ng-click="changeTransactionSort('interestPortion')">{{'label.heading.interest' | translate}}</th>
|
||||
<th scope="col" ng-click="changeTransactionSort('feeChargesPortion')">{{'label.heading.fees' | translate}}</th>
|
||||
<th scope="col" ng-click="changeTransactionSort('penaltyChargesPortion')">{{'label.heading.penalities' | translate}}</th>
|
||||
<th class="pointer" scope="col" ng-click="changeTransactionSort('principalPortion')">{{'label.heading.principal' | translate}}</th>
|
||||
<th class="pointer" scope="col" ng-click="changeTransactionSort('interestPortion')">{{'label.heading.interest' | translate}}</th>
|
||||
<th class="pointer" scope="col" ng-click="changeTransactionSort('feeChargesPortion')">{{'label.heading.fees' | translate}}</th>
|
||||
<th class="pointer" scope="col" ng-click="changeTransactionSort('penaltyChargesPortion')">{{'label.heading.penalities' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@ -211,12 +211,12 @@
|
||||
<colgroup span="4"></colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="changeTransactionSort('id')">{{'label.heading.id' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('date')">{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('transactionType.value')">{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('amount')">{{'label.heading.debit' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('amount')">{{'label.heading.credit' | translate}}</th>
|
||||
<th ng-click="changeTransactionSort('runningBalance')">{{'label.heading.balance' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('id')">{{'label.heading.id' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('date')">{{'label.heading.transactiondate' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('transactionType.value')">{{'label.heading.transactiontype' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('amount')">{{'label.heading.debit' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('amount')">{{'label.heading.credit' | translate}}</th>
|
||||
<th class="pointer" ng-click="changeTransactionSort('runningBalance')">{{'label.heading.balance' | translate}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user