feat: update session payment logic to ensure accurate payable amounts and reflect consumables in cost breakdown
- Adjusted the calculation of payable amounts in PaymentStep to align with server logic, ensuring overpayments are handled correctly. - Enhanced DetailsStep to include consumables in the itemized cost breakdown, ensuring consistency with patient share calculations. - Updated tests for SessionPaymentPage to validate new behavior regarding overpayments and consumable listings. - Modified PatientController to register SessionPayment correctly when settling sessions via wallet, preventing double charges. - Refactored WalletService to remove outdated methods and ensure wallet transactions reflect the correct amounts after discounts. - Improved accessibility in SearchableSelect component by adding aria labels and ensuring proper role attributes for screen readers. - Updated styles to ensure minimum touch targets meet WCAG guidelines for mobile usability.
This commit is contained in:
@@ -14,7 +14,8 @@ import { api, ApiError } from '@/lib/api';
|
||||
const replaceMock = vi.fn();
|
||||
|
||||
function jsonRes(body: unknown, ok = true, status = 200): Response {
|
||||
return { ok, status, json: () => Promise.resolve(body) } as unknown as Response;
|
||||
// headers لازم است: api.ts پیش از خواندن بدنه، Content-Length را برای پاسخ خالی چک میکند
|
||||
return { ok, status, headers: new Headers(), json: () => Promise.resolve(body) } as unknown as Response;
|
||||
}
|
||||
|
||||
function setToken(token: string) {
|
||||
|
||||
Reference in New Issue
Block a user