Fix to mark with strike the reversed FD Account transactions

This commit is contained in:
Jose Alberto Hernandez
2024-03-11 18:17:34 -06:00
committed by Jose Alberto Hernandez
parent 294ae1e340
commit c691658ed8
4 changed files with 90 additions and 80 deletions
@@ -1,10 +1,16 @@
<div class="container"> <div class="container">
<span *ngIf="!viewAccountTransferData.reversed">
<button mat-raised-button color="warn" *mifosxHasPermission="'ADJUST_ACCOUNTTRANSFER'" >
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Undo' | translate}}
</button>
</span>
<mat-card> <mat-card>
<mat-card-content> <mat-card-content>
<div fxLayout="row wrap" fxLayout.lt-md="column"> <div fxLayout="row wrap" fxLayout.lt-md="column">
<div fxFlex="100%" [ngClass]="transactionColor()"></div>
<h3 class="mat-h3" fxFlexFill>{{"labels.heading.Transaction Details" | translate}}</h3> <h3 class="mat-h3" fxFlexFill>{{"labels.heading.Transaction Details" | translate}}</h3>
@@ -35,4 +35,8 @@ export class ViewAccountTransferComponent {
this.location.back(); this.location.back();
} }
transactionColor(): string {
return this.viewAccountTransferData.reversed ? 'undo' : 'active';
}
} }
@@ -20,32 +20,32 @@
<ng-container matColumnDef="id"> <ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.ID" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.ID" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ transaction.id }} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="transactionDate"> <ng-container matColumnDef="transactionDate">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Date" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Date" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.date | dateFormat }} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ transaction.date | dateFormat }} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="transactionType"> <ng-container matColumnDef="transactionType">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Type" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Transaction Type" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.transactionType.value }} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ transaction.transactionType.value }} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="debit"> <ng-container matColumnDef="debit">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Debit" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Debit" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ isDebit(transaction.transactionType) ? transaction.amount : 'N/A'}} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ isDebit(transaction.transactionType) ? transaction.amount : 'N/A'}} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="credit"> <ng-container matColumnDef="credit">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Credit" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Credit" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ !isDebit(transaction.transactionType) ? transaction.amount : 'N/A' }} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ !isDebit(transaction.transactionType) ? transaction.amount : 'N/A' }} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="balance"> <ng-container matColumnDef="balance">
<th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Balance" | translate }} </th> <th mat-header-cell *matHeaderCellDef> {{"labels.inputs.Balance" | translate }} </th>
<td mat-cell *matCellDef="let transaction"> {{ transaction.runningBalance }} </td> <td mat-cell *matCellDef="let transaction" [ngClass]="{'strike': transaction.reversed}"> {{ transaction.runningBalance }} </td>
</ng-container> </ng-container>
<ng-container matColumnDef="actions"> <ng-container matColumnDef="actions">
+74 -74
View File
@@ -17,170 +17,170 @@ export class KeyboardShortcutsConfiguration {
makeCombination() { makeCombination() {
this.buttonsArray = [ this.buttonsArray = [
// Navigation Page - Shift + N // Navigation Page - ctrl + n
{ {
title: 'Navigation Page', title: 'Navigation Page',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'N', key: 'n',
route: 'navigation' route: 'navigation'
}, },
// Run Report - Shift + T // Run Report - ctrl + t
{ {
title: 'Run Report', title: 'Run Report',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'T', key: 't',
route: '', route: '',
id: 'runReport' id: 'runReport'
}, },
// Checker Inbox & Pending Tasks - Shift + I // Checker Inbox & Pending Tasks - ctrl + i
{ {
title: 'Checker Inbox & Pending Tasks', title: 'Checker Inbox & Pending Tasks',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'I', key: 'i',
route: 'checker-inbox-and-tasks/checker-inbox' route: 'checker-inbox-and-tasks/checker-inbox'
}, },
// Collection Sheet- Ctrl + Alt + O // Collection Sheet- ctrl + alt + o
// { // {
// title: 'Collection Sheet', // title: 'Collection Sheet',
// ctrlKey: true, // ctrlKey: true,
// shiftKey: false, // shiftKey: false,
// altKey: true, // altKey: true,
// key: 'o', // key: 'o',
// route: '' // route: ''
// }, // },
// Create Client - Shift + C // Create Client - ctrl + c
{ {
title: 'Create Client', title: 'Create Client',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'C', key: 'c',
route: 'clients/create' route: 'clients/create'
}, },
// Create Group - Shift + G // Create Group - ctrl + g
{ {
title: 'Create Group', title: 'Create Group',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'G', key: 'g',
route: 'groups/create' route: 'groups/create'
}, },
// Create Center - Shift + Q // Create Center - ctrl + q
{ {
title: 'Create Center', title: 'Create Center',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'Q', key: 'q',
route: 'centers/create' route: 'centers/create'
}, },
// Frequent Posting - Shift + F // Frequent Posting - ctrl + f
{ {
title: 'Frequent Posting', title: 'Frequent Posting',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'F', key: 'f',
route: 'accounting/journal-entries/frequent-postings' route: 'accounting/journal-entries/frequent-postings'
}, },
// Closure Entries - Shift + E // Closure Entries - ctrl + e
{ {
title: 'Closure Entries', title: 'Closure Entries',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'E', key: 'e',
route: 'accounting/closing-entries' route: 'accounting/closing-entries'
}, },
// Journal Entry - Shift + J // Journal Entry - ctrl + j
{ {
title: 'Journal Entry', title: 'Journal Entry',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'J', key: 'j',
route: 'accounting/journal-entries/create' route: 'accounting/journal-entries/create'
}, },
// Reports - Shift + R // Reports - ctrl + r
{ {
title: 'Reports', title: 'Reports',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'R', key: 'r',
route: 'reports' route: 'reports'
}, },
// Accounting - Shift + A // Accounting - ctrl + a
{ {
title: 'Accounting', title: 'Accounting',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'A', key: 'a',
route: 'accounting' route: 'accounting'
}, },
// Save/Submit Forms - Shift + S // Save/Submit Forms - ctrl + s
{ {
title: 'Save/Submit Forms', title: 'Save/Submit Forms',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'S', key: 's',
route: '', route: '',
id: 'submit' id: 'submit'
}, },
// Cancel - Shift + X // Cancel - ctrl + x
{ {
title: 'Cancel', title: 'Cancel',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'X', key: 'x',
route: '', route: '',
id: 'cancel' id: 'cancel'
}, },
// Help - Shift + H // Help - ctrl + h
{ {
title: 'Help', title: 'Help',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'H', key: 'h',
route: '', route: '',
id: 'help' id: 'help'
}, },
// Pagination: Next - Ctrl + n // Pagination: Next - ctrl + n
// { // {
// title: 'Pagination: Next' // title: 'Pagination: Next'
// ctrlKey: true, // ctrlKey: true,
// shiftKey: false, // shiftKey: false,
// altKey: true, // altKey: true,
// key: 'n', // key: 'n,
// route: '' // route: ''
// }, // },
// Pagination: Previous - Ctrl + p // Pagination: Previous - ctrl + p
// { // {
// title: 'Pagination: Previous' // title: 'Pagination: Previous'
// ctrlKey: true, // ctrlKey: true,
// shiftKey: false, // shiftKey: false,
// altKey: true, // altKey: true,
// key: 'p', // key: 'p,
// route: '' // route: ''
// }, // },
// Logout - Shift + L // Logout - ctrl + l
{ {
title: 'Logout', title: 'Logout',
ctrlKey: false, ctrlKey: true,
shiftKey: true, shiftKey: false,
altKey: false, altKey: false,
key: 'L', key: 'l',
route: '', route: '',
id: 'logout' id: 'logout'
} }