
hamedandClaude Opus 4.8
f028d6841a
feat: port wallet charge/withdraw modal from tauri to patient admin page
Add manual wallet withdrawal (debit) endpoint mirroring the offline app's
balance guard, and rebuild the patient کیف پول tab around a single
charge/withdraw toggle modal (quick amounts, تومان→ریال conversion,
transaction filters).
Backend:
- POST /api/v1/patient/{uuid}/wallet/withdraw — creates a debit
WalletTransaction; 422 ERR_WALLET_INSUFFICIENT when amount exceeds balance.
- ErrorCodes: ERR_WALLET_INSUFFICIENT ('موجودی کیف پول کافی نیست').
- docs/api/patient.md updated.
Frontend:
- usePatientWallet hook (balance + charge/withdraw mutations).
- WalletTransactionModal (toggle, quick amounts, UI-only payment fields).
- WalletTab: charge button, همه/واریزی/برداشت filters.
Tests: backend withdraw success/insufficient/non-positive/ownership;
frontend modal + wallet tab interactions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 11:56:39 +03:30
..
2026-07-16 11:30:12 +03:30
2026-07-13 15:20:00 +03:30
2026-07-13 16:01:16 +03:30
2026-07-16 11:56:39 +03:30
2026-07-14 19:40:54 +03:30
2026-07-16 10:10:47 +03:30
2026-07-13 15:27:34 +03:30
2026-07-13 15:35:10 +03:30
2026-07-13 14:54:38 +03:30
2026-07-13 14:54:38 +03:30
2026-07-13 11:51:18 +03:30
2026-07-13 11:51:18 +03:30