-
- Transaction Type:
- {{ paymentAllocation.transactionType }}
-
-
-
- Future Installment Allocation:
- {{ paymentAllocation.futureInstallmentAllocationRule }}
-
-
-
-
Payment Allocation Order
-
-
-
-
- | Payment Allocation Rule |
- Order |
-
-
-
-
- | {{ paymentAllocation.paymentAllocationRule }} |
- {{ (idx + 1) }} |
-
-
-
-
-
-
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.scss b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.scss
index 87258dacb..40f3944d7 100644
--- a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.scss
+++ b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.scss
@@ -1,3 +1,5 @@
+@import "assets/styles/colours";
+
table {
width: 100%;
}
@@ -22,3 +24,7 @@ mat-divider {
.margin-t {
margin-top: 1em;
}
+
+.repayment-strategy {
+ color: $status-approved;
+}
diff --git a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.ts b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.ts
index 6fdda9a55..e6884c25e 100644
--- a/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.ts
+++ b/src/app/products/loan-products/loan-product-stepper/loan-product-preview-step/loan-product-preview-step.component.ts
@@ -1,11 +1,11 @@
-import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
+import { Component, OnInit, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
@Component({
selector: 'mifosx-loan-product-preview-step',
templateUrl: './loan-product-preview-step.component.html',
styleUrls: ['./loan-product-preview-step.component.scss']
})
-export class LoanProductPreviewStepComponent implements OnInit {
+export class LoanProductPreviewStepComponent implements OnInit, OnChanges {
@Input() loanProductsTemplate: any;
@Input() accountingRuleData: any;
@@ -17,9 +17,16 @@ export class LoanProductPreviewStepComponent implements OnInit {
paymentFundSourceDisplayedColumns: string[] = ['paymentTypeId', 'fundSourceAccountId'];
feesPenaltyIncomeDisplayedColumns: string[] = ['chargeId', 'incomeAccountId'];
+ isAdvancedPaymentAllocation = false;
+
constructor() { }
ngOnInit() {
+ this.isAdvancedPaymentAllocation = (this.loanProduct.transactionProcessingStrategyCode === 'advanced-payment-allocation-strategy');
+ }
+
+ ngOnChanges(changes: SimpleChanges): void {
+ this.isAdvancedPaymentAllocation = (this.loanProduct.transactionProcessingStrategyCode === 'advanced-payment-allocation-strategy');
}
}
diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html
index e9431490c..6810658e7 100644
--- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html
+++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.html
@@ -328,41 +328,18 @@
Repayment Strategy:
- {{ loanProduct.transactionProcessingStrategyName }}
+ {{ loanProduct.transactionProcessingStrategyName }}
-
-
- Transaction Type:
- {{ paymentAllocation.transactionType }}
-
-
-
- Future Installment Allocation:
- {{ paymentAllocation.futureInstallmentAllocationRule }}
-
-
-
-
Payment Allocation Order
-
-
-
-
- | Payment Allocation Rule |
- Order |
-
-
-
-
- | {{ paymentAllocation.paymentAllocationRule }} |
- {{ (idx + 1) }} |
-
-
-
-
-
-
+
Advanced Payment Allocation Transactions:
+
+
+
+
+
+
diff --git a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss
index fafc40cc8..9135adef8 100644
--- a/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss
+++ b/src/app/products/loan-products/view-loan-product/general-tab/general-tab.component.scss
@@ -20,3 +20,7 @@
font-weight: 200;
color: $status-approved;
}
+
+.repayment-strategy {
+ color: $status-approved;
+}
diff --git a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html
new file mode 100644
index 000000000..2d242ee34
--- /dev/null
+++ b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.html
@@ -0,0 +1,42 @@
+
+
+
+
+ Transaction Type:
+ {{ paymentAllocation.transactionType }}
+
+
+
+
+
+
+ Transaction Type:
+ {{ paymentAllocation.transactionType }}
+
+
+
+ Future Installment Allocation:
+ {{ paymentAllocation.futureInstallmentAllocationRule }}
+
+
+
+
Payment Allocation Order
+
+
+
+
+ | Payment Allocation Rule |
+ Order |
+
+
+
+
+ | {{ paymentAllocation.paymentAllocationRule }} |
+ {{ (idx + 1) }} |
+
+
+
+
+
+
+
diff --git a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.scss b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.scss
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.scss
@@ -0,0 +1 @@
+
diff --git a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.spec.ts b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.spec.ts
new file mode 100644
index 000000000..9a9ee51e5
--- /dev/null
+++ b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ViewAdvancePaymenyAllocationComponent } from './view-advance-paymeny-allocation.component';
+
+describe('ViewAdvancePaymenyAllocationComponent', () => {
+ let component: ViewAdvancePaymenyAllocationComponent;
+ let fixture: ComponentFixture
;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ViewAdvancePaymenyAllocationComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(ViewAdvancePaymenyAllocationComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.ts b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.ts
new file mode 100644
index 000000000..c69685ffe
--- /dev/null
+++ b/src/app/products/loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component.ts
@@ -0,0 +1,18 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { PaymentAllocation } from 'app/products/loan-products/loan-product-stepper/loan-product-payment-strategy-step/payment-allocation-model';
+
+@Component({
+ selector: 'mifosx-view-advance-paymeny-allocation',
+ templateUrl: './view-advance-paymeny-allocation.component.html',
+ styleUrls: ['./view-advance-paymeny-allocation.component.scss']
+})
+export class ViewAdvancePaymenyAllocationComponent implements OnInit {
+
+ @Input() paymentAllocation: PaymentAllocation;
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}
diff --git a/src/app/products/products.module.ts b/src/app/products/products.module.ts
index d9baef068..57ba92d0e 100644
--- a/src/app/products/products.module.ts
+++ b/src/app/products/products.module.ts
@@ -117,6 +117,8 @@ import { RecurringDepositGeneralTabComponent } from './recurring-deposit-product
import { ShareProductGeneralTabComponent } from './share-products/view-share-product/share-product-general-tab/share-product-general-tab.component';
import { ShareProductDatatableTabComponent } from './share-products/view-share-product/share-product-datatable-tab/share-product-datatable-tab.component';
import { LoanProductPaymentStrategyStepComponent } from './loan-products/loan-product-stepper/loan-product-payment-strategy-step/loan-product-payment-strategy-step.component';
+import { ViewAdvancePaymenyAllocationComponent } from './loan-products/view-loan-product/shared/view-advance-paymeny-allocation/view-advance-paymeny-allocation.component';
+import { AdvancePaymentAllocationTabComponent } from './loan-products/loan-product-stepper/loan-product-payment-strategy-step/advance-payment-allocation-tab/advance-payment-allocation-tab.component';
/**
* Products Module
@@ -241,7 +243,9 @@ import { LoanProductPaymentStrategyStepComponent } from './loan-products/loan-pr
RecurringDepositDatatableTabComponent,
RecurringDepositGeneralTabComponent,
ShareProductGeneralTabComponent,
- ShareProductDatatableTabComponent
+ ShareProductDatatableTabComponent,
+ ViewAdvancePaymenyAllocationComponent,
+ AdvancePaymentAllocationTabComponent
]
})
export class ProductsModule { }
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index 7a7deb492..1aba36c84 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -42,6 +42,7 @@ import { ViewJournalEntryTransactionComponent } from './accounting/view-journal-
import { AccountNumberComponent } from './account-number/account-number.component';
import { EntityNameComponent } from './entity-name/entity-name.component';
import { TransactionPaymentDetailComponent } from './transaction-payment-detail/transaction-payment-detail.component';
+import { StepperButtonsComponent } from './steppers/stepper-buttons/stepper-buttons.component';
/**
* Shared Module
@@ -90,7 +91,8 @@ import { TransactionPaymentDetailComponent } from './transaction-payment-detail/
ViewJournalEntryTransactionComponent,
AccountNumberComponent,
EntityNameComponent,
- TransactionPaymentDetailComponent
+ TransactionPaymentDetailComponent,
+ StepperButtonsComponent
],
exports: [
FileUploadComponent,
@@ -117,7 +119,8 @@ import { TransactionPaymentDetailComponent } from './transaction-payment-detail/
ViewJournalEntryTransactionComponent,
SvgIconComponent,
EntityNameComponent,
- TransactionPaymentDetailComponent
+ TransactionPaymentDetailComponent,
+ StepperButtonsComponent
]
})
export class SharedModule { }
diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html
new file mode 100644
index 000000000..8dbdc4869
--- /dev/null
+++ b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.html
@@ -0,0 +1,11 @@
+
+
+
+
+
diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.scss b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.scss
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.spec.ts b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.spec.ts
new file mode 100644
index 000000000..77d17703f
--- /dev/null
+++ b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { StepperButtonsComponent } from './stepper-buttons.component';
+
+describe('StepperButtonsComponent', () => {
+ let component: StepperButtonsComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ StepperButtonsComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(StepperButtonsComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts
new file mode 100644
index 000000000..716cc4387
--- /dev/null
+++ b/src/app/shared/steppers/stepper-buttons/stepper-buttons.component.ts
@@ -0,0 +1,18 @@
+import { Component, Input, OnInit } from '@angular/core';
+
+@Component({
+ selector: 'mifosx-stepper-buttons',
+ templateUrl: './stepper-buttons.component.html',
+ styleUrls: ['./stepper-buttons.component.scss']
+})
+export class StepperButtonsComponent implements OnInit {
+
+ @Input() disablePrevious = false;
+ @Input() disableNext = false;
+
+ constructor() { }
+
+ ngOnInit(): void {
+ }
+
+}