Skip to content

WEB-259 replace custom api of loans.service.ts #2572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: openapi-integration
Choose a base branch
from

Conversation

gkbishnoi07
Copy link
Collaborator

@gkbishnoi07 gkbishnoi07 commented Jul 23, 2025

Description

Replaced custom methods in *.ts files that were previously using loansService with their corresponding auto-generated methods from the OpenAPI-based @fineract/client package.

Updated both:

  • Imports to reference the correct generated service classes.
  • Method calls to use the OpenAPI-generated implementations.

This helps improve maintainability and aligns with the OpenAPI specification.

Related issues and discussion

WEB-259

Copy link
Collaborator

@steinwinde steinwinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As pointed out in DM, editing an existing loan of a group or client doesn't work with this code. Diverse Javascript errors are reported in the Chrome console.

@gkbishnoi07
Copy link
Collaborator Author

working on it!

@gkbishnoi07 gkbishnoi07 requested a review from steinwinde July 30, 2025 20:58
@gkbishnoi07 gkbishnoi07 force-pushed the WEB-259-replace-custom-api-of-loans-service-ts branch 3 times, most recently from b899895 to 2af6c97 Compare August 4, 2025 09:48
Copy link
Collaborator

@steinwinde steinwinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work for me, see below. Or have I overlooked anything?!

--- snip ---
PS C:\Users\felix\vsc\mifos-pr-2572-3> ng serve
Component HMR has been enabled, see https://angular.dev/hmr for more info.
Application bundle generation failed. [49.119 seconds]

✘ [ERROR] Could not resolve "../loans.service"

src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts:4:29:
  4 │ import { LoansService } from '../loans.service';
    ╵                              ~~~~~~~~~~~~~~~~~~

✘ [ERROR] TS2307: Cannot find module '../loans.service' or its corresponding type declarations. [plugin angular-compiler]

src/app/loans/common-resolvers/loan-deferred-income-data.resolver.ts:9:29:
  9 │ import { LoansService } from '../loans.service';
    ╵                              ~~~~~~~~~~~~~~~~~~

✘ [ERROR] TS2339: Property 'loanService' does not exist on type 'MakeRepaymentComponent'. [plugin angular-compiler]

src/app/loans/loans-view/loan-account-actions/make-repayment/make-repayment.component.ts:185:9:
  185 │     this.loanService.submitLoanActionButton(this.loanId, data, th...
      ╵          ~~~~~~~~~~~

✘ [ERROR] TS2339: Property 'getLoanTransactionActionTemplate' does not exist on type 'LoansService'. [plugin angular-compiler]

src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts:463:7:
  463 │       .getLoanTransactionActionTemplate(String(loanId), 'interest...
      ╵        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

✘ [ERROR] TS2339: Property 'executeLoansAccountTransactionsCommand' does not exist on type 'LoansService'. [plugin angular-compiler]

src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts:523:15:
  523 │               .executeLoansAccountTransactionsCommand(
      ╵                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

--- snip ---

@gkbishnoi07 gkbishnoi07 force-pushed the WEB-259-replace-custom-api-of-loans-service-ts branch from 2af6c97 to 2d573ed Compare August 4, 2025 16:48
@gkbishnoi07 gkbishnoi07 requested a review from steinwinde August 4, 2025 16:49
@gkbishnoi07
Copy link
Collaborator Author

@steinwinde updated! Please check

@gkbishnoi07 gkbishnoi07 force-pushed the WEB-259-replace-custom-api-of-loans-service-ts branch from 2d573ed to 55b33da Compare August 6, 2025 11:59
Copy link
Collaborator

@steinwinde steinwinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be noted that Gopi is working on fixing several issues in this...

Screen.Recording.2025-08-06.142743.mp4

@gkbishnoi07
Copy link
Collaborator Author

I'm working on 2-3 errors most probably I will complete it by tomorrow

@gkbishnoi07 gkbishnoi07 force-pushed the WEB-259-replace-custom-api-of-loans-service-ts branch from 55b33da to 7fb2fae Compare August 14, 2025 15:43
@gkbishnoi07 gkbishnoi07 requested a review from steinwinde August 15, 2025 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants