feat(orders): add shipping address display to order detail page

This commit is contained in:
hosseintaromi 2025-12-27 17:59:32 +03:30
parent bdf5ab0c7c
commit 3467c5e459
12 changed files with 41 additions and 0 deletions

View File

@ -243,6 +243,14 @@ const OrderDetailPage = () => {
<div className="space-y-3">
<div className="p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg border border-gray-200 dark:border-gray-600">
<div className="space-y-2.5 text-sm">
{(order.shipping_address.first_name || order.shipping_address.last_name) && (
<div className="flex items-start gap-2">
<span className="font-medium text-gray-700 dark:text-gray-300 shrink-0 min-w-[80px]">نام و نام خانوادگی:</span>
<span className="text-gray-900 dark:text-gray-100 break-words">
{[order.shipping_address.first_name, order.shipping_address.last_name].filter(Boolean).join(' ') || 'نامشخص'}
</span>
</div>
)}
{order.shipping_address.name && (
<div className="flex items-start gap-2">
<span className="font-medium text-gray-700 dark:text-gray-300 shrink-0 min-w-[80px]">نام:</span>

View File

@ -29,3 +29,6 @@ export const useUpdatePaymentCard = () => {
};

View File

@ -18,3 +18,6 @@ export interface UpdatePaymentCardResponse {
}

View File

@ -20,3 +20,6 @@ export const updatePaymentCard = async (
};

View File

@ -33,3 +33,6 @@ export const useUpdateIPGStatus = () => {
};

View File

@ -28,3 +28,6 @@ export const IPG_LABELS: Record<IPGType, string> = {
};

View File

@ -20,3 +20,6 @@ export const updateIPGStatus = async (
};

View File

@ -148,3 +148,6 @@ const IPGListPage = () => {
export default IPGListPage;

View File

@ -29,3 +29,6 @@ export const useUpdateWalletStatus = () => {
};

View File

@ -25,3 +25,6 @@ export const WALLET_LABELS: Record<WalletType, string> = {
};

View File

@ -20,3 +20,6 @@ export const updateWalletStatus = async (
};

View File

@ -148,3 +148,6 @@ const WalletListPage = () => {
export default WalletListPage;