Date: 2026-05-13 (continuation of Attorney Hub - Payton: Session Export + Agent Handoff (2026-05-13))
Org: samaguiarinjurylawyers2.my.salesforce.com (Org Id 00D5e000005AnDpEAK) — production
CLI alias: LITIFY_TEMP
Local repo: C:\Users\SAguiar\Documents\Projects\litify-hubs\sfdx
Canonical app page: /lightning/n/Attorney_Hub_Payton
Two bodies of work, both deployed to production with passing tests.
Three concerns from Sam were resolved by switching the underlying KPIs from report grand totals (which depended on report filter integrity) to direct SOQL queries inside AttorneyHubPaytonController.
| Concern | Root cause | Fix shipped | Live result |
|---|---|---|---|
| MTD Gross Recovery = R30 Gross Recovery | Reports filtered correctly (THIS MONTH vs LAST 30 DAYS) but the 4/13–4/30 window had zero settlements, so values matched by data coincidence. |
Switched both to SOQL with explicit Closed_Date >= monthStart() and Closed_Date >= today - 30 so the calculation is transparent and will diverge naturally as data flows in. |
MTD $437,550, R30 $437,550 (same today, will diverge once a settlement falls outside the calendar month). |
| "Outcomes YTD" label unclear | Report 00OUV00000BtWDt2AN counts matters where Closed_Reason != null for THIS YEAR — i.e. all closures regardless of reason. |
Renamed the key from outcomesYtd to closedYtd in Apex and relabeled the tile to "CLOSED YTD" (and the report rail label to "Closed Cases YTD"). |
closedYtd = 58. |
| Checks Pending = 91 with stale pre-2023-02-28 rows | Report has no date floor; 81 of 91 rows are Resolutions dated 2022-04 through 2023-02-27 that never had Check_Received filled in. | SOQL override on litify_pm__Resolution__c with litify_pm__Resolution_Date__c >= 2023-02-28 (stored as constant CHECKS_PENDING_FLOOR). |
checksPending = 10. |
New Apex helpers added to AttorneyHubPaytonController:
settlementSumSince(Date) — sum of Total_Settlements_from_Insurance__c for Payton's matters closed at or after a date with Closed_Reason = 'Settlement'checksPendingCount() — count of pending Resolutions with the 2023-02-28 floormonthStart() — first of the current monthTest class updated to assert the renamed closedYtd key. 1/1 test passing.
The second tab of Attorney_Hub_Payton is no longer a raw embedded dashboard. It now hosts a custom LWC attorneyHubPaytonNewCases backed by AttorneyHubPaytonController.getNewCases(). Style mirrors the Overview tab (Aguiar blue #0B212D, accent orange #F89C22, editorial header bar, panel cards, sticky report rail).
What's on the tab, top to bottom: