Skip to content
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

FINERACT-2107: Interest refund configuration for Progressive loan #2152

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

adamsaghy
Copy link
Collaborator

Description

Describe the changes made and why they were made instead of how they were made. List any dependencies that are required for this change.

Related issues and discussion

#{Issue Number}

Screenshots, if any

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • If you have multiple commits please combine them into one commit by squashing them.

  • Read and understood the contribution guidelines at web-app/.github/CONTRIBUTING.md.

</div>

<div fxFlexFill *ngIf="isAdvancedPaymentAllocation && supportedInterestRefundTypes.length > 0">
<span fxFlex="47%">{{ 'labels.inputs.SUPPORTED INTEREST REFUND TYPES ' | translate}}:</span>
Copy link

Choose a reason for hiding this comment

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

The space after the translation may not needed

@adamsaghy adamsaghy force-pushed the FINERACT-2107/interest_refund_config branch from 285c75b to 1d3970f Compare July 23, 2024 11:02
"valid": "derīgs"
"valid": "derīgs",
"INTEREST REFUND": "INTEREST REFUND",
"SUPPORTED REFUND TRANSACTIONS FOR INTEREST REFUND": "Supported interest refund types"
Copy link
Contributor

Choose a reason for hiding this comment

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

You forgot to replace translation

@adamsaghy adamsaghy force-pushed the FINERACT-2107/interest_refund_config branch from 1d3970f to 3d903ab Compare July 23, 2024 11:59
Copy link
Collaborator

@alberto-art3ch alberto-art3ch left a comment

Choose a reason for hiding this comment

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

Please review the changes requested, and run the next command to review the TypeScript style:

npx tslint src/**/*.ts

Thanks

@@ -0,0 +1,5 @@
export interface StringEnumOptionData {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Already exists an interface for that: OptionData in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string


<mat-form-field fxFlex="48%">
<mat-label>{{'labels.inputs.SUPPORTED INTEREST REFUND TYPES' | translate}}</mat-label>
<mat-select multiple formControlName="supportedInterestRefundTypes" matTooltip="{{ 'tooltips.Refund transactions where interest refund will automatically be calculated' | translate}}">
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if the tooltip translate is already defined

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice catch!

@@ -115,6 +136,10 @@ export class EditLoanProductComponent implements OnInit {
this.wasPaymentAllocationChanged = true;
}

setSupportedInterestRefundTypes(supportedInterestRefundTypes: StringEnumOptionData[]): void {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

@@ -331,4 +339,8 @@ export class LoanProductSummaryComponent implements OnInit, OnChanges {
return this.accounting.getAccountRuleName(value.toUpperCase());
}

mapHumanReadableValueStringEnumOptionDataList(incomingParameter : StringEnumOptionData[]): string[] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

@@ -99,6 +129,10 @@ export class CreateLoanProductComponent implements OnInit {
this.creditAllocation = paymentAllocation;
}

setSupportedInterestRefundTypes(supportedInterestRefundTypes: StringEnumOptionData[]): void {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

});
}

mapStringEnumOptionToIdList(incomingValues: StringEnumOptionData[]): string[] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

@@ -175,4 +203,8 @@ export class EditLoanProductComponent implements OnInit {
});
}

mapStringEnumOptionToIdList(incomingValues: StringEnumOptionData[]): string[] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

});
}

mapStringEnumOptionToIdList(incomingValues: StringEnumOptionData[]): string[] {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already defined in 'app/shared/models/option-data.model'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

@@ -125,6 +131,7 @@ export interface LoanProduct {
feeToIncomeAccountMappings?: ChargeToIncomeAccountMapping[];
penaltyToIncomeAccountMappings?: ChargeToIncomeAccountMapping[];
enableAccrualActivityPosting?: boolean;
supportedInterestRefundTypes?: StringEnumOptionData[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use the OptionData already used here in this interface

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its not the same. OptionData id is number. StringEnumOptionData id is string

@adamsaghy adamsaghy force-pushed the FINERACT-2107/interest_refund_config branch 3 times, most recently from 6343152 to 457e76f Compare July 23, 2024 16:31
@adamsaghy adamsaghy force-pushed the FINERACT-2107/interest_refund_config branch from 457e76f to dd316a4 Compare July 23, 2024 16:33
Copy link
Collaborator

@alberto-art3ch alberto-art3ch left a comment

Choose a reason for hiding this comment

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

LGTM

@alberto-art3ch alberto-art3ch merged commit 7800d67 into master Jul 23, 2024
2 checks passed
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.

4 participants