feat(payment): update payment status values to use 'success' and 'failed' instead of 'received' and add new status
This commit is contained in:
@@ -15,9 +15,10 @@ const appointmentMap: Record<AppointmentStatus, { color: BadgeColor; label: stri
|
|||||||
|
|
||||||
const paymentMap: Record<PaymentStatus, { color: BadgeColor; label: string }> = {
|
const paymentMap: Record<PaymentStatus, { color: BadgeColor; label: string }> = {
|
||||||
pending: { color: 'amber', label: 'در انتظار' },
|
pending: { color: 'amber', label: 'در انتظار' },
|
||||||
received: { color: 'green', label: 'موفق' },
|
success: { color: 'green', label: 'موفق' },
|
||||||
|
failed: { color: 'red', label: 'ناموفق' },
|
||||||
canceled: { color: 'red', label: 'لغو شده' },
|
canceled: { color: 'red', label: 'لغو شده' },
|
||||||
refund: { color: 'blue', label: 'استرداد' },
|
refunded: { color: 'blue', label: 'استرداد' },
|
||||||
};
|
};
|
||||||
|
|
||||||
const smsMap: Record<SmsTemplateStatus, { color: BadgeColor; label: string }> = {
|
const smsMap: Record<SmsTemplateStatus, { color: BadgeColor; label: string }> = {
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ import Pagination from '../components/ui/Pagination';
|
|||||||
const STATUS_FILTERS = [
|
const STATUS_FILTERS = [
|
||||||
{ value: '', label: 'همه' },
|
{ value: '', label: 'همه' },
|
||||||
{ value: 'pending', label: 'در انتظار' },
|
{ value: 'pending', label: 'در انتظار' },
|
||||||
{ value: 'received', label: 'موفق' },
|
{ value: 'success', label: 'موفق' },
|
||||||
|
{ value: 'failed', label: 'ناموفق' },
|
||||||
{ value: 'canceled', label: 'لغو شده' },
|
{ value: 'canceled', label: 'لغو شده' },
|
||||||
{ value: 'refund', label: 'استرداد' },
|
{ value: 'refunded', label: 'استرداد' },
|
||||||
];
|
];
|
||||||
|
|
||||||
export default function PaymentsPage() {
|
export default function PaymentsPage() {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export interface Appointment {
|
|||||||
created_at: string;
|
created_at: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PaymentStatus = 'pending' | 'received' | 'canceled' | 'refund';
|
export type PaymentStatus = 'pending' | 'success' | 'failed' | 'canceled' | 'refunded';
|
||||||
export type PaymentGateway = 'mellat' | 'sep';
|
export type PaymentGateway = 'mellat' | 'sep';
|
||||||
|
|
||||||
export interface Payment {
|
export interface Payment {
|
||||||
|
|||||||
Reference in New Issue
Block a user