Set autosize and min two rows in textarea controls (#1604)
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
7bbab6423e
commit
475059a974
+7
-7
@@ -29,19 +29,19 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Description</mat-label>
|
||||
<textarea matInput formControlName="description"></textarea>
|
||||
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!collateralForm.valid"
|
||||
*mifosxHasPermission="'CREATE_COLLATERAL'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!collateralForm.valid"
|
||||
*mifosxHasPermission="'CREATE_COLLATERAL'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+6
-6
@@ -50,13 +50,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayoutGap="5px" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanChargeForm.valid"
|
||||
*mifosxHasPermission="'CREATE_LOANCHARGE'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayoutGap="5px" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanChargeForm.valid"
|
||||
*mifosxHasPermission="'CREATE_LOANCHARGE'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -42,18 +42,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!approveLoanForm.valid"
|
||||
*mifosxHasPermission="'APPROVE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!approveLoanForm.valid"
|
||||
*mifosxHasPermission="'APPROVE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+6
-6
@@ -33,13 +33,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!assignOfficerForm.valid"
|
||||
*mifosxHasPermission="'BULKREASSIGN_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!assignOfficerForm.valid"
|
||||
*mifosxHasPermission="'BULKREASSIGN_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -21,18 +21,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid"
|
||||
*mifosxHasPermission="'CLOSEASRESCHEDULED_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid"
|
||||
*mifosxHasPermission="'CLOSEASRESCHEDULED_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+6
-6
@@ -126,13 +126,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!newGuarantorForm.valid"
|
||||
*mifosxHasPermission="'CREATE_GUARANTOR'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!newGuarantorForm.valid"
|
||||
*mifosxHasPermission="'CREATE_GUARANTOR'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -37,18 +37,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!disbursementForm.valid"
|
||||
*mifosxHasPermission="'DISBURSETOSAVINGS_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!disbursementForm.valid"
|
||||
*mifosxHasPermission="'DISBURSETOSAVINGS_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@@ -42,14 +42,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">Show Payment Details</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="addPaymentDetails()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle [(ngModel)]="showPaymentDetails">
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">Show Payment Details</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -82,18 +80,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!disbursementLoanForm.valid"
|
||||
*mifosxHasPermission="'DISBURSE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!disbursementLoanForm.valid"
|
||||
*mifosxHasPermission="'DISBURSE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<div class="container mat-elevation-z8">
|
||||
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<mifosx-loans-account-schedule-step></mifosx-loans-account-schedule-step>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</div>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EditRepaymentScheduleComponent } from './edit-repayment-schedule.component';
|
||||
|
||||
describe('EditRepaymentScheduleComponent', () => {
|
||||
let component: EditRepaymentScheduleComponent;
|
||||
let fixture: ComponentFixture<EditRepaymentScheduleComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ EditRepaymentScheduleComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EditRepaymentScheduleComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-edit-repayment-schedule',
|
||||
templateUrl: './edit-repayment-schedule.component.html',
|
||||
styleUrls: ['./edit-repayment-schedule.component.scss']
|
||||
})
|
||||
export class EditRepaymentScheduleComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
+7
-7
@@ -46,18 +46,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!foreclosureForm.valid"
|
||||
*mifosxHasPermission="'FORECLOSURE_LOAN'">Foreclosure</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!foreclosureForm.valid"
|
||||
*mifosxHasPermission="'FORECLOSURE_LOAN'">Foreclosure</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
<mifosx-disburse [dataObject]="actionButtonData" *ngIf="actions['Disburse']"></mifosx-disburse>
|
||||
<mifosx-withdrawn-by-client *ngIf="actions['Withdrawn by Client']"></mifosx-withdrawn-by-client>
|
||||
<mifosx-add-collateral [dataObject]="actionButtonData" *ngIf="actions['Add Collateral']"></mifosx-add-collateral>
|
||||
<mifosx-undo-disbursal *ngIf="actions['Undo Disbursal']"></mifosx-undo-disbursal>
|
||||
<mifosx-undo-disbursal *ngIf="actions['Undo Disbursal'] || actions['Undo Last Disbursal']" [actionName]="actionName"></mifosx-undo-disbursal>
|
||||
<mifosx-loan-screen-reports [dataObject]="actionButtonData" *ngIf="actions['Loan Screen Reports']"></mifosx-loan-screen-reports>
|
||||
<mifosx-approve-loan *ngIf="actions['Approve']" ></mifosx-approve-loan>
|
||||
<mifosx-add-loan-charge *ngIf="actions['Add Loan Charge']"></mifosx-add-loan-charge>
|
||||
<mifosx-edit-repayment-schedule *ngIf="actions['Edit Repayment Schedule']"></mifosx-edit-repayment-schedule>
|
||||
|
||||
@@ -32,6 +32,7 @@ export class LoanAccountActionsComponent {
|
||||
'Disburse': boolean,
|
||||
'Withdrawn by Client': boolean,
|
||||
'Undo Disbursal': boolean,
|
||||
'Undo Last Disbursal': boolean,
|
||||
'Loan Screen Reports': boolean,
|
||||
'Approve': boolean,
|
||||
'Add Loan Charge': boolean,
|
||||
@@ -59,6 +60,7 @@ export class LoanAccountActionsComponent {
|
||||
'Disburse': false,
|
||||
'Withdrawn by Client': false,
|
||||
'Undo Disbursal': false,
|
||||
'Undo Last Disbursal': false,
|
||||
'Loan Screen Reports': false,
|
||||
'Approve': false,
|
||||
'Add Loan Charge': false,
|
||||
|
||||
+7
-7
@@ -34,18 +34,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!creditBalanceLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!creditBalanceLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+6
-6
@@ -92,13 +92,13 @@
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!rescheduleLoanForm.valid"
|
||||
*mifosxHasPermission="'APPROVE_RESCHEDULELOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!rescheduleLoanForm.valid"
|
||||
*mifosxHasPermission="'APPROVE_RESCHEDULELOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -22,14 +22,14 @@
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanScreenReportForm.valid">
|
||||
<fa-icon icon="cogs" size="sm"></fa-icon> Generate Report
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanScreenReportForm.valid">
|
||||
<fa-icon icon="cogs" size="sm"></fa-icon> Generate Report
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -21,18 +21,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid"
|
||||
*mifosxHasPermission="'CLOSE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!closeLoanForm.valid"
|
||||
*mifosxHasPermission="'CLOSE_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+13
-15
@@ -42,14 +42,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">Show Payment Details</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="addPaymentDetails()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle [(ngModel)]="showPaymentDetails">
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">Show Payment Details</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -82,18 +80,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!repaymentLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!repaymentLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+13
-15
@@ -55,14 +55,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">Show Payment Details</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="addPaymentDetails()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle [(ngModel)]="showPaymentDetails">
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">Show Payment Details</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -95,18 +93,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!prepayLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!prepayLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+13
-15
@@ -37,14 +37,12 @@
|
||||
</mat-form-field>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="25%">Show Payment Details</span>
|
||||
<span fxFlex="75%" class="expandcollapsebutton" (click)="addPaymentDetails()">
|
||||
<button mat-raised-button color="primary" *ngIf="showPaymentDetails">
|
||||
<i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<button mat-raised-button color="primary" *ngIf="!showPaymentDetails">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
<span fxFlex="75%" class="expandcollapsebutton m-l-10 m-t-40" (click)="addPaymentDetails()">
|
||||
<mat-slide-toggle [(ngModel)]="showPaymentDetails">
|
||||
<div [className]="showPaymentDetails ? 'enabled' : 'disabled'">
|
||||
<span class="m-l-10">Show Payment Details</span>
|
||||
</div>
|
||||
</mat-slide-toggle>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@@ -77,18 +75,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!recoveryRepaymentLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!recoveryRepaymentLoanForm.valid"
|
||||
*mifosxHasPermission="'REPAYMENT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -21,18 +21,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!rejectLoanForm.valid"
|
||||
*mifosxHasPermission="'REJECT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!rejectLoanForm.valid"
|
||||
*mifosxHasPermission="'REJECT_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+6
-6
@@ -9,13 +9,13 @@
|
||||
<textarea matInput [formControl]="note"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'APPROVALUNDO_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'APPROVALUNDO_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
|
||||
+7
-7
@@ -6,16 +6,16 @@
|
||||
|
||||
<mat-form-field fxFlex>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput [formControl]="note"></textarea>
|
||||
<textarea matInput [formControl]="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'DISBURSALUNDO_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'DISBURSALUNDO_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
|
||||
+8
-2
@@ -1,5 +1,5 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { FormControl, FormBuilder } from '@angular/forms';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
|
||||
@@ -16,6 +16,8 @@ import { LoansService } from '../../../loans.service';
|
||||
})
|
||||
export class UndoDisbursalComponent implements OnInit {
|
||||
|
||||
@Input() actionName: string;
|
||||
|
||||
/** Loan ID. */
|
||||
loanId: any;
|
||||
/** Undo disbursal form. */
|
||||
@@ -45,7 +47,11 @@ export class UndoDisbursalComponent implements OnInit {
|
||||
* Submits the undo disbursal form.
|
||||
*/
|
||||
submit() {
|
||||
this.loansService.loanActionButtons(this.loanId, 'undodisbursal', {'note': this.note.value}).subscribe((response: any) => {
|
||||
let command = 'undodisbursal';
|
||||
if (this.actionName === 'Undo Last Disbursal') {
|
||||
command = 'undolastdisbursal';
|
||||
}
|
||||
this.loansService.loanActionButtons(this.loanId, command, {'note': this.note.value}).subscribe((response: any) => {
|
||||
this.router.navigate(['../../general'], { relativeTo: this.route });
|
||||
});
|
||||
}
|
||||
|
||||
+7
-7
@@ -29,18 +29,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanInterestForm.valid"
|
||||
*mifosxHasPermission="'WAIVEINTERESTPORTION_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!loanInterestForm.valid"
|
||||
*mifosxHasPermission="'WAIVEINTERESTPORTION_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -21,18 +21,18 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!withdrawnByClientLoanForm.valid"
|
||||
*mifosxHasPermission="'WITHDRAW_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" [disabled]="!withdrawnByClientLoanForm.valid"
|
||||
*mifosxHasPermission="'WITHDRAW_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
+7
-7
@@ -26,20 +26,20 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-label>Note</mat-label>
|
||||
<textarea matInput formControlName="note"></textarea>
|
||||
<textarea matInput formControlName="note" cdkTextareaAutosize cdkAutosizeMinRows="2"></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'WRITEOFF_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
|
||||
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
|
||||
<button type="button" mat-raised-button [routerLink]="['../../general']">Cancel</button>
|
||||
<button mat-raised-button color="primary" (click)="submit()"
|
||||
*mifosxHasPermission="'WRITEOFF_LOAN'">Submit</button>
|
||||
</mat-card-actions>
|
||||
</mat-card-content>
|
||||
|
||||
</mat-card>
|
||||
|
||||
|
||||
@@ -40,22 +40,22 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Add Loan Charge',
|
||||
icon: 'fa fa-plus',
|
||||
icon: 'plus',
|
||||
taskPermissionName: 'CREATE_LOANCHARGE',
|
||||
},
|
||||
{
|
||||
name: 'Foreclosure',
|
||||
icon: 'icon-dollar',
|
||||
icon: 'heart-broken',
|
||||
taskPermissionName: 'FORECLOSURE_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Make Repayment',
|
||||
icon: 'fa fa-dollar',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'REPAYMENT_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Undo Disbursal',
|
||||
icon: 'fa fa-undo',
|
||||
icon: 'undo',
|
||||
taskPermissionName: 'DISBURSALUNDO_LOAN',
|
||||
}
|
||||
];
|
||||
@@ -64,22 +64,22 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Add Loan Charge',
|
||||
icon: 'fa fa-plus',
|
||||
icon: 'plus',
|
||||
taskPermissionName: 'CREATE_LOANCHARGE',
|
||||
},
|
||||
{
|
||||
name: 'Approve',
|
||||
icon: 'fa fa-check',
|
||||
icon: 'check',
|
||||
taskPermissionName: 'APPROVE_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Modify Application',
|
||||
icon: 'fa fa-pincel-square-o',
|
||||
icon: 'edit',
|
||||
taskPermissionName: 'UPDATE_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Reject',
|
||||
icon: 'fa fa-times',
|
||||
icon: 'times',
|
||||
taskPermissionName: 'REJECT_LOAN',
|
||||
},
|
||||
];
|
||||
@@ -88,17 +88,17 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Disburse',
|
||||
icon: 'fa fa-flag',
|
||||
icon: 'hand-holding-usd',
|
||||
taskPermissionName: 'DISBURSE_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Disburse to Savings',
|
||||
icon: 'fa fa-flag',
|
||||
icon: 'piggy-bank',
|
||||
taskPermissionName: 'DISBURSETOSAVINGS_LOAN',
|
||||
},
|
||||
{
|
||||
name: 'Undo Approval',
|
||||
icon: 'fa fa-undo',
|
||||
icon: 'undo',
|
||||
taskPermissionName: 'APPROVALUNDO_LOAN',
|
||||
},
|
||||
];
|
||||
@@ -107,12 +107,12 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Transfer Funds',
|
||||
icon: 'fa fa-exchange',
|
||||
icon: 'exchange',
|
||||
taskPermissionName: 'CREATE_ACCOUNTTRANSFER',
|
||||
},
|
||||
{
|
||||
name: 'Credit Balance Refund',
|
||||
icon: 'fa fa-dollar',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CREATE_CREDIT_BALANCE_REFUND',
|
||||
}
|
||||
];
|
||||
@@ -121,7 +121,7 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Recovery Payment',
|
||||
icon: 'fa fa-briefcase',
|
||||
icon: 'briefcase',
|
||||
taskPermissionName: 'RECOVERYPAYMENT_LOAN',
|
||||
},
|
||||
];
|
||||
@@ -130,17 +130,17 @@ export class LoansAccountButtonConfiguration {
|
||||
this.buttonsArray = [
|
||||
{
|
||||
name: 'Goodwill Credit',
|
||||
icon: 'fa fa-dollar',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CREATE_GOODWILL_TRANSACTION',
|
||||
},
|
||||
{
|
||||
name: 'Payout Refund',
|
||||
icon: 'fa fa-dollar',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CREATE_PAYOUT_REFUND',
|
||||
},
|
||||
{
|
||||
name: 'Merchant Issued Refund',
|
||||
icon: 'fa fa-dollar',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'CREATE_MERCHANT_ISSUED_REFUND',
|
||||
}
|
||||
];
|
||||
|
||||
@@ -15,72 +15,87 @@
|
||||
<mat-card-title>
|
||||
<div fxLayout="row" fxLayout.lt-md="column">
|
||||
|
||||
<div fxFlex="50%">
|
||||
<div fxFlex="60%">
|
||||
<h3>
|
||||
<i class="fa fa-stop" matTooltip="{{ loanDetailsData.status.value }}"
|
||||
[ngClass]="loanDetailsData.inArrears?'status-active-overdue':(loanDetailsData.status.code|statusLookup)"></i>
|
||||
Loan Product: {{loanDetailsData.loanProductName}}(#{{loanDetailsData.accountNo}})
|
||||
<br />
|
||||
<span *ngIf="loanDetailsData.clientName"> Client Name: {{loanDetailsData.clientName}} </span> <br />
|
||||
<span *ngIf="loanDetailsData.group"> Group Name: {{loanDetailsData.group.name}} </span>
|
||||
<span *ngIf="loanDetailsData.delinquencyRange">
|
||||
Loan Account Classification : {{loanDetailsData?.delinquencyRange.classification}}
|
||||
</span> <br />
|
||||
<span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0">
|
||||
Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | number}}
|
||||
</span> <br />
|
||||
<span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
|
||||
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
|
||||
Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | number}}
|
||||
</span>
|
||||
Loan Product: {{loanDetailsData.loanProductName}}<span class="m-l-10">({{loanDetailsData.accountNo}})</span>
|
||||
</h3>
|
||||
<span class="loans-overview">
|
||||
{{entityType}} Name: {{loanDetailsData.clientName ||
|
||||
loanDetailsData.groupName}}<span class="m-l-10">({{loanDetailsData.clientAccountNo}})</span><br />
|
||||
</span>
|
||||
<span class="loans-overview" *ngIf="loanDetailsData.delinquencyRange">
|
||||
Loan Account Classification : {{loanDetailsData?.delinquencyRange.classification}}<br />
|
||||
</span>
|
||||
<span class="loans-overview"
|
||||
*ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.pastDueDays > 0">
|
||||
Past Due Days : {{loanDetailsData?.delinquent.pastDueDays | number}}<br />
|
||||
</span>
|
||||
<span class="loans-overview" *ngIf="loanDetailsData.delinquent && loanDetailsData.delinquent.delinquentDays > 0
|
||||
&& loanDetailsData.delinquent.pastDueDays != loanDetailsData.delinquent.delinquentDays">
|
||||
Delinquent Days : {{loanDetailsData?.delinquent.delinquentDays | number}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="loanDetailsData.summary" class="loans-overview mat-typography" fxFlex="50%">
|
||||
<div *ngIf="loanDetailsData.summary" class="loans-overview mat-typography" fxFlex="40%">
|
||||
<h3> Loan Account OverView </h3>
|
||||
<span>Current Balance: {{loanDetailsData.currency.displaySymbol}}
|
||||
{{loanDetailsData.summary.totalOutstanding | number}}</span><br>
|
||||
<span *ngIf="loanDetailsData.inArrears">Arrears By: {{loanDetailsData.summary.totalOverdue | number}}
|
||||
<span *ngIf="!(loanDetailsData.summary.totalOverdue>=0)">Not Provided</span>
|
||||
</span><br>
|
||||
<span *ngIf="loanDetailsData.inArrears">Arrears Since: {{loanDetailsData.summary.overdueSinceDate | dateFormat}}
|
||||
</span><br>
|
||||
<span *ngIf="loanDetailsData.inArrears">Arrears Since: {{loanDetailsData.summary.overdueSinceDate |
|
||||
dateFormat}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div fxFlex="4%">
|
||||
<button mat-icon-button [matMenuTriggerFor]="accountMenu" aria-label="Loan account actions"
|
||||
yPosition="below">
|
||||
<mat-icon matListIcon class="actions-menu">
|
||||
<fa-icon icon="bars" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</mat-card-title>
|
||||
</div>
|
||||
|
||||
<mat-menu #accountMenu="matMenu">
|
||||
<ng-container *ngFor="let item of buttonConfig.singleButtons">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName" (click)="loanAction(item.name)">
|
||||
<mat-icon matListIcon>
|
||||
<fa-icon icon="{{item.icon}}" size="sm"></fa-icon>
|
||||
</mat-icon>
|
||||
<span> {{item.name}} </span>
|
||||
</button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.optionsPayment.length" class="loan-span">
|
||||
<button mat-menu-item [matMenuTriggerFor]="Payments">Payments</button>
|
||||
<mat-menu #Payments="matMenu">
|
||||
<span *ngFor="let item of buttonConfig.optionsPayment">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName"
|
||||
(click)="loanAction(item.name)">{{item.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length" class="loan-span">
|
||||
<button mat-menu-item [matMenuTriggerFor]="More">More</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let item of buttonConfig.options">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName"
|
||||
(click)="loanAction(item.name)">{{item.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
</mat-menu>
|
||||
|
||||
</mat-card-title-group>
|
||||
|
||||
<mat-card-actions class="loan-actions">
|
||||
|
||||
<ng-container *ngFor="let item of buttonConfig.singleButtons" class="loan-span">
|
||||
<button mat-raised-button *mifosxHasPermission="item.taskPermissionName" (click)="loanAction(item.name)">
|
||||
<i ng-class="{{item.icon}}"></i> {{item.name}} </button>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.optionsPayment.length" class="loan-span">
|
||||
<button mat-raised-button [matMenuTriggerFor]="Payments">Payments</button>
|
||||
<mat-menu #Payments="matMenu">
|
||||
<span *ngFor="let item of buttonConfig.optionsPayment">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName"
|
||||
(click)="loanAction(item.name)">{{item.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="buttonConfig.options.length" class="loan-span">
|
||||
<button mat-raised-button [matMenuTriggerFor]="More">More</button>
|
||||
<mat-menu #More="matMenu">
|
||||
<span *ngFor="let item of buttonConfig.options">
|
||||
<button mat-menu-item *mifosxHasPermission="item.taskPermissionName"
|
||||
(click)="loanAction(item.name)">{{item.name}}</button>
|
||||
</span>
|
||||
</mat-menu>
|
||||
</ng-container>
|
||||
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card-header>
|
||||
|
||||
<mat-card-content>
|
||||
|
||||
@@ -28,12 +28,15 @@ export class LoansViewComponent implements OnInit {
|
||||
recalculateInterest: any;
|
||||
/** Status */
|
||||
status: string;
|
||||
entityType: string;
|
||||
/** Loan Id */
|
||||
loanId: number;
|
||||
/** Client Id */
|
||||
clientId: any;
|
||||
clientId: number;
|
||||
/** Button Configuration */
|
||||
buttonConfig: LoansAccountButtonConfiguration;
|
||||
/** Disburse Transaction number */
|
||||
disburseTransactionNo = 0;
|
||||
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
@@ -51,6 +54,21 @@ export class LoansViewComponent implements OnInit {
|
||||
this.recalculateInterest = this.loanDetailsData.recalculateInterest || true;
|
||||
this.status = this.loanDetailsData.status.value;
|
||||
this.setConditionalButtons();
|
||||
|
||||
if (this.loanDetailsData.multiDisburseLoan) {
|
||||
this.loanDetailsData.transactions.forEach((tranaction: any) => {
|
||||
if (tranaction.type.disbursement) {
|
||||
this.disburseTransactionNo++;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.router.url.includes('clients')) {
|
||||
this.entityType = 'Client';
|
||||
} else if (this.router.url.includes('groups')) {
|
||||
this.entityType = 'Group';
|
||||
} else if (this.router.url.includes('centers')) {
|
||||
this.entityType = 'Center';
|
||||
}
|
||||
}
|
||||
|
||||
// Defines the buttons based on the status of the loan account
|
||||
@@ -61,12 +79,14 @@ export class LoansViewComponent implements OnInit {
|
||||
|
||||
this.buttonConfig.addOption({
|
||||
name: (this.loanDetailsData.loanOfficerName ? 'Change Loan Officer' : 'Assign Loan Officer'),
|
||||
icon: 'user-tie',
|
||||
taskPermissionName: 'DISBURSE_LOAN'
|
||||
});
|
||||
|
||||
if (this.loanDetailsData.isVariableInstallmentsAllowed) {
|
||||
this.buttonConfig.addOption({
|
||||
name: 'Edit Repayment Schedule',
|
||||
icon: 'edit',
|
||||
taskPermissionName: 'ADJUST_REPAYMENT_SCHEDULE'
|
||||
});
|
||||
}
|
||||
@@ -75,7 +95,7 @@ export class LoansViewComponent implements OnInit {
|
||||
|
||||
this.buttonConfig.addButton({
|
||||
name: (this.loanDetailsData.loanOfficerName ? 'Change Loan Officer' : 'Assign Loan Officer'),
|
||||
icon: 'fa fa-user',
|
||||
icon: 'user-tie',
|
||||
taskPermissionName: 'DISBURSE_LOAN'
|
||||
});
|
||||
|
||||
@@ -83,24 +103,30 @@ export class LoansViewComponent implements OnInit {
|
||||
if (this.loanDetailsData.canDisburse || this.loanDetailsData.multiDisburseLoan) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Disburse',
|
||||
icon: 'fa fa-flag',
|
||||
icon: 'hand-holding-usd',
|
||||
taskPermissionName: 'DISBURSE_LOAN'
|
||||
});
|
||||
}
|
||||
if (this.loanDetailsData.canDisburse) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Disburse To Savings',
|
||||
icon: 'fa fa-flag',
|
||||
icon: 'piggy-bank',
|
||||
taskPermissionName: 'DISBURSETOSAVINGS_LOAN'
|
||||
});
|
||||
}
|
||||
|
||||
if (this.loanDetailsData.multiDisburseLoan && this.disburseTransactionNo > 1) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Undo Last Disbursal',
|
||||
icon: 'undo',
|
||||
taskPermissionName: 'DISBURSALLASTUNDO_LOAN'
|
||||
});
|
||||
}
|
||||
// loan officer not assigned to loan, below logic
|
||||
// helps to display otherwise not
|
||||
if (!this.loanDetailsData.loanOfficerName) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Assign Loan Officer',
|
||||
icon: 'fa fa-user',
|
||||
icon: 'user-tie',
|
||||
taskPermissionName: 'UPDATELOANOFFICER_LOAN'
|
||||
});
|
||||
}
|
||||
@@ -108,7 +134,7 @@ export class LoansViewComponent implements OnInit {
|
||||
if (this.recalculateInterest) {
|
||||
this.buttonConfig.addButton({
|
||||
name: 'Prepay Loan',
|
||||
icon: 'fa fa-money',
|
||||
icon: 'coins',
|
||||
taskPermissionName: 'REPAYMENT_LOAN'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ import { LoanAccountLoadDocumentsDialogComponent } from './custom-dialog/loan-ac
|
||||
import { LoanCreditBalanceRefundComponent } from './loans-view/loan-account-actions/loan-credit-balance-refund/loan-credit-balance-refund.component';
|
||||
import { LoanDelinquencyTagsTabComponent } from './loans-view/loan-delinquency-tags-tab/loan-delinquency-tags-tab.component';
|
||||
import { LoansAccountScheduleStepComponent } from './loans-account-stepper/loans-account-schedule-step/loans-account-schedule-step.component';
|
||||
import { EditRepaymentScheduleComponent } from './loans-view/loan-account-actions/edit-repayment-schedule/edit-repayment-schedule.component';
|
||||
|
||||
/**
|
||||
* Loans Module
|
||||
@@ -144,7 +145,8 @@ import { LoansAccountScheduleStepComponent } from './loans-account-stepper/loans
|
||||
GlimTermsStepComponent,
|
||||
GlimPreviewStepComponent,
|
||||
LoanDelinquencyTagsTabComponent,
|
||||
LoansAccountScheduleStepComponent
|
||||
LoansAccountScheduleStepComponent,
|
||||
EditRepaymentScheduleComponent
|
||||
],
|
||||
providers: [ ],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user