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:
@@ -58,7 +58,7 @@ const clinicPayload = {
|
||||
service_name: 'ویزیت عمومی',
|
||||
slot_start: 1_718_000_000,
|
||||
slot_end: 1_718_001_800,
|
||||
status: 'visited',
|
||||
status: 'completed',
|
||||
},
|
||||
],
|
||||
doctors: [],
|
||||
@@ -95,9 +95,9 @@ describe('DashboardPage (ported clinic dashboard)', () => {
|
||||
expect(screen.getByText('09136549874')).toBeInTheDocument();
|
||||
expect(screen.getByText('ویزیت عمومی')).toBeInTheDocument();
|
||||
|
||||
// ستون «وضعیت» از داشبورد حذف شده — تغییر وضعیت فقط در صفحه نوبتهاست
|
||||
expect(screen.queryByText('وضعیت')).not.toBeInTheDocument();
|
||||
expect(screen.queryByText('ویزیت شده')).not.toBeInTheDocument();
|
||||
// ستون «وضعیت» هست، ولی در داشبورد فقط خواندنی (بدون queryKey → StatusPill نه dropdown)
|
||||
expect(screen.getByText('وضعیت')).toBeInTheDocument();
|
||||
expect(screen.getByText('ویزیت شده').closest('button')).toBeNull();
|
||||
|
||||
// کارت «پزشکان کلینیک» از داشبورد حذف شده
|
||||
expect(screen.queryByText('پزشکان کلینیک')).not.toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user