This is an automated email from the ASF dual-hosted git repository.

Aman-Mittal pushed a commit to branch 
revert-543-fix/448-regenerate-openapi-specs
in repository https://gitbox.apache.org/repos/asf/fineract-backoffice-ui.git

commit 89bcb83159ca13a052aba4f098b916022ab8e002
Author: Aman-Mittal <[email protected]>
AuthorDate: Thu Sep 17 16:19:50 2026 +0530

    Revert "feat(loans): add quick-create modal for loan products (#326)"
---
 e2e/loan-product-quick-create.spec.ts              | 265 ---------------------
 src/app/features/loans/loan-form.component.ts      |  24 +-
 ...n-product-quick-create-dialog.component.test.ts | 153 ------------
 .../loan-product-quick-create-dialog.component.ts  | 233 ------------------
 src/assets/i18n/hi.json                            |   4 -
 src/assets/i18n/ko.json                            |   4 -
 6 files changed, 3 insertions(+), 680 deletions(-)

diff --git a/e2e/loan-product-quick-create.spec.ts 
b/e2e/loan-product-quick-create.spec.ts
deleted file mode 100644
index 70a1a78b..00000000
--- a/e2e/loan-product-quick-create.spec.ts
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { test, expect, Page } from './fixtures';
-
-const TENANT = 'default';
-const USER = 'mifos';
-const PASSWORD = 'password';
-
-async function setupBaseMockRoutes(page: Page): Promise<void> {
-  await page.route('**/config.json*', (r) =>
-    r.fulfill({
-      status: 200,
-      contentType: 'application/json',
-      body: JSON.stringify({ fineractApiUrl: '/api/v1', defaultTenant: TENANT 
}),
-    }),
-  );
-
-  await page.route('**/api/v1/authentication**', (r) =>
-    r.fulfill({
-      status: 200,
-      contentType: 'application/json',
-      body: JSON.stringify({
-        username: USER,
-        userId: 1,
-        base64EncodedAuthenticationKey: 'YmFzZTY0',
-        authenticated: true,
-        officeId: 1,
-        officeName: 'Head Office',
-        roles: [{ id: 1, name: 'Super User', description: 'Super user' }],
-        permissions: ['ALL_FUNCTIONS'],
-      }),
-    }),
-  );
-
-  await page.route('**/api/v1/offices*', (r) =>
-    r.fulfill({
-      status: 200,
-      contentType: 'application/json',
-      body: JSON.stringify([
-        { id: 1, name: 'Head Office', externalId: '1', openingDate: [2009, 1, 
1], hierarchy: '.' },
-      ]),
-    }),
-  );
-
-  await page.route(/\/api\/v1\/clients(\?|$)/, (r) =>
-    r.fulfill({
-      status: 200,
-      contentType: 'application/json',
-      body: JSON.stringify({ totalFilteredRecords: 0, pageItems: [] }),
-    }),
-  );
-}
-
-async function loginAndGoToLoanCreate(page: Page): Promise<void> {
-  await setupBaseMockRoutes(page);
-  await page.goto('/login');
-  await page.locator('#tenantId').fill(TENANT);
-  await page.locator('#username').fill(USER);
-  await page.locator('#password').fill(PASSWORD);
-  await page.getByRole('button', { name: 'Sign In' }).click();
-  await expect(page).toHaveURL('/dashboard');
-}
-
-test.describe('Loan Product Quick Create Modal', () => {
-  test('happy path: quick-creates loan product, sends fixed defaults, closes 
modal, and auto-selects in dropdown', async ({
-    page,
-  }) => {
-    const createdProducts: Array<{ id: number; name: string; shortName: string 
}> = [];
-    let capturedPayload: Record<string, unknown> | null = null;
-
-    await page.route('**/api/v1/loanproducts**', async (route) => {
-      if (route.request().method() === 'POST') {
-        capturedPayload = JSON.parse(route.request().postData() || '{}');
-        const newProduct = {
-          id: 99,
-          name: (capturedPayload?.name as string) || 'Quick Loan Product',
-          shortName: (capturedPayload?.shortName as string) || 'QLP',
-        };
-        createdProducts.push(newProduct);
-        await route.fulfill({
-          status: 200,
-          contentType: 'application/json',
-          body: JSON.stringify({ id: 99, resourceId: 99 }),
-        });
-      } else {
-        await route.fulfill({
-          status: 200,
-          contentType: 'application/json',
-          body: JSON.stringify(createdProducts),
-        });
-      }
-    });
-
-    await loginAndGoToLoanCreate(page);
-    await page.goto('/loans/create', { waitUntil: 'networkidle' });
-
-    const triggerButton = page.getByTestId('loan-create-product-trigger');
-    const productSelect = page.getByTestId('loan-product-select');
-
-    await expect(triggerButton).toBeVisible();
-    await expect(productSelect).toBeVisible();
-
-    // Open quick-create modal
-    await triggerButton.click();
-
-    const dialog = page.locator('ion-modal:not(.ion-datetime-button-overlay)');
-    await expect(dialog).toBeVisible();
-    await expect(dialog).toContainText('Create Loan Product');
-
-    // Fill form fields
-    await page.getByTestId('quick-product-name').locator('input').fill('Quick 
Loan Product');
-    await 
page.getByTestId('quick-product-short-name').locator('input').fill('QLP');
-    await 
page.getByTestId('quick-product-principal').locator('input').fill('10000');
-    await 
page.getByTestId('quick-product-interest-rate').locator('input').fill('5');
-    await 
page.getByTestId('quick-product-repayments-count').locator('input').fill('12');
-    await 
page.getByTestId('quick-product-repayment-every').locator('input').fill('1');
-
-    // Submit form
-    await page.getByTestId('quick-product-submit').click();
-
-    // Assert POST payload details
-    await expect.poll(() => capturedPayload).not.toBeNull();
-    expect(capturedPayload).toMatchObject({
-      name: 'Quick Loan Product',
-      shortName: 'QLP',
-      principal: 10000,
-      interestRatePerPeriod: 5,
-      numberOfRepayments: 12,
-      repaymentEvery: 1,
-      currencyCode: 'USD',
-      digitsAfterDecimal: 2,
-      inMultiplesOf: 0,
-      repaymentFrequencyType: 2,
-      interestRateFrequencyType: 3,
-      amortizationType: 1,
-      interestType: 0,
-      interestCalculationPeriodType: 1,
-      loanScheduleType: 'CUMULATIVE',
-      transactionProcessingStrategyCode: 'mifos-standard-strategy',
-      accountingRule: 1,
-      daysInYearType: 1,
-      daysInMonthType: 1,
-      isInterestRecalculationEnabled: false,
-      locale: 'en',
-    });
-
-    // Assert modal closes
-    await expect(dialog).toBeHidden();
-
-    // Assert product select auto-selects newly created product
-    await expect(productSelect).toContainText('Quick Loan Product');
-  });
-
-  test('cancel flow: closes modal without sending POST request', async ({ page 
}) => {
-    let postAttempted = false;
-
-    await page.route('**/api/v1/loanproducts**', async (route) => {
-      if (route.request().method() === 'POST') {
-        postAttempted = true;
-        await route.fulfill({ status: 200, contentType: 'application/json', 
body: '{}' });
-      } else {
-        await route.fulfill({
-          status: 200,
-          contentType: 'application/json',
-          body: JSON.stringify([]),
-        });
-      }
-    });
-
-    await loginAndGoToLoanCreate(page);
-    await page.goto('/loans/create', { waitUntil: 'networkidle' });
-
-    const triggerButton = page.getByTestId('loan-create-product-trigger');
-    await triggerButton.click();
-
-    const dialog = page.locator('ion-modal:not(.ion-datetime-button-overlay)');
-    await expect(dialog).toBeVisible();
-
-    await 
page.getByTestId('quick-product-name').locator('input').fill('Canceled 
Product');
-
-    await page.getByTestId('quick-product-cancel').click();
-
-    await expect(dialog).toBeHidden();
-    expect(postAttempted).toBe(false);
-  });
-
-  test('error path: displays toast, keeps modal open, and preserves entered 
values when POST fails', async ({
-    page,
-  }) => {
-    await page.route('**/api/v1/loanproducts**', async (route) => {
-      if (route.request().method() === 'POST') {
-        await route.fulfill({
-          status: 500,
-          contentType: 'application/json',
-          body: JSON.stringify({ message: 'Internal Server Error' }),
-        });
-      } else {
-        await route.fulfill({
-          status: 200,
-          contentType: 'application/json',
-          body: JSON.stringify([]),
-        });
-      }
-    });
-
-    await loginAndGoToLoanCreate(page);
-    await page.goto('/loans/create', { waitUntil: 'networkidle' });
-
-    const triggerButton = page.getByTestId('loan-create-product-trigger');
-    await triggerButton.click();
-
-    const dialog = page.locator('ion-modal:not(.ion-datetime-button-overlay)');
-    await expect(dialog).toBeVisible();
-
-    await page.getByTestId('quick-product-name').locator('input').fill('Failed 
Product');
-    await 
page.getByTestId('quick-product-short-name').locator('input').fill('FP');
-    await 
page.getByTestId('quick-product-principal').locator('input').fill('5000');
-    await 
page.getByTestId('quick-product-interest-rate').locator('input').fill('10');
-    await 
page.getByTestId('quick-product-repayments-count').locator('input').fill('6');
-    await 
page.getByTestId('quick-product-repayment-every').locator('input').fill('1');
-
-    await page.getByTestId('quick-product-submit').click();
-
-    // Assert error notification toast is shown
-    const toast = page.locator('ion-toast.error-toast').last();
-    await expect(toast).toBeVisible();
-    await expect(toast).toContainText('Operation failed. Please try again.');
-
-    // Assert modal remains open
-    await expect(dialog).toBeVisible();
-
-    // Assert form values are preserved
-    await 
expect(page.getByTestId('quick-product-name').locator('input')).toHaveValue(
-      'Failed Product',
-    );
-    await 
expect(page.getByTestId('quick-product-short-name').locator('input')).toHaveValue('FP');
-    await 
expect(page.getByTestId('quick-product-principal').locator('input')).toHaveValue('5000');
-    await 
expect(page.getByTestId('quick-product-interest-rate').locator('input')).toHaveValue(
-      '10',
-    );
-    await 
expect(page.getByTestId('quick-product-repayments-count').locator('input')).toHaveValue(
-      '6',
-    );
-    await 
expect(page.getByTestId('quick-product-repayment-every').locator('input')).toHaveValue(
-      '1',
-    );
-  });
-});
diff --git a/src/app/features/loans/loan-form.component.ts 
b/src/app/features/loans/loan-form.component.ts
index b094220b..c96cd33f 100644
--- a/src/app/features/loans/loan-form.component.ts
+++ b/src/app/features/loans/loan-form.component.ts
@@ -41,8 +41,6 @@ import {
   requiredStrategyFor,
 } from '../products/loan-schedule-type';
 import { NotificationService } from '../../core/services/notification.service';
-import { DialogService } from '../../core/services/dialog.service';
-import { LoanProductQuickCreateDialogComponent } from 
'../products/loan-product-quick-create-dialog.component';
 import { TooltipDirective } from '../../shared/directives/tooltip.directive';
 import {
   IonButton,
@@ -146,7 +144,6 @@ const OPERATION_FAILED_MESSAGE = 'Operation failed. Please 
try again.';
                   >
                     <ion-label position="stacked">{{ 'LOANS.PRODUCT' | 
translate }}</ion-label>
                     <ion-select
-                      data-testid="loan-product-select"
                       [attr.aria-label]="'LOANS.PRODUCT' | translate"
                       interface="popover"
                       name="productId"
@@ -163,7 +160,6 @@ const OPERATION_FAILED_MESSAGE = 'Operation failed. Please 
try again.';
                     </ion-select>
                   </ion-item>
                   <ion-button
-                    data-testid="loan-create-product-trigger"
                     fill="clear"
                     type="button"
                     [attr.aria-label]="'PRODUCTS.CREATE_LOAN_PRODUCT' | 
translate"
@@ -573,7 +569,6 @@ export class LoanFormComponent implements OnInit {
   private readonly router = inject(Router);
   private readonly route = inject(ActivatedRoute);
   private readonly notifications = inject(NotificationService);
-  private readonly dialogService = inject(DialogService);
 
   private readonly LIST_PATH = '/loans';
 
@@ -630,25 +625,12 @@ export class LoanFormComponent implements OnInit {
   }
 
   onCreateProduct() {
-    this.dialogService
-      .open<{ id?: number; resourceId?: number 
}>(LoanProductQuickCreateDialogComponent)
-      .then((result) => {
-        if (result) {
-          const createdId = result.id ?? result.resourceId;
-          this.loadProducts(createdId);
-        }
-      });
+    this.router.navigate(['/products/loan/create']);
   }
 
-  private loadProducts(selectProductId?: number) {
+  private loadProducts() {
     this.productService.getLoanproducts().subscribe({
-      next: (data: GetLoanProductsResponse[]) => {
-        this.products.set(data || []);
-        if (selectProductId) {
-          this.loan().productId = selectProductId;
-          this.onProductSelected(selectProductId);
-        }
-      },
+      next: (data: GetLoanProductsResponse[]) => this.products.set(data || []),
       error: () => this.notifications.error(OPERATION_FAILED_MESSAGE),
     });
   }
diff --git 
a/src/app/features/products/loan-product-quick-create-dialog.component.test.ts 
b/src/app/features/products/loan-product-quick-create-dialog.component.test.ts
deleted file mode 100644
index 511e7e48..00000000
--- 
a/src/app/features/products/loan-product-quick-create-dialog.component.test.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { createSpyObj, SpyObj } from '../../testing/mocks';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { LoanProductQuickCreateDialogComponent } from 
'./loan-product-quick-create-dialog.component';
-import { provideFakeAdapters, FakeOverlayAdapter } from 
'../../testing/adapters';
-import { LoanProductsService, PostLoanProductsResponse } from '../../api';
-import { NotificationService } from '../../core/services/notification.service';
-import { LOAN_SCHEDULE_TYPE } from './loan-schedule-type';
-import { of, throwError } from 'rxjs';
-
-describe('LoanProductQuickCreateDialogComponent', () => {
-  let component: LoanProductQuickCreateDialogComponent;
-  let fixture: ComponentFixture<LoanProductQuickCreateDialogComponent>;
-  let overlay: FakeOverlayAdapter;
-  let mockLoanProductsService: SpyObj<LoanProductsService>;
-  let mockNotificationService: SpyObj<NotificationService>;
-
-  beforeEach(async () => {
-    const adapters = provideFakeAdapters();
-    overlay = adapters.overlay;
-    mockLoanProductsService = 
createSpyObj<LoanProductsService>(['postLoanproducts']);
-    mockNotificationService = createSpyObj<NotificationService>(['error']);
-
-    await TestBed.configureTestingModule({
-      imports: [LoanProductQuickCreateDialogComponent],
-      providers: [
-        ...adapters.providers,
-        { provide: LoanProductsService, useValue: mockLoanProductsService },
-        { provide: NotificationService, useValue: mockNotificationService },
-      ],
-    }).compileComponents();
-
-    fixture = TestBed.createComponent(LoanProductQuickCreateDialogComponent);
-    component = fixture.componentInstance;
-    fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-
-  it('should close dialog on cancel', () => {
-    component.onCancel();
-    expect(overlay.dismissals).toEqual([undefined]);
-  });
-
-  it('should not submit when required fields are empty', () => {
-    component.name = '';
-    component.shortName = '';
-    component.principal = null;
-    component.interestRatePerPeriod = null;
-    component.numberOfRepayments = null;
-    component.repaymentEvery = null;
-
-    component.onSubmit();
-
-    expect(mockLoanProductsService.postLoanproducts).not.toHaveBeenCalled();
-    expect(overlay.dismissals).toEqual([]);
-  });
-
-  it('should submit postLoanproducts with 6 form values merged with fixed 
defaults and dismiss modal on success', () => {
-    const mockResponse: PostLoanProductsResponse = { resourceId: 42 };
-    mockLoanProductsService.postLoanproducts.mockReturnValue(
-      of(mockResponse) as unknown as 
ReturnType<LoanProductsService['postLoanproducts']>,
-    );
-
-    component.name = 'Quick Loan Product';
-    component.shortName = 'QLP';
-    component.principal = 10_000;
-    component.interestRatePerPeriod = 5;
-    component.numberOfRepayments = 12;
-    component.repaymentEvery = 1;
-
-    component.onSubmit();
-
-    expect(mockLoanProductsService.postLoanproducts).toHaveBeenCalledWith({
-      name: 'Quick Loan Product',
-      shortName: 'QLP',
-      principal: 10_000,
-      interestRatePerPeriod: 5,
-      numberOfRepayments: 12,
-      repaymentEvery: 1,
-
-      currencyCode: 'USD',
-      digitsAfterDecimal: 2,
-      inMultiplesOf: 0,
-      repaymentFrequencyType: 2,
-      interestRateFrequencyType: 3,
-      amortizationType: 1,
-      interestType: 0,
-      interestCalculationPeriodType: 1,
-      loanScheduleType: LOAN_SCHEDULE_TYPE.CUMULATIVE,
-      transactionProcessingStrategyCode: 'mifos-standard-strategy',
-      accountingRule: 1,
-      daysInYearType: 1,
-      daysInMonthType: 1,
-      isInterestRecalculationEnabled: false,
-      locale: 'en',
-    });
-
-    expect(overlay.dismissals).toEqual([{ id: 42, resourceId: 42 }]);
-  });
-
-  it('should show error notification, keep modal open, and preserve form 
values when submit fails', () => {
-    mockLoanProductsService.postLoanproducts.mockReturnValue(
-      throwError(() => new Error('Creation failed')) as unknown as ReturnType<
-        LoanProductsService['postLoanproducts']
-      >,
-    );
-
-    component.name = 'Failed Product';
-    component.shortName = 'FP';
-    component.principal = 5000;
-    component.interestRatePerPeriod = 10;
-    component.numberOfRepayments = 6;
-    component.repaymentEvery = 1;
-
-    component.onSubmit();
-
-    expect(mockLoanProductsService.postLoanproducts).toHaveBeenCalled();
-    expect(mockNotificationService.error).toHaveBeenCalledWith(
-      'Operation failed. Please try again.',
-    );
-    expect(overlay.dismissals).toEqual([]);
-    expect(component.isSaving()).toBe(false);
-
-    // Verify form values are preserved
-    expect(component.name).toBe('Failed Product');
-    expect(component.shortName).toBe('FP');
-    expect(component.principal).toBe(5000);
-    expect(component.interestRatePerPeriod).toBe(10);
-    expect(component.numberOfRepayments).toBe(6);
-    expect(component.repaymentEvery).toBe(1);
-  });
-});
diff --git 
a/src/app/features/products/loan-product-quick-create-dialog.component.ts 
b/src/app/features/products/loan-product-quick-create-dialog.component.ts
deleted file mode 100644
index d33f728e..00000000
--- a/src/app/features/products/loan-product-quick-create-dialog.component.ts
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import { Component, inject, signal } from '@angular/core';
-import { FormsModule } from '@angular/forms';
-import { IonButton, IonInput, IonItem, IonLabel, IonSpinner } from 
'@ionic/angular/standalone';
-import { LoanProductsService, PostLoanProductsRequest } from '../../api';
-import { LOAN_SCHEDULE_TYPE } from './loan-schedule-type';
-import { NotificationService } from '../../core/services/notification.service';
-import { OVERLAY, TranslatePipe } from '../../core/adapters';
-
-const OPERATION_FAILED_MESSAGE = 'Operation failed. Please try again.';
-
-@Component({
-  selector: 'app-loan-product-quick-create-dialog',
-  standalone: true,
-  imports: [FormsModule, TranslatePipe, IonButton, IonInput, IonItem, 
IonLabel, IonSpinner],
-  template: `
-    <h2 class="dialog-title">
-      {{ 'PRODUCTS.CREATE_LOAN_PRODUCT' | appTranslate }}
-    </h2>
-    <div class="dialog-content">
-      <form #productForm="ngForm" (ngSubmit)="onSubmit()" 
class="quick-create-form">
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'COMMON.NAME' | appTranslate 
}}</ion-label>
-          <ion-input
-            [attr.aria-label]="'COMMON.NAME' | appTranslate"
-            id="quick-product-name"
-            data-testid="quick-product-name"
-            name="name"
-            [(ngModel)]="name"
-            required
-            placeholder="{{ 'COMMON.NAME' | appTranslate }}"
-          ></ion-input>
-        </ion-item>
-
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'PRODUCTS.SHORT_NAME' | 
appTranslate }}</ion-label>
-          <ion-input
-            [attr.aria-label]="'PRODUCTS.SHORT_NAME' | appTranslate"
-            id="quick-product-short-name"
-            data-testid="quick-product-short-name"
-            name="shortName"
-            [(ngModel)]="shortName"
-            required
-            maxlength="4"
-            placeholder="{{ 'PRODUCTS.SHORT_NAME' | appTranslate }}"
-          ></ion-input>
-        </ion-item>
-
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'PRODUCTS.PRINCIPAL' | appTranslate 
}}</ion-label>
-          <ion-input
-            [attr.aria-label]="'PRODUCTS.PRINCIPAL' | appTranslate"
-            id="quick-product-principal"
-            data-testid="quick-product-principal"
-            type="number"
-            name="principal"
-            [(ngModel)]="principal"
-            required
-          ></ion-input>
-        </ion-item>
-
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'PRODUCTS.INTEREST_RATE' | 
appTranslate }}</ion-label>
-          <ion-input
-            [attr.aria-label]="'PRODUCTS.INTEREST_RATE' | appTranslate"
-            id="quick-product-interest-rate"
-            data-testid="quick-product-interest-rate"
-            type="number"
-            name="interestRatePerPeriod"
-            [(ngModel)]="interestRatePerPeriod"
-            required
-          ></ion-input>
-        </ion-item>
-
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'LOANS.REPAYMENTS_COUNT' | 
appTranslate }}</ion-label>
-          <ion-input
-            [attr.aria-label]="'LOANS.REPAYMENTS_COUNT' | appTranslate"
-            id="quick-product-repayments-count"
-            data-testid="quick-product-repayments-count"
-            type="number"
-            name="numberOfRepayments"
-            [(ngModel)]="numberOfRepayments"
-            required
-          ></ion-input>
-        </ion-item>
-
-        <ion-item fill="outline" class="full-width">
-          <ion-label position="stacked">{{ 'LOANS.REPAYMENT_EVERY' | 
appTranslate }}</ion-label>
-          <ion-input
-            [attr.aria-label]="'LOANS.REPAYMENT_EVERY' | appTranslate"
-            id="quick-product-repayment-every"
-            data-testid="quick-product-repayment-every"
-            type="number"
-            name="repaymentEvery"
-            [(ngModel)]="repaymentEvery"
-            required
-          ></ion-input>
-        </ion-item>
-      </form>
-    </div>
-    <div class="dialog-actions">
-      <ion-button
-        fill="clear"
-        data-testid="quick-product-cancel"
-        (click)="onCancel()"
-        [disabled]="isSaving()"
-      >
-        {{ 'COMMON.CANCEL' | appTranslate }}
-      </ion-button>
-      <ion-button
-        color="primary"
-        data-testid="quick-product-submit"
-        [disabled]="productForm.invalid || isSaving()"
-        (click)="onSubmit()"
-      >
-        @if (isSaving()) {
-          <ion-spinner name="crescent" slot="start"></ion-spinner>
-          {{ 'COMMON.SAVING' | appTranslate }}
-        } @else {
-          {{ 'COMMON.SAVE' | appTranslate }}
-        }
-      </ion-button>
-    </div>
-  `,
-  styles: [
-    `
-      .quick-create-form {
-        display: flex;
-        flex-direction: column;
-        gap: 12px;
-        padding-top: 8px;
-        min-width: 360px;
-      }
-      .full-width {
-        width: 100%;
-      }
-      .dialog-actions {
-        display: flex;
-        justify-content: flex-end;
-        gap: 12px;
-        margin-top: 16px;
-      }
-    `,
-  ],
-})
-export class LoanProductQuickCreateDialogComponent {
-  private readonly productService = inject(LoanProductsService);
-  private readonly overlay = inject(OVERLAY);
-  private readonly notifications = inject(NotificationService);
-
-  name = '';
-  shortName = '';
-  principal: number | null = null;
-  interestRatePerPeriod: number | null = null;
-  numberOfRepayments: number | null = null;
-  repaymentEvery: number | null = null;
-
-  readonly isSaving = signal(false);
-
-  onSubmit(): void {
-    if (
-      !this.name ||
-      !this.shortName ||
-      this.principal === null ||
-      this.interestRatePerPeriod === null ||
-      this.numberOfRepayments === null ||
-      this.repaymentEvery === null
-    ) {
-      return;
-    }
-
-    this.isSaving.set(true);
-
-    const request: PostLoanProductsRequest = {
-      name: this.name,
-      shortName: this.shortName,
-      principal: this.principal,
-      interestRatePerPeriod: this.interestRatePerPeriod,
-      numberOfRepayments: this.numberOfRepayments,
-      repaymentEvery: this.repaymentEvery,
-
-      // Fixed defaults copied from loan-product-form.component.ts's product 
signal
-      currencyCode: 'USD',
-      digitsAfterDecimal: 2,
-      inMultiplesOf: 0,
-      repaymentFrequencyType: 2,
-      interestRateFrequencyType: 3,
-      amortizationType: 1,
-      interestType: 0,
-      interestCalculationPeriodType: 1,
-      loanScheduleType: LOAN_SCHEDULE_TYPE.CUMULATIVE,
-      transactionProcessingStrategyCode: 'mifos-standard-strategy',
-      accountingRule: 1,
-      daysInYearType: 1,
-      daysInMonthType: 1,
-      isInterestRecalculationEnabled: false,
-      locale: 'en',
-    };
-
-    this.productService.postLoanproducts(request).subscribe({
-      next: (response) => {
-        void this.overlay.dismissModal({ id: response.resourceId, ...response 
});
-      },
-      error: () => {
-        this.notifications.error(OPERATION_FAILED_MESSAGE);
-        this.isSaving.set(false);
-      },
-    });
-  }
-
-  onCancel(): void {
-    void this.overlay.dismissModal();
-  }
-}
diff --git a/src/assets/i18n/hi.json b/src/assets/i18n/hi.json
index 7cba0b31..7eb3fc8e 100644
--- a/src/assets/i18n/hi.json
+++ b/src/assets/i18n/hi.json
@@ -277,10 +277,6 @@
     "CREATE": "शुल्क बनाएं",
     "EDIT": "शुल्क संपादित करें"
   },
-  "LOANS": {
-    "REPAYMENTS_COUNT": "Number of Repayments",
-    "REPAYMENT_EVERY": "Repayment Every"
-  },
   "SHARE_ACCOUNTS": {
     "CREATE": "शेयर खाता बनाएं",
     "EDIT": "शेयर खाता संपादित करें",
diff --git a/src/assets/i18n/ko.json b/src/assets/i18n/ko.json
index 14597c24..3859660a 100644
--- a/src/assets/i18n/ko.json
+++ b/src/assets/i18n/ko.json
@@ -277,10 +277,6 @@
     "CREATE": "수수료 생성",
     "EDIT": "수수료 수정"
   },
-  "LOANS": {
-    "REPAYMENTS_COUNT": "Number of Repayments",
-    "REPAYMENT_EVERY": "Repayment Every"
-  },
   "SHARE_ACCOUNTS": {
     "CREATE": "주식 계좌 생성",
     "EDIT": "주식 계좌 수정",

Reply via email to