Skip to content

Feature/web 1035 dynamic currency conversion webapp - #3758

Merged
IOhacker merged 1 commit into
openMF:devfrom
AnvayKharb:feature/WEB-1035-dynamic-currency-conversion-webapp
Jul 26, 2026
Merged

Feature/web 1035 dynamic currency conversion webapp#3758
IOhacker merged 1 commit into
openMF:devfrom
AnvayKharb:feature/WEB-1035-dynamic-currency-conversion-webapp

Conversation

@AnvayKharb

@AnvayKharb AnvayKharb commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

Adds Web-App support for manually managing currency exchange rates through the existing Savings Plugin APIs.

The UI supports:

  • Creating, viewing, editing, and deleting exchange rates
  • Buy and sell indicator codes
  • Buy rate, sell rate, and reference rate
  • Source and target currencies
  • Rate date and latest-rate status
  • Currency conversion using configured exchange rates

Automatic external-provider synchronization is not part of this PR.

Related issues and discussion

WEB-1035

Screenshot

Screen.Recording.2026-07-26.at.1.55.45.PM.mov

Testing

  • npm run lint
  • npx ng build --configuration development
  • Targeted Jest tests: 3 suites, 12 tests
  • Manual CRUD verification against the Savings Plugin APIs

Summary by CodeRabbit

  • New Features
    • Added Exchange Rates management with filtering, sorting, pagination, view/create/edit/delete, plus currency conversion with results display.
    • Added Exchange Rates and Currency Conversion navigation with permission-controlled actions and route pages.
  • Bug Fixes
    • Prevented identical source/target currencies; improved rate and amount validation and strengthened submit guards to avoid duplicate submissions.
  • Documentation
    • Added/updated exchange-rate and conversion UI labels, helper text, and validation messages across supported translations.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key: "pre_merge_checks"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Adds exchange-rate CRUD and currency-conversion screens, shared validation and models, HTTP services, route resolvers, organization navigation, tests, styling, and translations.

Changes

Exchange rates and currency conversion

Layer / File(s) Summary
Contracts and validation
src/app/organization/exchange-rates/exchange-rate.model.ts, exchange-rate-form.util.ts, exchange-rate-validators.ts
Defines exchange-rate and conversion payload/result contracts, currency fallback helpers, and identical-currency validation.
API service and resolvers
src/app/organization/exchange-rates/exchange-rates.service.ts, *resolver.ts, exchange-rates.service.spec.ts
Adds HTTP retrieval, CRUD, conversion, response normalization, and resolver error handling with service coverage.
Exchange-rate screens
exchange-rates/*, view-exchange-rate/*, create-exchange-rate/*, edit-exchange-rate/*
Adds filtering, sorting, pagination, deletion, detail display, and create/edit forms with validation and formatted payloads.
Currency conversion
currency-conversion/*
Adds conversion submission, loading/error states, normalized result display, and rate-source formatting.
Routing and navigation
src/app/organization/organization-routing.module.ts, organization.component.*, organization.module.ts
Registers the feature components and resolvers, adds exchange-rate routes and navigation, and updates menu toggle state.
Translations
src/assets/translations/*.json
Adds exchange-rate and currency-conversion labels, messages, and validation strings across translation catalogs.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant CurrencyConversionComponent
  participant ExchangeRatesService
  participant ExchangeRatesAPI

  User->>CurrencyConversionComponent: submit conversion form
  CurrencyConversionComponent->>ExchangeRatesService: convertCurrency(payload)
  ExchangeRatesService->>ExchangeRatesAPI: POST conversion request
  ExchangeRatesAPI-->>ExchangeRatesService: conversion result
  ExchangeRatesService-->>CurrencyConversionComponent: normalized result
  CurrencyConversionComponent-->>User: display converted amount and rate
Loading

Suggested reviewers: adamsaghy

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clearly related to the main change: adding dynamic currency conversion and exchange-rate management to the web app.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AnvayKharb
AnvayKharb marked this pull request as ready for review July 26, 2026 17:46
@AnvayKharb
AnvayKharb requested a review from a team July 26, 2026 17:46

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

🟡 Minor comments (15)
src/assets/translations/cs-CS.json-638-638 (1)

638-638: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize all changed Czech catalog values before merging.

The affected entries currently expose English UI text to Czech users:

  • src/assets/translations/cs-CS.json#L638-L638: restore the Czech Filter label.
  • src/assets/translations/cs-CS.json#L782-L783: translate the currency-conversion action labels.
  • src/assets/translations/cs-CS.json#L1602-L1603: translate the page titles.
  • src/assets/translations/cs-CS.json#L3194-L3200: translate the exchange-rate field labels.
  • src/assets/translations/cs-CS.json#L4197-L4201: translate the help, loading, empty-state, and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/cs-CS.json` at line 638, Localize the changed English
values in src/assets/translations/cs-CS.json: restore the Czech Filter label at
lines 638-638, translate the currency-conversion action labels at lines 782-783,
page titles at lines 1602-1603, exchange-rate field labels at lines 3194-3200,
and help/loading/empty-state/validation messages at lines 4197-4201.
src/assets/translations/de-DE.json-782-784 (1)

782-784: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Complete the German localization for the exchange-rate feature.

The newly added exchange-rate strings remain English throughout the German catalog, causing mixed-language UI text.

  • src/assets/translations/de-DE.json#L782-L784: Translate the currency-conversion and create-exchange-rate button labels.
  • src/assets/translations/de-DE.json#L1603-L1605: Translate the exchange-rate navigation labels.
  • src/assets/translations/de-DE.json#L3195-L3202: Translate the exchange-rate form-field labels.
  • src/assets/translations/de-DE.json#L4197-L4202: Translate the loading, empty-state, and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/de-DE.json` around lines 782 - 784, Complete the
German localization for all exchange-rate strings by translating the
currency-conversion and create-exchange-rate labels at
src/assets/translations/de-DE.json lines 782-784, navigation labels at lines
1603-1605, form-field labels at lines 3195-3202, and loading, empty-state, and
validation messages at lines 4197-4202; preserve the existing translation keys
and JSON structure.
src/assets/translations/es-CL.json-637-637 (1)

637-637: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new and changed values for the Spanish-Chile catalog.

These values are English in es-CL.json, so Spanish users will see untranslated UI text. Line 637 also regresses the existing Filter label from Filtrar to Filter. Replace these values with Spanish translations, including the exchange-rate labels and validation messages consumed by the exchange-rate screens.

Also applies to: 781-782, 1602-1603, 3195-3201, 4198-4202

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/es-CL.json` at line 637, Update the Spanish-Chile
translation catalog by translating every new or changed English value in the
affected entries, including the exchange-rate labels and validation messages
used by the exchange-rate screens. Restore the Filter label to its existing
Spanish translation, “Filtrar,” and ensure all affected catalog values are
Spanish rather than English.
src/assets/translations/ne-NE.json-637-637 (1)

637-637: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add Nepali translations for the changed UI strings.

Filter now regresses to English, while the same catalog already contains the Nepali translation "फिल्टर गर्नुहोस्". The new exchange-rate labels and validation messages are also all English, so Nepali users will see untranslated UI text.

Please restore the Nepali Filter value and provide approved Nepali translations for the new keys.

Also applies to: 781-782, 1601-1602, 3193-3199, 4196-4200

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/ne-NE.json` at line 637, Update the Nepali
translation catalog so the Filter key uses the existing approved value “फिल्टर
गर्नुहोस्” instead of English, and add approved Nepali translations for the new
exchange-rate labels and validation-message keys at the referenced sections.
Preserve the existing key structure and ensure no newly changed UI strings
remain in English.
src/assets/translations/pt-PT.json-637-637 (1)

637-637: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the new exchange-rate strings in the Portuguese catalog.

Line [637] changes Filter to English, and the added values on Lines [781]-[782], [1601]-[1602], [3193]-[3199], and [4196]-[4200] are also untranslated. These keys are rendered by the exchange-rate screens, so Portuguese users will see a mixed-language UI. Keep the keys unchanged and provide Portuguese values.

Also applies to: 781-782, 1601-1602, 3193-3199, 4196-4200

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/pt-PT.json` at line 637, Update the Portuguese
translation catalog entries referenced in the exchange-rate screens, including
Filter and all added exchange-rate strings, replacing English values with
accurate Portuguese translations while preserving every existing key unchanged.
src/assets/translations/sw-SW.json-637-637 (1)

637-637: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Translate the new exchange-rate strings in the Swahili catalog.

These values are English, so Swahili users will see untranslated buttons, labels, fields, and validation errors throughout the new exchange-rate workflow. Line [637] is also a regression: Filter should remain Kiswahili (Chuja), consistent with the existing inputs.Filter entry.

Please replace these values with approved Kiswahili translations rather than English fallbacks.

Also applies to: 781-782, 1599-1600, 3191-3197, 4193-4197

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/sw-SW.json` at line 637, Update the Swahili catalog
entries for the exchange-rate workflow, including the strings at the referenced
ranges, with approved Kiswahili translations instead of English fallbacks.
Restore the visible Filter entry to “Chuja” consistently with the existing
inputs.Filter translation, and ensure all affected buttons, labels, fields, and
validation errors are translated.
src/assets/translations/es-MX.json-638-638 (1)

638-638: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace English values with Spanish translations throughout the changed es-MX entries.

These values either regress existing localization or leave the new exchange-rate UI untranslated:

  • src/assets/translations/es-MX.json#L638-L638: restore Filter as "Filtrar".
  • src/assets/translations/es-MX.json#L783-L784: translate the exchange-rate action labels.
  • src/assets/translations/es-MX.json#L1607-L1608: translate the exchange-rate headings.
  • src/assets/translations/es-MX.json#L3200-L3206: translate the exchange-rate form labels.
  • src/assets/translations/es-MX.json#L4222-L4226: translate the exchange-rate status and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/es-MX.json` at line 638, Replace the English values
with Spanish translations in all listed es-MX.json entries: restore Filter to
“Filtrar” at lines 638-638; translate the exchange-rate action labels at lines
783-784, headings at 1607-1608, form labels at 3200-3206, and status/validation
messages at 4222-4226. No other translation entries require changes.
src/assets/translations/fr-FR.json-637-637 (1)

637-637: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate all newly added values in the French catalog. The affected keys are rendered directly by the French UI, so leaving their values in English produces inconsistent localization.

  • src/assets/translations/fr-FR.json#L637-L637: translate Filter.
  • src/assets/translations/fr-FR.json#L781-L782: translate the exchange-rate action labels.
  • src/assets/translations/fr-FR.json#L1605-L1606: translate the exchange-rate section labels.
  • src/assets/translations/fr-FR.json#L3197-L3203: translate the exchange-rate field labels.
  • src/assets/translations/fr-FR.json#L4199-L4203: translate the exchange-rate loading, empty-state, and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/fr-FR.json` at line 637, Translate every newly added
English value in src/assets/translations/fr-FR.json: Filter at lines 637-637,
exchange-rate action labels at 781-782, section labels at 1605-1606, field
labels at 3197-3203, and loading, empty-state, and validation messages at
4199-4203. Preserve all keys and JSON structure while ensuring each French UI
value is properly localized.
src/assets/translations/it-IT.json-637-637 (1)

637-637: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Restore Italian translations for the changed catalog entries.

These values are still English in the Italian catalog, including Filter, exchange-rate labels, and currency-conversion messages. Italian users will see untranslated text in the affected screens. Replace them with Italian equivalents such as Filtro, Conversione valuta, Crea tasso di cambio, Valuta di origine, and Tasso di cambio.

Also applies to: 781-782, 1602-1603, 3194-3200, 4197-4201

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/it-IT.json` at line 637, Restore the Italian
translations for the affected catalog entries in the Italian JSON resource,
replacing the English values for Filter, exchange-rate labels, and
currency-conversion messages with their Italian equivalents, including Filtro,
Conversione valuta, Crea tasso di cambio, Valuta di origine, and Tasso di
cambio.
src/assets/translations/ko-KO.json-637-637 (1)

637-637: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the Korean catalog fully localized.

The changed values introduce English text into user-facing Korean flows, including an existing regression where Filter was de-localized. Replace these values with product-approved Korean translations:

  • src/assets/translations/ko-KO.json#L637-L637: restore the Korean Filter value.
  • src/assets/translations/ko-KO.json#L780-L782: translate the exchange-rate action labels.
  • src/assets/translations/ko-KO.json#L1603-L1604: translate the organization navigation labels.
  • src/assets/translations/ko-KO.json#L3194-L3200: translate the currency-conversion form and result labels.
  • src/assets/translations/ko-KO.json#L4196-L4200: translate the exchange-rate status and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/ko-KO.json` at line 637, Restore Korean translations
for all affected user-facing entries in src/assets/translations/ko-KO.json:
lines 637-637 for Filter, 780-782 for exchange-rate actions, 1603-1604 for
organization navigation, 3194-3200 for currency-conversion labels, and 4196-4200
for exchange-rate status and validation messages. Replace the English values
with product-approved Korean translations while preserving the existing keys and
JSON structure.
src/assets/translations/lt-LT.json-781-782 (1)

781-782: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Complete the Lithuanian translations across all affected keys.

The lt-LT catalog now mixes Lithuanian and English throughout the exchange-rate workflow, and Line 637 also regresses an existing filter translation. Replace the affected values with approved Lithuanian translations:

  • src/assets/translations/lt-LT.json#L781-L782: translate the exchange-rate action labels.
  • src/assets/translations/lt-LT.json#L637-L637: restore the Lithuanian Filter value.
  • src/assets/translations/lt-LT.json#L1601-L1602: translate the exchange-rate headings.
  • src/assets/translations/lt-LT.json#L3193-L3199: translate the conversion field labels.
  • src/assets/translations/lt-LT.json#L4197-L4201: translate the conversion descriptions and validation messages.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/lt-LT.json` around lines 781 - 782, Complete the
Lithuanian catalog entries while preserving all existing keys: update
src/assets/translations/lt-LT.json lines 781-782 for “Currency Conversion” and
“Create Exchange Rate”, restore the Lithuanian “Filter” value at line 637,
translate the exchange-rate headings at lines 1601-1602, the conversion field
labels at lines 3193-3199, and the conversion descriptions and validation
messages at lines 4197-4201 using the approved Lithuanian translations.
src/assets/translations/lv-LV.json-781-782 (1)

781-782: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add Latvian translations instead of English fallback text.

These values will display English strings in the Latvian locale. This also regresses the existing Filter translation from Latvian to English. Replace all affected values with reviewed Latvian translations.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/assets/translations/lv-LV.json` around lines 781 - 782, Replace every
English fallback value identified in src/assets/translations/lv-LV.json at lines
637, 781-782, 1602-1603, 3194-3200, and 4196-4200 with reviewed Latvian
translations, including restoring the existing Latvian Filter translation;
update all affected translation entries without changing unrelated keys.
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html-15-16 (1)

15-16: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use mat-label for every conversion field. Replace the native labels and remove the custom .field-label styling so Angular Material owns field labeling and accessibility semantics.

  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html#L15-L16: use <mat-label> inside the source-currency form field.
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html#L36-L37: use <mat-label> inside the target-currency form field.
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html#L63-L64: use <mat-label> inside the amount form field.
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html#L89-L90: use <mat-label> inside the conversion-date form field.
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss#L21-L27: remove the now-unneeded native-label styling.

As per coding guidelines, “All visual components must strictly use Angular Material elements.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html`
around lines 15 - 16, Replace the native labels with mat-label inside each
conversion mat-form-field: source currency in
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html
lines 15-16, target currency at lines 36-37, amount at lines 63-64, and
conversion date at lines 89-90. Remove the obsolete .field-label styling from
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss
lines 21-27.

Source: Coding guidelines

src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts-102-106 (1)

102-106: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate fallback and rate-source labels.

The fallback error plus Cross Rate, Administrator, and Provider are user-facing hardcoded strings. Add translation keys, including a parameterized key for the base currency, and run translation extraction. Keep backend-provided messages unchanged.

As per coding guidelines, “Use proper i18n variables from @ngx-translate/core for all user-facing strings instead of hardcoded text.”

Also applies to: 127-142

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts`
around lines 102 - 106, Update the error fallback in the currency conversion
component to use an ngx-translate key while preserving backend-provided messages
unchanged. Replace the user-facing Cross Rate, Administrator, and Provider
labels with translation lookups, using a parameterized translation key for the
base-currency label. Add the required translation entries and run translation
extraction.

Source: Coding guidelines

src/app/organization/exchange-rates/exchange-rates.component.ts-164-168 (1)

164-168: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Translate the missing-ID alert.

Exchange rate id is missing. is user-facing text and will remain English in every locale. Use a translation key and add it to the catalogs.

As per coding guidelines, “Use proper i18n variables from @ngx-translate/core for all user-facing strings instead of hardcoded text.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/organization/exchange-rates/exchange-rates.component.ts` around lines
164 - 168, Update deleteExchangeRate in ExchangeRatesComponent to replace the
hardcoded missing-ID alert message with an `@ngx-translate/core` translation key,
and add the corresponding key and localized catalog entries. Preserve the
existing alert behavior and error type.

Source: Coding guidelines

🧹 Nitpick comments (10)
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss (1)

9-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace raw spacing values with shared 8px-grid styling. The new styles introduce raw pixel values, while the template additionally uses gap-5px and m-r-10, neither aligned to the required grid.

  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss#L9-L46: replace raw sizing, spacing, color, and typography literals with applicable shared SCSS/theme variables and 8px-grid values.
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html#L111-L121: replace the 5px/10px utility classes with existing shared layout utilities that conform to the 8px grid.

As per coding guidelines, “Stick to the 8px grid system for visual design and spacing” and “Leverage SCSS variables defined in src/main.scss and src/theme/mifosx-theme.scss.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss`
around lines 9 - 46, The currency-conversion styles and template utilities use
non-grid spacing and raw visual literals. In currency-conversion.component.scss
lines 9-46, replace sizing, spacing, color, and typography values with
applicable shared SCSS/theme variables and 8px-grid values, preserving the
existing layout behavior. In currency-conversion.component.html lines 111-121,
replace gap-5px and m-r-10 with existing shared layout utilities that conform to
the 8px grid.

Source: Coding guidelines

src/app/organization/exchange-rates/exchange-rates.component.ts (1)

146-160: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove the any casts from the sorting accessor.

A typed column-to-accessor map keeps unsupported column names from silently returning arbitrary fields and preserves strict typing.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/organization/exchange-rates/exchange-rates.component.ts` around lines
146 - 160, Update the sortingDataAccessor in the exchange-rates component to
remove both any casts. Introduce a strictly typed column-to-accessor mapping for
the supported rate properties, use it for buyRate, sellRate, and referenceRate
with the existing zero fallback, and ensure unsupported column names are not
used to access arbitrary ExchangeRate fields.

Source: Coding guidelines

src/app/organization/exchange-rates/exchange-rates.component.scss (1)

9-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace off-grid spacing/sizing with shared tokens. These values break the 8px grid and avoid the approved shared styles:

  • src/app/organization/exchange-rates/exchange-rates.component.scss#L9-L37: replace gap: 16px 20px, max-width: 360px, font-size: 14px, and use the shared helper classes for padding: 20px.
  • src/app/organization/exchange-rates/exchange-rates.component.html#L9: gap-20px is grid-aligned and already exists, but the helper still defines non-grid utils like gap-5px.
  • src/app/organization/exchange-rates/exchange-rates.component.html#L95: use gap-8px instead of gap-5px, or remove the non-grid gap-5px utility.
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html#L9: gap-2px is defined as gap: 2%; use an 8px grid-aligned utility instead.
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html#L54: gap-2percent does not resolve to a gap class; replace with an approved grid-aligned spacing utility.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/organization/exchange-rates/exchange-rates.component.scss` around
lines 9 - 54, Replace off-grid spacing and sizing with approved shared tokens
across src/app/organization/exchange-rates/exchange-rates.component.scss (lines
9-54): use shared padding helpers instead of padding: 20px, align the grid gap,
max-width, and font-size values to approved tokens, and remove non-grid gap
utilities if unused. Update exchange-rates.component.html lines 9 and 95 to use
approved grid-aligned gap utilities, replacing gap-5px; update
view-exchange-rate.component.html lines 9 and 54 to replace gap-2px and
unresolved gap-2percent with approved 8px-grid spacing utilities.

Source: Coding guidelines

src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss (1)

9-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded pixel values/color instead of theme SCSS variables; duplicates create-exchange-rate.component.scss.

Same 8px-grid violations (6px, 14px, 4px) and hardcoded fallback color as the create form's stylesheet. As per coding guidelines, spacing should stick to "the 8px grid system" and reuse "SCSS variables defined in src/main.scss and src/theme/mifosx-theme.scss."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss`
around lines 9 - 41, The exchange-rate form styles duplicate the create form’s
non-theme values and violate the 8px spacing grid. Update the selectors in
`.exchange-rate-form-grid` and `.form-error` to use the existing SCSS theme
variables from `main.scss` or `mifosx-theme.scss`, replacing the hardcoded color
and spacing values while preserving the current layout and field sizing.

Source: Coding guidelines

src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts (1)

55-103: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Form config and payload builder duplicate edit-exchange-rate.component.ts.

createExchangeRateForm (Lines 55-103) and buildPayload (Lines 113-126) are structurally identical to EditExchangeRateComponent's versions, including the repeated 0.0000001 magic minimum. Consider extracting a shared factory (e.g., in exchange-rate-form.util.ts) that both components consume.

Also applies to: 113-126

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts`
around lines 55 - 103, Extract the duplicated exchange-rate form configuration
and payload-building logic from createExchangeRateForm and buildPayload into a
shared exchange-rate utility, then update both CreateExchangeRateComponent and
EditExchangeRateComponent to use it. Centralize the 0.0000001 minimum in the
shared implementation while preserving the existing validators and payload
behavior.
src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html (1)

9-219: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Template duplicates create-exchange-rate.component.html.

Same content as the create form aside from the Cancel link/permission. Candidate for a shared template/component.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html`
around lines 9 - 219, Extract the duplicated exchange-rate form markup from the
edit-exchange-rate template and create-exchange-rate template into a shared
template or reusable component. Preserve each form’s existing differences,
including the edit Cancel router link and UPDATE_EXCHANGERATE permission, while
keeping the shared controls, validation messages, and submit behavior unchanged.
src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts (2)

63-111: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Form config and payload builder duplicate create-exchange-rate.component.ts.

Same structure (and the same 0.0000001 magic minimum) as CreateExchangeRateComponent's createExchangeRateForm/buildPayload. A shared abstraction would prevent the two from drifting apart.

Also applies to: 121-134

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts`
around lines 63 - 111, Extract the duplicated exchange-rate form configuration
and payload construction from EditExchangeRateComponent’s createExchangeRateForm
and buildPayload into a shared abstraction, then reuse it from both edit and
create components. Preserve the existing validators, including the 0.0000001
minimum, field mappings, and payload behavior so the implementations cannot
drift.

51-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Explicit any for route data typing.

currencies: any loses type safety that resolveCurrencyOptions already expects ({ currencyOptions?: Currency[]; selectedCurrencyOptions?: Currency[] } per exchange-rate-form.util.ts). As per path instructions, Angular code should have "strict type safety."

♻️ Suggested typing
-      .subscribe((data: { exchangeRate: ExchangeRate; currencies: any }) => {
+      .subscribe((data: { exchangeRate: ExchangeRate; currencies: { currencyOptions?: Currency[]; selectedCurrencyOptions?: Currency[] } }) => {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts`
around lines 51 - 57, Replace the explicit any in the route.data subscription
within the component initialization flow with the structured currencies type
expected by resolveCurrencyOptions, including optional currencyOptions and
selectedCurrencyOptions arrays of Currency. Preserve the existing exchangeRate
typing and assignment behavior.

Source: Path instructions

src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss (1)

9-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Hardcoded pixel values/color instead of theme SCSS variables; duplicates edit-exchange-rate.component.scss.

6px, 14px, 4px break the 8px grid and #44474e is a hardcoded fallback color rather than a theme variable. This file is also identical to the edit component's stylesheet. As per coding guidelines, "Stick to the 8px grid system for visual design and spacing" and "Leverage SCSS variables defined in src/main.scss and src/theme/mifosx-theme.scss rather than generating custom classes and explicit pixel values."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss`
around lines 9 - 41, Update the styles in .exchange-rate-form-grid and
.form-error to match the shared theme conventions: replace the 6px, 14px, and
4px values with existing 8px-grid SCSS variables, replace the `#44474e` fallback
in .field-label with the appropriate theme color variable, and reuse the edit
exchange-rate stylesheet styles if the files are identical rather than
maintaining duplicate definitions.

Source: Coding guidelines

src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html (1)

9-219: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Template is fully duplicated in edit-exchange-rate.component.html.

Aside from the Cancel routerLink and permission string, this template is identical to the edit form's. Worth factoring into a shared form component/template to avoid the two copies drifting apart.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html`
around lines 9 - 219, Extract the duplicated exchange-rate form markup from
create-exchange-rate.component.html and edit-exchange-rate.component.html into a
shared form component or reusable template. Preserve each page’s distinct Cancel
routerLink and permission string through inputs or projected configuration,
while keeping the shared fields, validation messages, and submit behavior
consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts`:
- Around line 105-111: Update submit() to guard against repeated submissions by
tracking an in-flight state and returning early while createExchangeRate is
pending; ensure the template can use that state to disable the submit action.
Add an error callback to the subscription that presents the existing user-facing
error feedback, while preserving navigation only after a successful request.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts`:
- Around line 113-119: Update EditExchangeRateComponent.submit() to provide an
error callback in the updateExchangeRate subscription, displaying the same user
feedback used by CreateExchangeRateComponent.submit() when the PUT fails; keep
navigation only in the success callback.

In `@src/app/organization/exchange-rates/exchange-rate.resolver.ts`:
- Around line 20-21: Update the resolve method to validate the value returned by
route.paramMap.get('id') before calling exchangeRatesService.getExchangeRate.
Handle a missing id through the resolver’s established error or fallback path,
and only invoke getExchangeRate with a confirmed string to prevent requests
using a null identifier.

In `@src/app/organization/exchange-rates/exchange-rates.component.ts`:
- Around line 174-175: Guard the delete-dialog result before accessing it and
type it as nullable in both delete dialog subscriptions:
src/app/organization/exchange-rates/exchange-rates.component.ts lines 174-175
and
src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.ts
lines 53-54. Update the callbacks to accept `{ delete: true } | undefined` and
only proceed when `response?.delete` is true, preserving cancellation when the
dialog closes without a value.

In
`@src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html`:
- Around line 54-57: Update the Back button’s routerLink in the
view-exchange-rate template to use the same ../../ navigation target as the
delete flow, so it returns to the exchange-rate list instead of reloading the
current detail route.

In `@src/app/organization/organization-routing.module.ts`:
- Around line 324-375: Replace the direct exchange-rate child routes under the
organization routing configuration with a lazy loadChildren reference to the
exchange-rates feature module, preserving the exchange-rates URL segment. In
src/app/organization/organization-routing.module.ts lines 324-375, move route
ownership to that lazy module; in src/app/organization/organization.module.ts
lines 170-174, remove the eager exchange-rate component imports that are no
longer needed.

---

Minor comments:
In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html`:
- Around line 15-16: Replace the native labels with mat-label inside each
conversion mat-form-field: source currency in
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html
lines 15-16, target currency at lines 36-37, amount at lines 63-64, and
conversion date at lines 89-90. Remove the obsolete .field-label styling from
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss
lines 21-27.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts`:
- Around line 102-106: Update the error fallback in the currency conversion
component to use an ngx-translate key while preserving backend-provided messages
unchanged. Replace the user-facing Cross Rate, Administrator, and Provider
labels with translation lookups, using a parameterized translation key for the
base-currency label. Add the required translation entries and run translation
extraction.

In `@src/app/organization/exchange-rates/exchange-rates.component.ts`:
- Around line 164-168: Update deleteExchangeRate in ExchangeRatesComponent to
replace the hardcoded missing-ID alert message with an `@ngx-translate/core`
translation key, and add the corresponding key and localized catalog entries.
Preserve the existing alert behavior and error type.

In `@src/assets/translations/cs-CS.json`:
- Line 638: Localize the changed English values in
src/assets/translations/cs-CS.json: restore the Czech Filter label at lines
638-638, translate the currency-conversion action labels at lines 782-783, page
titles at lines 1602-1603, exchange-rate field labels at lines 3194-3200, and
help/loading/empty-state/validation messages at lines 4197-4201.

In `@src/assets/translations/de-DE.json`:
- Around line 782-784: Complete the German localization for all exchange-rate
strings by translating the currency-conversion and create-exchange-rate labels
at src/assets/translations/de-DE.json lines 782-784, navigation labels at lines
1603-1605, form-field labels at lines 3195-3202, and loading, empty-state, and
validation messages at lines 4197-4202; preserve the existing translation keys
and JSON structure.

In `@src/assets/translations/es-CL.json`:
- Line 637: Update the Spanish-Chile translation catalog by translating every
new or changed English value in the affected entries, including the
exchange-rate labels and validation messages used by the exchange-rate screens.
Restore the Filter label to its existing Spanish translation, “Filtrar,” and
ensure all affected catalog values are Spanish rather than English.

In `@src/assets/translations/es-MX.json`:
- Line 638: Replace the English values with Spanish translations in all listed
es-MX.json entries: restore Filter to “Filtrar” at lines 638-638; translate the
exchange-rate action labels at lines 783-784, headings at 1607-1608, form labels
at 3200-3206, and status/validation messages at 4222-4226. No other translation
entries require changes.

In `@src/assets/translations/fr-FR.json`:
- Line 637: Translate every newly added English value in
src/assets/translations/fr-FR.json: Filter at lines 637-637, exchange-rate
action labels at 781-782, section labels at 1605-1606, field labels at
3197-3203, and loading, empty-state, and validation messages at 4199-4203.
Preserve all keys and JSON structure while ensuring each French UI value is
properly localized.

In `@src/assets/translations/it-IT.json`:
- Line 637: Restore the Italian translations for the affected catalog entries in
the Italian JSON resource, replacing the English values for Filter,
exchange-rate labels, and currency-conversion messages with their Italian
equivalents, including Filtro, Conversione valuta, Crea tasso di cambio, Valuta
di origine, and Tasso di cambio.

In `@src/assets/translations/ko-KO.json`:
- Line 637: Restore Korean translations for all affected user-facing entries in
src/assets/translations/ko-KO.json: lines 637-637 for Filter, 780-782 for
exchange-rate actions, 1603-1604 for organization navigation, 3194-3200 for
currency-conversion labels, and 4196-4200 for exchange-rate status and
validation messages. Replace the English values with product-approved Korean
translations while preserving the existing keys and JSON structure.

In `@src/assets/translations/lt-LT.json`:
- Around line 781-782: Complete the Lithuanian catalog entries while preserving
all existing keys: update src/assets/translations/lt-LT.json lines 781-782 for
“Currency Conversion” and “Create Exchange Rate”, restore the Lithuanian
“Filter” value at line 637, translate the exchange-rate headings at lines
1601-1602, the conversion field labels at lines 3193-3199, and the conversion
descriptions and validation messages at lines 4197-4201 using the approved
Lithuanian translations.

In `@src/assets/translations/lv-LV.json`:
- Around line 781-782: Replace every English fallback value identified in
src/assets/translations/lv-LV.json at lines 637, 781-782, 1602-1603, 3194-3200,
and 4196-4200 with reviewed Latvian translations, including restoring the
existing Latvian Filter translation; update all affected translation entries
without changing unrelated keys.

In `@src/assets/translations/ne-NE.json`:
- Line 637: Update the Nepali translation catalog so the Filter key uses the
existing approved value “फिल्टर गर्नुहोस्” instead of English, and add approved
Nepali translations for the new exchange-rate labels and validation-message keys
at the referenced sections. Preserve the existing key structure and ensure no
newly changed UI strings remain in English.

In `@src/assets/translations/pt-PT.json`:
- Line 637: Update the Portuguese translation catalog entries referenced in the
exchange-rate screens, including Filter and all added exchange-rate strings,
replacing English values with accurate Portuguese translations while preserving
every existing key unchanged.

In `@src/assets/translations/sw-SW.json`:
- Line 637: Update the Swahili catalog entries for the exchange-rate workflow,
including the strings at the referenced ranges, with approved Kiswahili
translations instead of English fallbacks. Restore the visible Filter entry to
“Chuja” consistently with the existing inputs.Filter translation, and ensure all
affected buttons, labels, fields, and validation errors are translated.

---

Nitpick comments:
In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html`:
- Around line 9-219: Extract the duplicated exchange-rate form markup from
create-exchange-rate.component.html and edit-exchange-rate.component.html into a
shared form component or reusable template. Preserve each page’s distinct Cancel
routerLink and permission string through inputs or projected configuration,
while keeping the shared fields, validation messages, and submit behavior
consistent.

In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss`:
- Around line 9-41: Update the styles in .exchange-rate-form-grid and
.form-error to match the shared theme conventions: replace the 6px, 14px, and
4px values with existing 8px-grid SCSS variables, replace the `#44474e` fallback
in .field-label with the appropriate theme color variable, and reuse the edit
exchange-rate stylesheet styles if the files are identical rather than
maintaining duplicate definitions.

In
`@src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts`:
- Around line 55-103: Extract the duplicated exchange-rate form configuration
and payload-building logic from createExchangeRateForm and buildPayload into a
shared exchange-rate utility, then update both CreateExchangeRateComponent and
EditExchangeRateComponent to use it. Centralize the 0.0000001 minimum in the
shared implementation while preserving the existing validators and payload
behavior.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss`:
- Around line 9-46: The currency-conversion styles and template utilities use
non-grid spacing and raw visual literals. In currency-conversion.component.scss
lines 9-46, replace sizing, spacing, color, and typography values with
applicable shared SCSS/theme variables and 8px-grid values, preserving the
existing layout behavior. In currency-conversion.component.html lines 111-121,
replace gap-5px and m-r-10 with existing shared layout utilities that conform to
the 8px grid.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html`:
- Around line 9-219: Extract the duplicated exchange-rate form markup from the
edit-exchange-rate template and create-exchange-rate template into a shared
template or reusable component. Preserve each form’s existing differences,
including the edit Cancel router link and UPDATE_EXCHANGERATE permission, while
keeping the shared controls, validation messages, and submit behavior unchanged.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss`:
- Around line 9-41: The exchange-rate form styles duplicate the create form’s
non-theme values and violate the 8px spacing grid. Update the selectors in
`.exchange-rate-form-grid` and `.form-error` to use the existing SCSS theme
variables from `main.scss` or `mifosx-theme.scss`, replacing the hardcoded color
and spacing values while preserving the current layout and field sizing.

In
`@src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts`:
- Around line 63-111: Extract the duplicated exchange-rate form configuration
and payload construction from EditExchangeRateComponent’s createExchangeRateForm
and buildPayload into a shared abstraction, then reuse it from both edit and
create components. Preserve the existing validators, including the 0.0000001
minimum, field mappings, and payload behavior so the implementations cannot
drift.
- Around line 51-57: Replace the explicit any in the route.data subscription
within the component initialization flow with the structured currencies type
expected by resolveCurrencyOptions, including optional currencyOptions and
selectedCurrencyOptions arrays of Currency. Preserve the existing exchangeRate
typing and assignment behavior.

In `@src/app/organization/exchange-rates/exchange-rates.component.scss`:
- Around line 9-54: Replace off-grid spacing and sizing with approved shared
tokens across src/app/organization/exchange-rates/exchange-rates.component.scss
(lines 9-54): use shared padding helpers instead of padding: 20px, align the
grid gap, max-width, and font-size values to approved tokens, and remove
non-grid gap utilities if unused. Update exchange-rates.component.html lines 9
and 95 to use approved grid-aligned gap utilities, replacing gap-5px; update
view-exchange-rate.component.html lines 9 and 54 to replace gap-2px and
unresolved gap-2percent with approved 8px-grid spacing utilities.

In `@src/app/organization/exchange-rates/exchange-rates.component.ts`:
- Around line 146-160: Update the sortingDataAccessor in the exchange-rates
component to remove both any casts. Introduce a strictly typed
column-to-accessor mapping for the supported rate properties, use it for
buyRate, sellRate, and referenceRate with the existing zero fallback, and ensure
unsupported column names are not used to access arbitrary ExchangeRate fields.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d6c1deb-563c-4cc4-93fc-d87dbb0ffb28

📥 Commits

Reviewing files that changed from the base of the PR and between 7e41380 and 2026ccb.

📒 Files selected for processing (41)
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.spec.ts
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.spec.ts
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts
  • src/app/organization/exchange-rates/exchange-rate-form.util.ts
  • src/app/organization/exchange-rates/exchange-rate-validators.ts
  • src/app/organization/exchange-rates/exchange-rate.model.ts
  • src/app/organization/exchange-rates/exchange-rate.resolver.ts
  • src/app/organization/exchange-rates/exchange-rates.component.html
  • src/app/organization/exchange-rates/exchange-rates.component.scss
  • src/app/organization/exchange-rates/exchange-rates.component.ts
  • src/app/organization/exchange-rates/exchange-rates.resolver.ts
  • src/app/organization/exchange-rates/exchange-rates.service.spec.ts
  • src/app/organization/exchange-rates/exchange-rates.service.ts
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.scss
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.ts
  • src/app/organization/organization-routing.module.ts
  • src/app/organization/organization.component.html
  • src/app/organization/organization.component.ts
  • src/app/organization/organization.module.ts
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/en-US.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json

Comment thread src/app/organization/exchange-rates/exchange-rate.resolver.ts Outdated
Comment thread src/app/organization/exchange-rates/exchange-rates.component.ts Outdated
Comment thread src/app/organization/organization-routing.module.ts
@AnvayKharb
AnvayKharb force-pushed the feature/WEB-1035-dynamic-currency-conversion-webapp branch from 2026ccb to ebd273c Compare July 26, 2026 18:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss (1)

9-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use the project spacing and theme tokens.

820px, 260px, 6px, 14px, and 4px break the required 8px grid; the custom color fallbacks also bypass the shared theme variables. Replace these with established spacing/color variables and grid-aligned values.

As per coding guidelines, “Stick to the 8px grid system” and “Leverage SCSS variables defined in src/main.scss and src/theme/mifosx-theme.scss.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss`
around lines 9 - 46, Update .currency-conversion-form-grid and its nested/error
styles to use the established spacing and color variables from the shared theme
files instead of hardcoded values and custom fallbacks; replace 820px, 260px,
6px, 14px, and 4px with appropriate 8px-grid-aligned project tokens while
preserving the existing layout and error styling.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/assets/translations/fr-FR.json`:
- Line 637: Update the French translation catalog entry for the `Filter` key to
use the existing French value `Filtre` instead of the English value `Filter`.
- Around line 781-782: Complete the French exchange-rate translations in
src/assets/translations/fr-FR.json: translate the action labels at lines
781-782, headings at 1605-1606, field labels at 3197-3203, and loading,
empty-state, validation, and error messages at 4199-4203, preserving all
existing translation keys and placeholders.

In `@src/assets/translations/lv-LV.json`:
- Line 637: Fully localize the Latvian translation catalog: restore the existing
Latvian value for Filter at src/assets/translations/lv-LV.json:637-637, and
translate Currency Conversion and Create Exchange Rate at
src/assets/translations/lv-LV.json:781-782, the exchange-rate navigation labels
at 1602-1603, the exchange-rate and conversion field labels at 3194-3200, and
the exchange-rate status and validation messages at 4196-4200. Preserve the
existing translation keys and JSON structure.

---

Nitpick comments:
In
`@src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss`:
- Around line 9-46: Update .currency-conversion-form-grid and its nested/error
styles to use the established spacing and color variables from the shared theme
files instead of hardcoded values and custom fallbacks; replace 820px, 260px,
6px, 14px, and 4px with appropriate 8px-grid-aligned project tokens while
preserving the existing layout and error styling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 17d7113e-9259-4a8b-b45f-e3c268de994f

📥 Commits

Reviewing files that changed from the base of the PR and between 2026ccb and ebd273c.

📒 Files selected for processing (43)
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.spec.ts
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.html
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.scss
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.spec.ts
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts
  • src/app/organization/exchange-rates/exchange-rate-form.util.ts
  • src/app/organization/exchange-rates/exchange-rate-validators.ts
  • src/app/organization/exchange-rates/exchange-rate.model.ts
  • src/app/organization/exchange-rates/exchange-rate.resolver.ts
  • src/app/organization/exchange-rates/exchange-rates-routing.module.ts
  • src/app/organization/exchange-rates/exchange-rates.component.html
  • src/app/organization/exchange-rates/exchange-rates.component.scss
  • src/app/organization/exchange-rates/exchange-rates.component.ts
  • src/app/organization/exchange-rates/exchange-rates.module.ts
  • src/app/organization/exchange-rates/exchange-rates.resolver.ts
  • src/app/organization/exchange-rates/exchange-rates.service.spec.ts
  • src/app/organization/exchange-rates/exchange-rates.service.ts
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.scss
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.ts
  • src/app/organization/organization-routing.module.ts
  • src/app/organization/organization.component.html
  • src/app/organization/organization.component.ts
  • src/app/organization/organization.module.ts
  • src/assets/translations/cs-CS.json
  • src/assets/translations/de-DE.json
  • src/assets/translations/en-US.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/fr-FR.json
  • src/assets/translations/it-IT.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/lv-LV.json
  • src/assets/translations/ne-NE.json
  • src/assets/translations/pt-PT.json
  • src/assets/translations/sw-SW.json
💤 Files with no reviewable changes (1)
  • src/app/organization/organization.module.ts
🚧 Files skipped from review as they are similar to previous changes (33)
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.scss
  • src/app/organization/exchange-rates/exchange-rates.component.scss
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.scss
  • src/app/organization/exchange-rates/exchange-rates.resolver.ts
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.html
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.scss
  • src/app/organization/exchange-rates/exchange-rate.resolver.ts
  • src/app/organization/organization.component.ts
  • src/app/organization/exchange-rates/exchange-rate-form.util.ts
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.ts
  • src/app/organization/exchange-rates/exchange-rate-validators.ts
  • src/app/organization/exchange-rates/exchange-rates.component.html
  • src/app/organization/exchange-rates/edit-exchange-rate/edit-exchange-rate.component.html
  • src/app/organization/exchange-rates/exchange-rate.model.ts
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.ts
  • src/app/organization/exchange-rates/view-exchange-rate/view-exchange-rate.component.ts
  • src/app/organization/exchange-rates/create-exchange-rate/create-exchange-rate.component.html
  • src/app/organization/exchange-rates/exchange-rates.service.spec.ts
  • src/assets/translations/it-IT.json
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.spec.ts
  • src/assets/translations/ne-NE.json
  • src/assets/translations/ko-KO.json
  • src/assets/translations/sw-SW.json
  • src/assets/translations/pt-PT.json
  • src/app/organization/organization.component.html
  • src/app/organization/exchange-rates/exchange-rates.service.ts
  • src/assets/translations/cs-CS.json
  • src/assets/translations/es-MX.json
  • src/assets/translations/es-CL.json
  • src/assets/translations/lt-LT.json
  • src/assets/translations/de-DE.json
  • src/app/organization/exchange-rates/exchange-rates.component.ts
  • src/app/organization/exchange-rates/currency-conversion/currency-conversion.component.ts

Comment thread src/assets/translations/fr-FR.json
Comment thread src/assets/translations/fr-FR.json
Comment thread src/assets/translations/lv-LV.json
@IOhacker
IOhacker merged commit c25670d into openMF:dev Jul 26, 2026
6 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.

2 participants