Align admin order statuses with server adminStatus mapping.

Add terminal statuses, check_correction tab, and consistent status labels for cancelled/rejected/expired orders.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-08 14:55:34 +03:30
co-authored by Cursor
parent 7fc9f98f86
commit 0ac7da4f1e
3 changed files with 15 additions and 7 deletions
+1
View File
@@ -6,6 +6,7 @@ defineProps<{
status: OrderStatus | 'active' | 'inactive' | 'pending_check_review'
}>()
/** فقط وضعیت‌هایی که سفارش نیستند */
const extraMeta: Record<string, { label: string; tone: string }> = {
active: { label: 'فعال', tone: 'success' },
inactive: { label: 'غیرفعال', tone: 'neutral' },
+4 -1
View File
@@ -2,10 +2,13 @@ export type OrderStatus =
| 'pending_review'
| 'pending_check'
| 'needs_correction'
| 'check_correction'
| 'final_approval'
| 'shipped'
| 'delivered'
| 'check_correction'
| 'cancelled'
| 'rejected'
| 'expired'
export type SettlementMethod = 'check' | 'cash'
+10 -6
View File
@@ -13,14 +13,18 @@ export const ORDER_STATUS_META: Record<OrderStatus, StatusMeta> = {
final_approval: { label: 'تأیید نهایی', tone: 'success' },
shipped: { label: 'ارسال شده', tone: 'info' },
delivered: { label: 'تحویل شده', tone: 'delivered' },
cancelled: { label: 'لغو شده', tone: 'neutral' },
rejected: { label: 'رد شده', tone: 'danger' },
expired: { label: 'منقضی شده', tone: 'neutral' },
}
export const ORDER_TABS = [
{ key: 'all', label: 'همه' },
{ key: 'pending_review', label: 'در انتظار بررسی', count: 18 },
{ key: 'pending_check', label: 'در انتظار چک', count: 9 },
{ key: 'needs_correction', label: 'نیاز به اصلاح', count: 6 },
{ key: 'final_approval', label: 'تأیید نهایی', count: 24 },
{ key: 'shipped', label: 'ارسال شده', count: 12 },
{ key: 'delivered', label: 'تحویل شده', count: 34 },
{ key: 'pending_review', label: 'در انتظار بررسی' },
{ key: 'pending_check', label: 'در انتظار چک' },
{ key: 'needs_correction', label: 'نیاز به اصلاح' },
{ key: 'check_correction', label: 'اصلاح چک' },
{ key: 'final_approval', label: 'تأیید نهایی' },
{ key: 'shipped', label: 'ارسال شده' },
{ key: 'delivered', label: 'تحویل شده' },
] as const