From 015368e27cd41970d9a6aac328a41fae19462cef Mon Sep 17 00:00:00 2001 From: Felix van Hove Date: Mon, 25 Aug 2025 15:42:03 +0200 Subject: [PATCH] fix: Make CKEditor work for Template Creation Page for Template creation didn't show CKEditor due to Javascript issue - and the submit button stayed disabled forever. FIXES: WEB-289 --- README.md | 2 +- .../make-repayment/make-repayment.component.html | 9 +++++++++ .../make-repayment/make-repayment.component.ts | 4 ++++ .../view-transaction/view-transaction.component.html | 8 ++++++++ .../create-edit-template.component.ts | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab4ac93ac..578214be4 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Before installing the web app, you need to set up the Fineract backend server: 1. **Choose ONE of these backend options:** - **Option A: Use existing remote server** - - Use the sandbox (MariaDB) at https://sandbox.mifos.community ** System is restored every 6 hours ** + - Use the sandbox (MariaDB) at https://sandbox.mifos.community ** System is restored every 6 hours ** - Use the demo (MariaDB) at https://demo.mifos.community - Use the demo (Keycloak) at https://oauth.mifos.community - Use the demo (2FA) at https://2fa.mifos.community diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html index e1553275a..a7332a91a 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.html @@ -68,6 +68,15 @@ + + {{ 'labels.inputs.Classification' | translate }} + + + {{ classificationOption.name }} + + + + {{ 'labels.inputs.Payment Type' | translate }} diff --git a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts index cef96422a..8cbd1541d 100644 --- a/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts +++ b/src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts @@ -47,6 +47,8 @@ export class MakeRepaymentComponent implements OnInit { command: string | null = null; + classificationOptions: any[] = []; + /** * @param {FormBuilder} formBuilder Form Builder. * @param {LoansService} loanService Loan Service. @@ -102,6 +104,7 @@ export class MakeRepaymentComponent implements OnInit { Validators.min(0.001), Validators.max(this.dataObject.amount)]) ); + this.repaymentLoanForm.addControl('classificationId', new UntypedFormControl('')); } else { this.repaymentLoanForm.addControl( 'transactionAmount', @@ -114,6 +117,7 @@ export class MakeRepaymentComponent implements OnInit { setRepaymentLoanDetails() { this.paymentTypes = this.dataObject.paymentTypeOptions; + this.classificationOptions = this.dataObject.classificationOptions; this.repaymentLoanForm.patchValue({ transactionAmount: this.dataObject.amount }); diff --git a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html index b050cd74d..f1d50ce24 100644 --- a/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html +++ b/src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.html @@ -82,6 +82,14 @@ > +
+ {{ 'Classification' | translateKey: 'catalogs' }} +
+ +
+ {{ transactionData.classification.name }} +
+
diff --git a/src/app/templates/create-edit-template/create-edit-template.component.ts b/src/app/templates/create-edit-template/create-edit-template.component.ts index 3637598f2..59a56c0e2 100644 --- a/src/app/templates/create-edit-template/create-edit-template.component.ts +++ b/src/app/templates/create-edit-template/create-edit-template.component.ts @@ -10,7 +10,7 @@ import { import { Router, ActivatedRoute, RouterLink } from '@angular/router'; /** CKEditor5 Imports */ -import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic'; +import ClassicEditor from '@ckeditor/ckeditor5-build-classic'; /** Custom Imports */ import { clientParameterLabels, loanParameterLabels, repaymentParameterLabels } from '../template-parameter-labels';