Commits
Marek Vsechovsky committed 8d923384f1d
Session 154, Step 3: Implement 'Update remaining credit' button with manual adjustment and FIFO subtraction
- AIM-2860 Implement 'Update remaining credit' button with manual adjustment and FIFO subtraction
Outcome:
**AIM-2860** — Added `#wfS4UpdateCredit` button to the credit tracking row in Wf S4. Button is hidden by default, appears when user edits the starting credit input to a value different from `_wfS4OriginalCreditValue`. Validates `newRemaining <= provider.creditRemaining` client-side before calling `POST /api/workflow/credit-providers/{id}/adjust-credit`. On success, updates local `_creditProvidersCache` with server response (provider creditRemaining + per-purchase remaining), resets `_wfS4OriginalCreditValue`, and shows success toast. Button hides again on provider dropdown switch or manage-providers dialog close. Grid layout updated from 3 to4 columns to accommodate the button alongside the suffix.