-
Notifications
You must be signed in to change notification settings - Fork 808
Just testing this new filter... re CodeRabbit #2911
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
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,10 @@ import { MatStepperPrevious, MatStepperNext } from '@angular/material/stepper'; | |
| import { FaIconComponent } from '@fortawesome/angular-fontawesome'; | ||
| import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; | ||
|
|
||
| interface Account { | ||
| accountNumber: string; | ||
| } | ||
|
|
||
| /** | ||
| * Loans Account Details Step | ||
| */ | ||
|
|
@@ -191,7 +195,13 @@ export class LoansAccountDetailsStepComponent implements OnInit, OnDestroy { | |
| this.loanOfficerOptions = response.loanOfficerOptions; | ||
| this.loanPurposeOptions = response.loanPurposeOptions; | ||
| this.fundOptions = response.fundOptions; | ||
|
|
||
| this.accountLinkingOptions = response.accountLinkingOptions; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the dead code assignment. Line 199 assigns Apply this diff: this.fundOptions = response.fundOptions;
-
-this.accountLinkingOptions = response.accountLinkingOptions;
🤖 Prompt for AI Agents |
||
|
|
||
| // Test - New Filter | ||
| const allOptions = response.accountLinkingOptions || []; | ||
| this.accountLinkingOptions = allOptions.filter((account: any) => account.gsimid); | ||
|
Comment on lines
+201
to
+203
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -name "loans-account-details-step.component.ts" -type f | head -5Repository: openMF/web-app Length of output: 162 🏁 Script executed: wc -l "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts"Repository: openMF/web-app Length of output: 166 🏁 Script executed: cat -n "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts" | sed -n '195,210p'Repository: openMF/web-app Length of output: 889 🏁 Script executed: head -n 50 "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts"Repository: openMF/web-app Length of output: 1706 🏁 Script executed: grep -n "accountLinkingOptions\|response\|Account" "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts" | head -30Repository: openMF/web-app Length of output: 1733 🏁 Script executed: grep -n "response\." "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts" | head -20Repository: openMF/web-app Length of output: 533 🏁 Script executed: sed -n '180,215p' "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts"Repository: openMF/web-app Length of output: 1464 🏁 Script executed: grep -n "interface\|export.*class\|private\|public" "./src/app/loans/loans-account-stepper/loans-account-details-step/loans-account-details-step.component.ts" | head -40Repository: openMF/web-app Length of output: 424 🏁 Script executed: rg "gsimid" --type ts | head -20Repository: openMF/web-app Length of output: 250 Remove test code and apply strict type safety to the account filter. The code has two issues:
Update the interface to include the missing property: interface Account {
accountNumber: string;
+ gsimid?: string;
}Then apply strict typing: -// Test - New Filter
-const allOptions = response.accountLinkingOptions || [];
-this.accountLinkingOptions = allOptions.filter((account: any) => account.gsimid);
+const allOptions: Account[] = response.accountLinkingOptions || [];
+this.accountLinkingOptions = allOptions.filter((account: Account) => account.gsimid);Verify:
🤖 Prompt for AI Agents |
||
|
|
||
| this.loanProductSelected = true; | ||
| if (response.createStandingInstructionAtDisbursement) { | ||
| this.loansAccountDetailsForm | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unused interface or align it with actual usage.
The
Accountinterface is defined but never used in the component. Additionally, it only declaresaccountNumberbut the filtering logic on line 203 relies on agsimidproperty. Either remove this interface if it's not needed, or update it to match the actual account structure and apply it for type safety.If you intend to use this interface for type safety, apply this diff:
interface Account { accountNumber: string; + gsimid?: any; // Define proper type based on actual data structure }Then use it in the filter:
Or remove the interface entirely if not needed:
📝 Committable suggestion
🤖 Prompt for AI Agents