status payment dynamic
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import type { FC } from 'react'
|
||||
import type { Order } from '../types/Types'
|
||||
import { PaymentStatusEnum } from '../enum/Enum'
|
||||
import { OrderStatus } from '../enum/Enum'
|
||||
import { DeliveryMethodEnum } from '@/pages/shipmentMethod/enum/Enum'
|
||||
import { PaymentMethodEnum } from '@/pages/paymentMethods/enum/Enum'
|
||||
import { formatPrice, formatFaNumber } from '@/helpers/func'
|
||||
@@ -19,7 +17,8 @@ const PaymentInfo: FC<PaymentInfoProps> = ({
|
||||
getPaymentStatusTextColor,
|
||||
getPaymentStatusText
|
||||
}) => {
|
||||
const paymentStatus = order.paymentStatus || (order.status === OrderStatus.PAID ? PaymentStatusEnum.Paid : PaymentStatusEnum.Pending)
|
||||
|
||||
const paymentStatus = order.payments?.[0]?.status
|
||||
|
||||
const getDeliveryMethodText = (method: string): string => {
|
||||
const methodMap: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user