Commits
Marek Vsechovsky committed ab683dbb07c
Session 154, Step 1: Fix Wf S4 credit tracking UI not rendering (remaining credit + provider dropdown missing) - AIM-2851 Fix Wf S4 credit tracking UI not rendering (remaining credit + provider dropdown missing) - AIM-2852 Add OrgId column to AiCreditProvider model, context, and CRUD endpoints - AIM-2853 Rename AiCreditProviderPurchase columns and add AiCPPurchaseTypeId FK - AIM-2854 Add AiCreditProviderCreditRemaining column to AiCreditProvider table - AIM-2855 Create AiCreditProviderPurchaseType table, model, and context - AIM-2856 Update 'Add purchase' dialog with purchase type dropdown, pre-population, and new styling - AIM-2857 Filter 'Manage credit providers' dialog to show only purchases with remaining credit > 0 - AIM-2858 Update Wf S4 dropdown to show provider name with dynamic per-unit rate - AIM-2859 Implement FIFO credit consumption logic in _processS4TaskWithCredit - AIM-2860 Implement 'Update remaining credit' button with manual adjustment and FIFO subtraction Outcome: Completed full refactor of AI credit tracking system. Updated SQL schema (3 tables), C# models (3 files), DbContext, WorkflowController CRUD endpoints (provider, purchase, purchase type, FIFO consume, adjust-credit), and JavaScript UI (dropdown, dialogs, FIFO consumption, update remaining credit button).