WEB-657: Working Capital Loan - Charge-Off - #3790
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Note
|
| Layer / File(s) | Summary |
|---|---|
Charge-off contract and form src/app/loans/models/working-capital/..., src/app/loans/loans-view/working-capital/loan-account-actions/charge-off/* |
Adds charge-off models and a reactive form with date validation, optional reason and metadata fields, guarded submission, and navigation. |
Undo charge-off flow src/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/*, src/app/loans/loans-view/loans-view.component.ts, src/app/loans/loans-view/transactions... |
Adds the undo dialog and routes Working Capital charge-off transactions through the localized undoChargeOff command. |
Fraud controls and account display src/app/loans/loans-view/loans-view.component.*, src/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/*, src/app/loans/loans.service.ts |
Adds fraud confirmation, fraud state updates, charge-off controls, status badges, charge-off details, and reload handling. |
Charge-off translations src/assets/translations/* |
Adds charge-off, fraud, status, reversal, and undo-confirmation translations across supported catalogs. |
Estimated code review effort: 4 (Complex) | ~60 minutes
Sequence Diagram(s)
sequenceDiagram
participant LoanView
participant ChargeOffForm
participant LoanAction
participant UndoDialog
participant FraudDialog
LoanView->>ChargeOffForm: open Working Capital charge-off form
ChargeOffForm->>LoanAction: submit chargeOff request
LoanAction-->>LoanView: return charge-off result
LoanView->>UndoDialog: open undo confirmation
UndoDialog-->>LoanView: return reversal metadata
LoanView->>LoanAction: submit undoChargeOff request
LoanAction-->>LoanView: return success
LoanView->>FraudDialog: open mark or unmark confirmation
FraudDialog-->>LoanView: return confirmation
LoanView->>LoanAction: submit fraud state update
Possibly related PRs
- openMF/web-app#3752: Modifies Working Capital charge-off undo handling and payload routing.
- openMF/web-app#3750: Modifies Working Capital action-template selection in the loan action resolver.
- openMF/web-app#3798: Extends related Working Capital loan action flows and shared components.
Suggested reviewers: adamsaghy
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly identifies the Working Capital Loan charge-off functionality, which matches the main change in the pull request. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
| 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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 18
🤖 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/loans/loans-view/loans-view.component.html`:
- Around line 93-95: Update the two span elements in the loan details template
that use the m-l-10 class to use the existing 8px-grid spacing utility or SCSS
variable instead. Preserve the current layout and conditional chargeOffReason
rendering.
- Around line 31-33: Update the account-status pill to use the charge-off status
whenever loanDetailsData.chargedOff is true: display the translated
labels.status.Charged Off text and apply the charge-off class through
iconLoanStatusColor(). Preserve the existing status value and styling for
non-charged-off loans, updating the relevant template binding and
iconLoanStatusColor logic.
In
`@src/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.html`:
- Line 72: Replace the charge-off template’s gap-5px utility with an 8px-grid
spacing utility. In src/app/loans/loans-view/loans-view.component.scss lines
20-22, update the status-pill margin, padding, and radius to grid-aligned values
using shared SCSS tokens where available; in lines 69-70, likewise update the
badge padding and radius. Apply the requested changes at all three listed sites.
In
`@src/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.html`:
- Line 11: Update the undo charge-off dialog template to remove the literal
question mark and pass punctuation through the translation key. Modify the
corresponding translation catalog value for “labels.dialogContext.Are you sure
you want to undo the charge-off” so it contains the complete, locale-specific
question sentence, including appropriate punctuation and spacing.
In `@src/assets/translations/cs-CS.json`:
- Line 1835: Update the Czech translation entries for “Charge-off reason” and
the related fraud-charge label near this translation block: use “Důvod odpisu”
for the charge-off reason and replace “Poplatek za podvody” with the approved
Czech expense wording, such as “Náklady na podvod”.
In `@src/assets/translations/de-DE.json`:
- Line 827: Replace the German “Charge-off” translation value "Abladen" with the
established financial terminology used by nearby entries, such as “Abschreibung”
or its appropriate grammatical form. Update all related charge-off labels,
status, confirmation, and menu entries—including menus["Charge-Off"] and
menus["Undo Charge-Off"]—to consistently use the existing Abschreibung
terminology.
In `@src/assets/translations/es-CL.json`:
- Line 825: In src/assets/translations/es-CL.json at lines 825-825, 1833-1838,
3419-3419, and 3469-3469, standardize every charge-off catalog, menu, input,
status, dialog, and permission translation on one approved Chilean Spanish term;
replace the mixed Cancelación/Cancelado and Castigo/Deshacer Castigo variants
consistently, preserving the intended distinction from loan cancellation.
In `@src/assets/translations/es-MX.json`:
- Line 827: Update the charge-off translations in
src/assets/translations/es-MX.json at lines 827, 1840-1845, 3423, and 3473: use
distinct approved es-MX charge-off terminology rather than
cancellation/write-off wording, and replace expense-label “Cargo” terms with
“Gasto.” Confirm every affected label, including “Charge-off,” “Charged Off,”
and the undo confirmation, against the approved accounting glossary.
In `@src/assets/translations/fr-FR.json`:
- Line 825: Update the French translations for the Charge-off workflow,
including the "Charge-off" entry and the referenced related entries, replacing
amortization terms such as "Amortir" and "Amorti" with the established
charge-off terminology used elsewhere in the file: "Radier", "Montant radié",
"Date de radiation", "Radié le", "Radié", and "annuler la radiation" as
appropriate to each message.
In `@src/assets/translations/it-IT.json`:
- Line 825: Use one approved Italian term for the Charge-off workflow throughout
src/assets/translations/it-IT.json: update lines 825-825, 1833-1838, 3417-3417,
and 3467-3467 so the action, fields, status, and undo confirmation consistently
use the approved charge-off terminology rather than “addebito.”
In `@src/assets/translations/ko-KO.json`:
- Around line 1834-1839: Update the Korean translations for “Charge-Off Date”
and “Charged Off On” so their visible labels are clearly distinct: use wording
for the former that denotes the effective/input charge-off date and wording for
the latter that denotes the charged-off display date. Leave the other charge-off
translations unchanged.
- Line 2863: Update the Korean translation for “Reversal External Id” to use the
approved transaction-reversal terminology, matching the term used by the
`Reversed` translation or glossary (such as `반대`) instead of `취소`. Preserve the
existing translation key and JSON structure.
- Line 825: Update the “Charge-off” translation in the Korean locale to use the
same `상각` term as the related charge-off labels, including the existing
translation at line 1836, so all labels for this action are consistent.
In `@src/assets/translations/lt-LT.json`:
- Line 825: Use consistent Lithuanian charge-off terminology throughout
src/assets/translations/lt-LT.json: at lines 825-825 replace “Atsakingas už”
with “Nurašymas”; at lines 1832-1837 use “Nurašyta suma”, “Nurašymo data”, and
“Nurašyta”; at line 3417 use the approved Lithuanian “Charged Off” status; and
at lines 3467-3467 use “Ar tikrai norite atšaukti nurašymą?”.
In `@src/assets/translations/lv-LV.json`:
- Around line 1835-1837: Update the Latvian values for “Charge-off reason”,
“ChargeOff Expense”, and “ChargeOff Fraud Expense” to use the catalog’s
established “Norakstīšana”/“Norakstīts” terminology; preserve the fraud
qualifier in the final label while replacing the inconsistent “Izmaksas” and
“Atstāj” wording.
In `@src/assets/translations/ne-NE.json`:
- Around line 1832-1837: Update the `ChargeOff Fraud Expense` translation in
`ne-NE.json` to use a Nepali noun phrase meaning “charge-off fraud expense,” not
an imperative meaning “charge the fraud expense”; preserve the `चार्ज-अफ`
wording used by the adjacent charge-off labels.
In `@src/assets/translations/pt-PT.json`:
- Line 825: Use consistent Portuguese charge-off terminology in
src/assets/translations/pt-PT.json: change line 825 to “Baixa”, lines 1832-1837
to “Valor baixado”, “Data de baixa”, and “Baixado em”, line 3417 to “Baixado”,
and line 3467 to “desfazer a baixa”.
In `@src/assets/translations/sw-SW.json`:
- Around line 1832-1835: Update src/assets/translations/sw-SW.json lines
1832-1835 so “Charge-off reason”, “ChargeOff Expense”, “ChargeOff Fraud
Expense”, and “Charged Off On” consistently use the approved Swahili charge-off
term from “Reason for Charge-Off” at line 2781, preserving the charge-off
context. Also update “Charged Off” at line 3414 to use a status term distinct
from the “Disabled” translation.
🪄 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: 5d096f01-4e95-4283-aa6e-cbd3586d3e32
📒 Files selected for processing (28)
src/app/loans/common-resolvers/loan-action-button.resolver.tssrc/app/loans/loans-view/general-tab/general-tab.component.htmlsrc/app/loans/loans-view/loan-account-actions/loan-account-actions.component.htmlsrc/app/loans/loans-view/loan-account-actions/loan-account-actions.component.tssrc/app/loans/loans-view/loans-view.component.htmlsrc/app/loans/loans-view/loans-view.component.scsssrc/app/loans/loans-view/loans-view.component.tssrc/app/loans/loans-view/transactions-tab/transactions-tab.component.tssrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.htmlsrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.scsssrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.tssrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.htmlsrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.scsssrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.tssrc/app/loans/models/working-capital/working-capital-loan-account.model.tssrc/assets/translations/cs-CS.jsonsrc/assets/translations/de-DE.jsonsrc/assets/translations/en-US.jsonsrc/assets/translations/es-CL.jsonsrc/assets/translations/es-MX.jsonsrc/assets/translations/fr-FR.jsonsrc/assets/translations/it-IT.jsonsrc/assets/translations/ko-KO.jsonsrc/assets/translations/lt-LT.jsonsrc/assets/translations/lv-LV.jsonsrc/assets/translations/ne-NE.jsonsrc/assets/translations/pt-PT.jsonsrc/assets/translations/sw-SW.json
a9286ae to
cdc8629
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
cdc8629 to
f090fbe
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
f090fbe to
79697db
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 8
♻️ Duplicate comments (3)
src/assets/translations/it-IT.json (1)
827-827: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCharge-off terminology still uses "addebito" (a normal charge), not fixed from the earlier review.
Line 827 (
Charge-off), lines 1837-1842 (Charge-Off Amount,Charge-Off Date,Charge-off reason,ChargeOff Expense,ChargeOff Fraud Expense,Charged Off On), line 3427 (Charged Off), and line 3482 (undo confirmation) all still useaddebito/addebitato, which describes a normal charge rather than a charge-off (write-off). Replace these with a consistent, approved Italian charge-off term (for example a form ofstralcio) across all of these keys.Also applies to: 1837-1842, 3427-3432, 3481-3482
🤖 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 827, Update the Italian translation entries for Charge-off, Charge-Off Amount, Charge-Off Date, Charge-off reason, ChargeOff Expense, ChargeOff Fraud Expense, Charged Off On, Charged Off, and the undo confirmation to use one consistent approved charge-off/write-off term based on “stralcio” instead of “addebito” or “addebitato”.src/assets/translations/fr-FR.json (1)
827-827: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winCharge-off terminology is still inconsistent; the earlier fix was only partially applied.
Line 827 (
Charge-off), lines 1840-1841 and 1845 (Charge-Off Amount,Charge-Off Date,Charged Off On), line 3431 (Charged Off), and line 3486 (the undo confirmation) still translate charge-off with amortization terms (Amortir/amortissement/Amorti). Line 1842 (Charge-off reason) already usesradiation, the correct term, in the same edit. Useradiation/Radiéconsistently across all of these keys, matching the file's own existing usage.💡 Proposed fix
- "Charge-off": "Amortir", + "Charge-off": "Radier",- "Charge-Off Amount": "Montant de l'amortissement", - "Charge-Off Date": "Date de l'amortissement", + "Charge-Off Amount": "Montant radié", + "Charge-Off Date": "Date de radiation",- "Charged Off On": "Amorti le", + "Charged Off On": "Radié le",- "Charged Off": "Amorti", + "Charged Off": "Radié",- "Are you sure you want to undo the charge-off": "Êtes-vous sûr de vouloir annuler l'amortissement ?" + "Are you sure you want to undo the charge-off": "Êtes-vous sûr de vouloir annuler la radiation ?"Also applies to: 1840-1845, 3431-3436, 3485-3486
🤖 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 827, Update the charge-off translation entries in the French locale, including “Charge-off”, “Charge-Off Amount”, “Charge-Off Date”, “Charged Off On”, “Charged Off”, and the undo confirmation, to use consistent radiation terminology (“radiation”/“Radié”) instead of amortization terms. Preserve the existing “Charge-off reason” translation and match its established wording.src/assets/translations/ko-KO.json (1)
827-827: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winThree previously flagged Korean terminology inconsistencies remain unresolved.
- Line 827 (
Charge-off:상각) and line 1840 (Charge-off reason:청구 취소 사유) still use two different Korean terms for the same charge-off concept.- Line 1839 (
Charge-Off Date:상각 일자) and line 1843 (Charged Off On:상각일) still differ only by a space and remain effectively indistinguishable to users.- Line 2867 (
Reversal External Id:취소 외부 ID) still uses취소(cancellation) instead of the reversal term used byReversed.Align
Charge-off reasonwith the상각term used elsewhere, giveCharge-Off DateandCharged Off Onvisibly distinct wording, and use a consistent reversal term (matchingReversed) forReversal External Id.Also applies to: 1838-1843, 2867-2867
🤖 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 827, Update the Korean translation entries for “Charge-off reason”, “Charge-Off Date”, “Charged Off On”, and “Reversal External Id” in the translation JSON: use the existing 상각 terminology for the charge-off reason, make the two charge-off date labels visibly distinct, and replace 취소 with the reversal term used by “Reversed” for the external ID.
🧹 Nitpick comments (3)
src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts (1)
249-251: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReuse
isChargeOffintransactionBadgeClassandtransactionBorderClass.
isChargeOffduplicates the conditiont.chargeoff || t.code === 'loanTransactionType.chargeOff'already inlined in thetransactionBadgeClassandtransactionBorderClassgetters. Callthis.isChargeOff(t)in both getters instead of repeating the condition, to keep the charge-off detection logic in one place.🤖 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/loans/loans-view/transactions/view-transaction/view-transaction.component.ts` around lines 249 - 251, Update the transactionBadgeClass and transactionBorderClass getters to call this.isChargeOff(t) instead of inlining the charge-off condition. Preserve the existing class-selection behavior while centralizing detection in isChargeOff.src/assets/translations/de-DE.json (1)
1843-1843: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low valueUse a noun phrase for the German fraud-expense account name.
"ChargeOff Fraud Expense": "Betrugskosten abrechnen"reads as a verb phrase ("settle fraud costs"), not a noun phrase naming an expense account, unlike"ChargeOff Expense": "ChargeOff-Kosten"next to it. Use a noun phrase such as"Aufwand aus Betrugsabschreibung"or"Betrugsaufwand"to match the account-name style of the surrounding entries.🤖 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` at line 1843, Update the German translation value for "ChargeOff Fraud Expense" to a noun phrase naming the fraud expense account, such as "Aufwand aus Betrugsabschreibung" or "Betrugsaufwand", instead of the current verb phrase.src/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.scss (1)
14-18: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAlign
.fraud-consequencespacing to the 8px grid.
margin-top: 0.75remis 12px, not a multiple of the project's 8px spacing grid. Use0.5rem(8px) or1rem(16px) instead.♻️ Proposed fix
.fraud-consequence { - margin-top: 0.75rem; + margin-top: 0.5rem; font-size: 0.85rem; opacity: 0.85; }As per coding guidelines, "Stick to the 8px grid system for visual design and spacing" (
src/**/*.{scss,html}).🤖 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/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.scss` around lines 14 - 18, Update the .fraud-consequence margin-top from 0.75rem to an 8px-grid value, using 0.5rem or 1rem while preserving the remaining typography and opacity styles.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/app/loans/loans-view/loans-view.component.ts`:
- Around line 626-646: Handle command failures in undoWorkingCapitalChargeOff at
src/app/loans/loans-view/loans-view.component.ts#L626-L646 by adding catchError
with this.errorHandler.handleError(...), matching setWorkingCapitalFraud. Apply
the same error-handling pattern to undoChargeOffTransaction at
src/app/loans/loans-view/transactions-tab/transactions-tab.component.ts#L519-L539;
optionally extract shared dialog, payload, and error-handling logic so both
entry points remain consistent.
In
`@src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts`:
- Around line 302-303: Update the isWorkingCapitalChargeOff branch in the
transaction undo flow to use the generic loan undoChargeOff command on the
Working Capital account charge-off reversal API, replacing
undoWorkingCapitalChargeOff. Preserve the expected account identifier and
payload for that endpoint.
In `@src/assets/translations/es-MX.json`:
- Line 3469: Update the “the Loan Reschedule” translation value to use the
existing “Reprogramación del Crédito” wording instead of the invalid
“Recanlendrización del Crédito” text.
In `@src/assets/translations/fr-FR.json`:
- Line 2870: Update the French translation for “Reversal External Id” in the
translation map to use the same reversal term as the existing “Reversed” entry,
replacing “annulation” with the consistent “Renversé” wording while preserving
the rest of the label.
In `@src/assets/translations/ne-NE.json`:
- Around line 3464-3465: Update the Nepali translations for “Are you sure you
want undo the transaction” and “Are you sure you want undo the transaction type”
to use the established action-reversal wording “पूर्ववत गर्न”, keeping the
transaction and transaction-type objects distinct as in the proposed
translations.
- Line 3463: Update the Nepali translations for “the Loan Reschedule,” “the
Reschedule Loan,” and other affected “the Reschedule” entries in ne-NE.json to
use the file’s established approved rescheduling terminology instead of “कर्जा
पुनर्योजना,” while preserving unrelated translations.
- Line 3430: Update the "Closed (rescheduled)" translation value in ne-NE.json
to the correct, clear Nepali term for a closed rescheduled loan status,
replacing the apparent typo while preserving the translation key.
In `@src/assets/translations/sw-SW.json`:
- Line 3456: Update the Swahili translations for the “Fraud accounting
consequence” and corresponding line 3463 key to replace deletion wording with
the approved terms for charging off the loan and removing the fraud mark, while
preserving the rest of each explanation.
---
Duplicate comments:
In `@src/assets/translations/fr-FR.json`:
- Line 827: Update the charge-off translation entries in the French locale,
including “Charge-off”, “Charge-Off Amount”, “Charge-Off Date”, “Charged Off
On”, “Charged Off”, and the undo confirmation, to use consistent radiation
terminology (“radiation”/“Radié”) instead of amortization terms. Preserve the
existing “Charge-off reason” translation and match its established wording.
In `@src/assets/translations/it-IT.json`:
- Line 827: Update the Italian translation entries for Charge-off, Charge-Off
Amount, Charge-Off Date, Charge-off reason, ChargeOff Expense, ChargeOff Fraud
Expense, Charged Off On, Charged Off, and the undo confirmation to use one
consistent approved charge-off/write-off term based on “stralcio” instead of
“addebito” or “addebitato”.
In `@src/assets/translations/ko-KO.json`:
- Line 827: Update the Korean translation entries for “Charge-off reason”,
“Charge-Off Date”, “Charged Off On”, and “Reversal External Id” in the
translation JSON: use the existing 상각 terminology for the charge-off reason,
make the two charge-off date labels visibly distinct, and replace 취소 with the
reversal term used by “Reversed” for the external ID.
---
Nitpick comments:
In
`@src/app/loans/loans-view/transactions/view-transaction/view-transaction.component.ts`:
- Around line 249-251: Update the transactionBadgeClass and
transactionBorderClass getters to call this.isChargeOff(t) instead of inlining
the charge-off condition. Preserve the existing class-selection behavior while
centralizing detection in isChargeOff.
In
`@src/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.scss`:
- Around line 14-18: Update the .fraud-consequence margin-top from 0.75rem to an
8px-grid value, using 0.5rem or 1rem while preserving the remaining typography
and opacity styles.
In `@src/assets/translations/de-DE.json`:
- Line 1843: Update the German translation value for "ChargeOff Fraud Expense"
to a noun phrase naming the fraud expense account, such as "Aufwand aus
Betrugsabschreibung" or "Betrugsaufwand", instead of the current verb phrase.
🪄 Autofix
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: 8dd2f8aa-3343-426d-9ea3-bf2328b967ba
📒 Files selected for processing (37)
src/app/loans/common-resolvers/loan-action-button.resolver.tssrc/app/loans/loans-view/_loan-tab-shared.scsssrc/app/loans/loans-view/general-tab/general-tab.component.htmlsrc/app/loans/loans-view/general-tab/general-tab.component.scsssrc/app/loans/loans-view/loan-account-actions/loan-account-actions.component.htmlsrc/app/loans/loans-view/loan-account-actions/loan-account-actions.component.tssrc/app/loans/loans-view/loans-view.component.htmlsrc/app/loans/loans-view/loans-view.component.scsssrc/app/loans/loans-view/loans-view.component.tssrc/app/loans/loans-view/transactions-tab/transactions-tab.component.htmlsrc/app/loans/loans-view/transactions-tab/transactions-tab.component.tssrc/app/loans/loans-view/transactions/view-transaction/view-transaction.component.htmlsrc/app/loans/loans-view/transactions/view-transaction/view-transaction.component.tssrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.htmlsrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.scsssrc/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.tssrc/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.htmlsrc/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.scsssrc/app/loans/loans-view/working-capital/loan-account-actions/mark-as-fraud-dialog/mark-as-fraud-dialog.component.tssrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.htmlsrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.scsssrc/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.tssrc/app/loans/loans.service.tssrc/app/loans/models/working-capital/working-capital-loan-account.model.tssrc/assets/translations/cs-CS.jsonsrc/assets/translations/de-DE.jsonsrc/assets/translations/en-US.jsonsrc/assets/translations/es-CL.jsonsrc/assets/translations/es-MX.jsonsrc/assets/translations/fr-FR.jsonsrc/assets/translations/it-IT.jsonsrc/assets/translations/ko-KO.jsonsrc/assets/translations/lt-LT.jsonsrc/assets/translations/lv-LV.jsonsrc/assets/translations/ne-NE.jsonsrc/assets/translations/pt-PT.jsonsrc/assets/translations/sw-SW.json
🚧 Files skipped from review as they are similar to previous changes (13)
- src/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.scss
- src/app/loans/loans-view/general-tab/general-tab.component.html
- src/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.scss
- src/app/loans/common-resolvers/loan-action-button.resolver.ts
- src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.ts
- src/app/loans/loans-view/loans-view.component.html
- src/app/loans/loans-view/loan-account-actions/loan-account-actions.component.html
- src/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.ts
- src/assets/translations/pt-PT.json
- src/app/loans/loans-view/working-capital/loan-account-actions/undo-charge-off-dialog/undo-charge-off-dialog.component.html
- src/app/loans/loans-view/loans-view.component.scss
- src/app/loans/loans-view/working-capital/loan-account-actions/charge-off/charge-off.component.html
- src/assets/translations/lt-LT.json
79697db to
6f8a0ae
Compare
|
@alberto-art3ch Please review the comments |
@adamsaghy The IA comments are mainly about translations, so It is fine |
6f8a0ae to
42d6ba0
Compare
42d6ba0 to
77dd173
Compare
Description
Allow to mark a Working Capital Loan as Charg-Off and Undo Charge-Off
Related issues and discussion
WEB-657
Screenshots
Screen.Recording.2026-08-03.at.5.31.58.PM.mov
Screen.Recording.2026-08-03.at.6.03.03.PM.mov
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.Summary by CodeRabbit