fix(orders): replace undeclared statusStyles with ORDER_STATUS_MAP
Deploy Canina / deploy (push) Successful in 31s

This commit is contained in:
parsa aghaei committed 2026-08-18 17:29:26 +03:30
1 parent 45ff642981
commit 16c1ecdff2
3 files changed
+539 -539

No files matched your search

+3 -3
View File
@@ -371,8 +371,8 @@ export default function Orders() {
<p style="margin: 0;"><strong>روش پرداخت:</strong> ${paymentMethodText}</p>
</div>
<div style="text-align: left;">
<p style="margin: 0 0 6px 0;"><strong>تلفن خریدار:</strong> ${toPersianDigits(orderToPrint.user?.phone || 'ثبت نشده')}</p>
<p style="margin: 0 0 6px 0;"><strong>وضعیت سفارش:</strong> ${statusStyles[orderToPrint.status]?.label || orderToPrint.status}</p>
<p style="margin: 0 0 6px 0;"><strong>تلفن خریدار:</strong> ${toPersianDigits(orderToPrint.user?.phone || orderToPrint.user?.mobile || 'ثبت نشده')}</p>
<p style="margin: 0 0 6px 0;"><strong>وضعیت سفارش:</strong> ${ORDER_STATUS_MAP[orderToPrint.status]?.label || orderToPrint.status}</p>
<p style="margin: 0;"><strong>نوع سفارش:</strong> ${isRefill ? 'تمدید خودکار (Refill)' : 'عادی'}</p>
</div>
</div>
@@ -638,7 +638,7 @@ export default function Orders() {
disabled={isProcessing}
value={order.status}
onChange={(e) => handleUpdateStatus(order.id, e.target.value)}
className={`text-xs font-bold px-3 py-1.5 rounded-xl border outline-none cursor-pointer transition-all ${statusStyles[order.status]?.color || 'bg-gray-100 text-gray-700'}`}
className={`text-xs font-bold px-3 py-1.5 rounded-xl border outline-none cursor-pointer transition-all ${ORDER_STATUS_MAP[order.status]?.color || 'bg-gray-100 text-gray-700'}`}
>
<option value="pending_payment">در انتظار پرداخت / ناموفق</option>
<option value="processing">در حال پردازش</option>