feat: enhance payment status handling and summary in MyPaymentsPage
- Added support for 'partial' payment status in MyPaymentsPage and related components. - Updated API responses to include 'paid_rials' and 'summary' for invoices. - Introduced InvoicePaymentStatus service to derive payment status based on actual payments. - Enhanced tests to cover new payment scenarios including partial payments and payment methods. - Updated documentation to reflect changes in payment status and API responses.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ChevronDownIcon } from '@heroicons/react/24/outline';
|
||||
import { formatDate, formatRial } from '../lib/utils';
|
||||
import { PAYMENT_METHOD_LABELS } from '../lib/paymentMethods';
|
||||
import { FilesServicePaymentsCheck } from './icons/FilesServiceIcons';
|
||||
|
||||
export interface SessionPaymentData {
|
||||
@@ -14,10 +15,7 @@ export interface SessionPaymentData {
|
||||
updated_at?: number;
|
||||
}
|
||||
|
||||
const PAYMENT_LABELS: Record<string, string> = {
|
||||
cash: 'نقدی', card: 'کارت', insurance: 'بیمه', online: 'آنلاین', pending: 'در انتظار',
|
||||
wallet: 'کیف پول', pos: 'کارتخوان',
|
||||
};
|
||||
const PAYMENT_LABELS = PAYMENT_METHOD_LABELS;
|
||||
|
||||
/** vertical hairline divider between meta columns (tauri MUI vertical Divider). */
|
||||
function VDivider({ h = 24 }: { h?: number }) {
|
||||
|
||||
Reference in New Issue
Block a user