Recurring Deposit view account homologation (#1910)
Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
7c53b82965
commit
79595f6a1c
+77
-52
@@ -1,13 +1,16 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" class="container m-b-20" *ngIf="dataSource?.data[0].manualEntry">
|
||||
<button mat-raised-button color="primary" (click)="revertTransaction()" *mifosxHasPermission="'REVERSE_JOURNALENTRY'" [disabled]="dataSource?.data[0].reversed">
|
||||
<span *ngIf="!dataSource.data[0].reversed">
|
||||
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Revert Transaction' | translate }}
|
||||
</span>
|
||||
<span *ngIf="dataSource.data[0].reversed">{{ 'labels.buttons.Transaction Reverted' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="isJournalEntryLoaded">
|
||||
|
||||
<div class="container m-b-20" *ngIf="isViewTransaction()">
|
||||
<div fxLayout="row" fxLayoutAlign="end" class="container m-b-20" *ngIf="dataSource?.data[0].manualEntry">
|
||||
<button mat-raised-button color="primary" (click)="revertTransaction()"
|
||||
*mifosxHasPermission="'REVERSE_JOURNALENTRY'" [disabled]="dataSource?.data[0].reversed">
|
||||
<span *ngIf="!dataSource.data[0].reversed">
|
||||
<fa-icon icon="undo" class="m-r-10"></fa-icon>{{ 'labels.buttons.Revert Transaction' | translate }}
|
||||
</span>
|
||||
<span *ngIf="dataSource.data[0].reversed">{{ 'labels.buttons.Transaction Reverted' | translate }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="container m-b-20" *ngIf="isViewTransaction()">
|
||||
|
||||
<mat-card class="mat-elevation-z8" *ngIf="dataSource">
|
||||
|
||||
@@ -53,49 +56,71 @@
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8 container" fxLayoutAlign="center" fxLayout="row wrap">
|
||||
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Entry ID' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountType">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Type' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountType.value }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountCode">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Code' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountCode }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountName">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Name' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountName }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="debit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Debit' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }} </span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="credit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Credit' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }} </span></td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="viewJournalEntry(row)" class="select-row"></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" class="m-t-15 m-b-15">
|
||||
<button type="button" color="primary" mat-raised-button (click)="goBack()">{{ 'labels.buttons.Back' | translate }}</button>
|
||||
</div>
|
||||
|
||||
<div class="mat-elevation-z8 container" fxLayoutAlign="center" fxLayout="row wrap">
|
||||
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Entry ID' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.id }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountType">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Type' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountType.value }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountCode">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Code' |
|
||||
translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountCode }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="glAccountName">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Account Name' |
|
||||
translate }} </th>
|
||||
<td mat-cell *matCellDef="let transaction"> {{ transaction.glAccountName }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="debit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Debit' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{
|
||||
(transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }}
|
||||
</span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="credit">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Credit' | translate }}
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{
|
||||
(transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | formatNumber }}
|
||||
</span></td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="viewJournalEntry(row)" class="select-row">
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" class="m-t-15 m-b-15">
|
||||
<button type="button" color="primary" mat-raised-button (click)="goBack()">{{ 'labels.buttons.Back' | translate
|
||||
}}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container m-b-20" *ngIf="!isJournalEntryLoaded">
|
||||
<div class="alert">
|
||||
<div class="message">
|
||||
<i class="fa fa-exclamation-circle alert-check"></i>
|
||||
{{"labels.text.No data found" | translate}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+8
-1
@@ -32,6 +32,8 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
/** Sorter for transaction table. */
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
|
||||
isJournalEntryLoaded = false;
|
||||
|
||||
/**
|
||||
* @param {AccountingService} accountingService Accounting Service.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -50,11 +52,16 @@ export class ViewJournalEntryTransactionComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe((data: { title: string, transaction: any, transferJournalEntryData: any }) => {
|
||||
this.title = data.title;
|
||||
this.isJournalEntryLoaded = false;
|
||||
if (this.isViewTransaction()) {
|
||||
this.transaction = data.transaction;
|
||||
this.transactionId = data.transaction.pageItems[0].transactionId;
|
||||
if (data.transaction.pageItems.length > 0) {
|
||||
this.isJournalEntryLoaded = true;
|
||||
this.transactionId = data.transaction.pageItems[0].transactionId;
|
||||
}
|
||||
} else if (this.isViewTransfer()) {
|
||||
this.journalEntriesData = data.transferJournalEntryData.journalEntryData.content;
|
||||
this.isJournalEntryLoaded = true;
|
||||
}
|
||||
this.setTransaction();
|
||||
});
|
||||
|
||||
@@ -105,7 +105,9 @@ import {
|
||||
faCoins,
|
||||
faPiggyBank,
|
||||
faFileExcel,
|
||||
faFileExport
|
||||
faFileExport,
|
||||
faCalculator,
|
||||
faCalendarCheck
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
/**
|
||||
@@ -124,13 +126,16 @@ export class IconsModule {
|
||||
faArchive,
|
||||
faArrowLeft,
|
||||
faArrowRight,
|
||||
faBan,
|
||||
faBars,
|
||||
faBell,
|
||||
faBook,
|
||||
faBriefcase,
|
||||
faBuilding,
|
||||
faCalculator,
|
||||
faCalendar,
|
||||
faCalendarAlt,
|
||||
faCalendarCheck,
|
||||
faChartBar,
|
||||
faCheck,
|
||||
faCheckCircle,
|
||||
|
||||
Reference in New Issue
Block a user