diff --git a/admin/index.php b/admin/index.php index b594779..e60c82f 100644 --- a/admin/index.php +++ b/admin/index.php @@ -1078,21 +1078,40 @@ $allSignups = array_merge($all_customers, $all_vendors); $orderStatus = strtoupper($val['status']); $returnStatus = strtoupper($val['return_order']['status']); - + $style = ''; + $textColor = ''; + $backgroundColor = ''; - $statusClass = ''; - if ($orderStatus === 'UNPAID' || $orderStatus === 'RETURNED') { - $statusClass = '#cb3747'; - } elseif ($orderStatus === 'TO PAY') { - $statusClass = '#50d7ab'; - } elseif ($orderStatus === 'TO SHIP') { - $statusClass = '#9586cd'; - } - elseif ($orderStatus === 'TO RECEIVE') { - $statusClass = '#ffc319'; - } elseif ($orderStatus === 'COMPLETED') { - $statusClass = '#88aaf3'; + switch ($orderStatus) { + case 'TO SHIP': + $backgroundColor = '#8061ef'; + $textColor = 'white'; + break; + case 'TO PAY': + $backgroundColor = '#1E6E58'; + $textColor = 'white'; + break; + case 'TO RECEIVE': + $backgroundColor = '#FFD700'; + $textColor = 'black'; + break; + case 'COMPLETED': + $backgroundColor = '#4c84ff'; + $textColor = 'white'; + break; + case 'RETURNED': + $backgroundColor = '#ff7b7b'; + $textColor = 'white'; + break; + default: + $backgroundColor = '#464646'; + $textColor = 'white'; } + + $style = "display: flex; height: 15px; font-weight: bold; + width: 90px; font-size: 10px !important; padding: 10px; + justify-content: center; align-items: center; + background-color: $backgroundColor; border-radius: 30px; color: $textColor;"; if ($formattedOrderDate == $currentDate) { $ordersDisplayed = true; @@ -1105,7 +1124,7 @@ $allSignups = array_merge($all_customers, $all_vendors);