GL view transaction enhanced (#1645)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
d714eee1a7
commit
b6c5f0e41e
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mat-elevation-z8 container">
|
<div class="mat-elevation-z8 container" fxLayoutAlign="center" fxLayout="row wrap">
|
||||||
|
|
||||||
<table mat-table [dataSource]="dataSource" matSort>
|
<table mat-table [dataSource]="dataSource" matSort>
|
||||||
|
|
||||||
@@ -80,13 +80,13 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="debit">
|
<ng-container matColumnDef="debit">
|
||||||
<th mat-header-cell class="r-amount" *matHeaderCellDef mat-sort-header> Debit </th>
|
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Debit </th>
|
||||||
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
|
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'DEBIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | number }} </span></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="credit">
|
<ng-container matColumnDef="credit">
|
||||||
<th mat-header-cell class="r-amount" *matHeaderCellDef mat-sort-header> Credit </th>
|
<th mat-header-cell class="center" *matHeaderCellDef mat-sort-header> Credit </th>
|
||||||
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) + ' ' + transaction.amount }} </span></td>
|
<td mat-cell class="r-amount" *matCellDef="let transaction"><span *ngIf="transaction.entryType.value === 'CREDIT'"> {{ (transaction.currency.displaySymbol || transaction.currency.code) }} {{ transaction.amount | number }} </span></td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
@@ -94,9 +94,8 @@
|
|||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<mat-paginator [pageSizeOptions]="[5, 10]" showFirstLastButtons></mat-paginator>
|
<div fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column" class="action-bar">
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
|
|
||||||
<button type="button" color="primary" mat-raised-button (click)="goBack()">Back</button>
|
<button type="button" color="primary" mat-raised-button (click)="goBack()">Back</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,9 +13,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
width: 100%;
|
width: 98%;
|
||||||
|
|
||||||
.select-row:hover {
|
.select-row:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.action-bar {
|
||||||
|
width: 98%;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 15px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|||||||
+4
-1
@@ -67,7 +67,7 @@ export class LoansAccountChargesStepComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.loansAccountTemplate.charges) {
|
if (this.loansAccountTemplate && this.loansAccountTemplate.charges) {
|
||||||
this.chargesDataSource = this.loansAccountTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || [];
|
this.chargesDataSource = this.loansAccountTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,6 +81,9 @@ export class LoansAccountChargesStepComponent implements OnInit, OnChanges {
|
|||||||
if (this.loansAccountProductTemplate.overdueCharges) {
|
if (this.loansAccountProductTemplate.overdueCharges) {
|
||||||
this.overDueChargesDataSource = this.loansAccountProductTemplate.overdueCharges;
|
this.overDueChargesDataSource = this.loansAccountProductTemplate.overdueCharges;
|
||||||
}
|
}
|
||||||
|
if (this.loansAccountProductTemplate.charges) {
|
||||||
|
this.chargesDataSource = this.loansAccountProductTemplate.charges.map((charge: any) => ({ ...charge, id: charge.chargeId })) || [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -21,7 +21,7 @@ export class CreateTaxComponentComponent implements OnInit {
|
|||||||
/** Minimum start date allowed. */
|
/** Minimum start date allowed. */
|
||||||
minDate = new Date();
|
minDate = new Date();
|
||||||
/** Maximum start date allowed. */
|
/** Maximum start date allowed. */
|
||||||
maxDate = new Date(new Date().setFullYear(new Date().getFullYear() + 10));
|
maxDate = new Date();
|
||||||
/** Tax Component form. */
|
/** Tax Component form. */
|
||||||
taxComponentForm: FormGroup;
|
taxComponentForm: FormGroup;
|
||||||
/** Tax Component template data. */
|
/** Tax Component template data. */
|
||||||
@@ -59,6 +59,8 @@ export class CreateTaxComponentComponent implements OnInit {
|
|||||||
* Creates the tax Component form
|
* Creates the tax Component form
|
||||||
*/
|
*/
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.minDate = this.settingsService.minAllowedDate;
|
||||||
|
this.maxDate = this.settingsService.maxAllowedDate;
|
||||||
this.createTaxComponentForm();
|
this.createTaxComponentForm();
|
||||||
this.setConditionalControls();
|
this.setConditionalControls();
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -22,21 +22,21 @@
|
|||||||
<mat-error *ngIf="taxComponentForm.controls.name.hasError('required')">
|
<mat-error *ngIf="taxComponentForm.controls.name.hasError('required')">
|
||||||
Percentage is <strong>required</strong>
|
Percentage is <strong>required</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="taxComponentData.creditAccountType.value">
|
<mat-form-field *ngIf="taxComponentData.creditAccountType.value">
|
||||||
<mat-label>Credit Account Type</mat-label>
|
<mat-label>Credit Account Type</mat-label>
|
||||||
<input matInput formControlName="creditAccountType">
|
<input matInput formControlName="creditAccountType">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="taxComponentData.creditAccount.name">
|
<mat-form-field *ngIf="taxComponentData.creditAccount.name">
|
||||||
<mat-label>Credit Account</mat-label>
|
<mat-label>Credit Account</mat-label>
|
||||||
<input matInput formControlName="creditAccount">
|
<input matInput formControlName="creditAccount">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field (click)="startDatePicker.open()">
|
<mat-form-field (click)="startDatePicker.open()">
|
||||||
<mat-label>Start Date</mat-label>
|
<mat-label>Start Date</mat-label>
|
||||||
<input matInput [min]="minDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
|
<input matInput [min]="minDate" [max]="maxDate" [matDatepicker]="startDatePicker" required formControlName="startDate">
|
||||||
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
<mat-datepicker-toggle matSuffix [for]="startDatePicker"></mat-datepicker-toggle>
|
||||||
<mat-datepicker #startDatePicker></mat-datepicker>
|
<mat-datepicker #startDatePicker></mat-datepicker>
|
||||||
<mat-error *ngIf="taxComponentForm.controls.startDate.hasError('required')">
|
<mat-error *ngIf="taxComponentForm.controls.startDate.hasError('required')">
|
||||||
|
|||||||
+4
@@ -20,6 +20,8 @@ export class EditTaxComponentComponent implements OnInit {
|
|||||||
|
|
||||||
/** Minimum date allowed. */
|
/** Minimum date allowed. */
|
||||||
minDate = new Date(2000, 0, 1);
|
minDate = new Date(2000, 0, 1);
|
||||||
|
/** Maximum start date allowed. */
|
||||||
|
maxDate = new Date();
|
||||||
/** Tax Component form. */
|
/** Tax Component form. */
|
||||||
taxComponentForm: FormGroup;
|
taxComponentForm: FormGroup;
|
||||||
/** Tax Component data. */
|
/** Tax Component data. */
|
||||||
@@ -49,6 +51,8 @@ export class EditTaxComponentComponent implements OnInit {
|
|||||||
* Creates the edit tax component form.
|
* Creates the edit tax component form.
|
||||||
*/
|
*/
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.minDate = this.settingsService.minAllowedDate;
|
||||||
|
this.maxDate = this.settingsService.maxAllowedDate;
|
||||||
this.editTaxComponent();
|
this.editTaxComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -26,7 +26,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="50%">
|
<div fxFlex="50%">
|
||||||
{{ taxComponentData.percentage }}
|
{{ taxComponentData.percentage | number }} %
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div fxFlex="50%" class="mat-body-strong" *ngIf="taxComponentData.debitAccountType">
|
<div fxFlex="50%" class="mat-body-strong" *ngIf="taxComponentData.debitAccountType">
|
||||||
@@ -73,6 +73,9 @@
|
|||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|
||||||
|
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||||
|
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">Back</button>
|
||||||
|
</div>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export class SettingsService {
|
|||||||
public static businessDateConfigName = 'enable_business_date';
|
public static businessDateConfigName = 'enable_business_date';
|
||||||
public static businessDateType = 'BUSINESS_DATE';
|
public static businessDateType = 'BUSINESS_DATE';
|
||||||
public static cobDateType = 'COB_DATE';
|
public static cobDateType = 'COB_DATE';
|
||||||
|
minAllowedDate = new Date(1950, 0, 1);
|
||||||
maxAllowedDate = new Date(2100, 0, 1);
|
maxAllowedDate = new Date(2100, 0, 1);
|
||||||
|
|
||||||
constructor(private alertService: AlertService,
|
constructor(private alertService: AlertService,
|
||||||
@@ -150,6 +151,13 @@ export class SettingsService {
|
|||||||
return localStorage.getItem('mifosXServerBusinessDateEnabled');
|
return localStorage.getItem('mifosXServerBusinessDateEnabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns min Past date
|
||||||
|
*/
|
||||||
|
get minPastDate(): Date {
|
||||||
|
return this.minAllowedDate;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns max Future date
|
* Returns max Future date
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
export const appTableData: { displayValue: string, value: string }[] = [
|
export const appTableData: { displayValue: string, value: string }[] = [
|
||||||
{ displayValue: 'Client', value: 'm_client' },
|
{ displayValue: 'Client', value: 'm_client' },
|
||||||
{ displayValue: 'Group', value: 'm_group' },
|
{ displayValue: 'Group', value: 'm_group' },
|
||||||
{ displayValue: 'Loan', value: 'm_loan' },
|
|
||||||
{ displayValue: 'Center', value: 'm_center' },
|
{ displayValue: 'Center', value: 'm_center' },
|
||||||
{ displayValue: 'Office', value: 'm_office' },
|
{ displayValue: 'Office', value: 'm_office' },
|
||||||
|
{ displayValue: 'Loan Account', value: 'm_loan' },
|
||||||
{ displayValue: 'Saving Account', value: 'm_savings_account' },
|
{ displayValue: 'Saving Account', value: 'm_savings_account' },
|
||||||
{ displayValue: 'Product Loan', value: 'm_product_loan' },
|
{ displayValue: 'Loan Product', value: 'm_product_loan' },
|
||||||
{ displayValue: 'Savings Product', value: 'm_savings_product' }
|
{ displayValue: 'Savings Product', value: 'm_savings_product' },
|
||||||
|
{ displayValue: 'Share Product', value: 'm_share_product' }
|
||||||
];
|
];
|
||||||
|
|
||||||
export const entitySubTypeData: { displayValue: string, value: string }[] = [
|
export const entitySubTypeData: { displayValue: string, value: string }[] = [
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
.r-amount {
|
.r-amount {
|
||||||
text-align: right !important;
|
text-align: right !important;
|
||||||
padding-right: 5px;
|
padding-right: 5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
@@ -31,9 +31,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.amount-plus {
|
.amount-plus {
|
||||||
color: #000000;
|
color: $black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.amount-minus {
|
.amount-minus {
|
||||||
color: #0f36e4;
|
color: $status-approved;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@import "align";
|
|
||||||
@import "background";
|
@import "background";
|
||||||
@import "border";
|
@import "border";
|
||||||
@import "colours";
|
@import "colours";
|
||||||
|
@import "align";
|
||||||
@import "display";
|
@import "display";
|
||||||
@import "float";
|
@import "float";
|
||||||
@import "form";
|
@import "form";
|
||||||
|
|||||||
Reference in New Issue
Block a user