improved styling of badge for order status on vendor dashboard
This commit is contained in:
parent
53698a00b0
commit
af34ad5738
|
@ -297,45 +297,45 @@ if ($_SESSION["isCustomer"] == true) {
|
|||
</td>
|
||||
<td style="max-width:300px;"><span class="text-truncate"><?php echo $item['product']['name']; ?></span></td>
|
||||
<?php
|
||||
$status = $orderItems['status'];
|
||||
$style = '';
|
||||
$textColor = '';
|
||||
$borderColor = '';
|
||||
$status = $orderItems['status'];
|
||||
$style = '';
|
||||
$textColor = '';
|
||||
$backgroundColor = '';
|
||||
|
||||
switch ($status) {
|
||||
case 'TO SHIP':
|
||||
$borderColor = 'mint';
|
||||
$textColor = 'min'; // Change this to match the text color you prefer
|
||||
break;
|
||||
case 'TO PAY':
|
||||
$borderColor = '#E0EA00';
|
||||
$textColor = '#E0EA00';
|
||||
break;
|
||||
case 'TO RECEIVE':
|
||||
$borderColor = '#20FF5A';
|
||||
$textColor = '#20FF5A';
|
||||
break;
|
||||
case 'COMPLETED':
|
||||
$borderColor = '#2098FF';
|
||||
$textColor = '#2098FF'; // Change this to match the text color you prefer
|
||||
break;
|
||||
case 'TO REFUND':
|
||||
$borderColor = '#FF5320';
|
||||
$textColor = '#FF5320';
|
||||
break;
|
||||
default:
|
||||
// Default styles if the status doesn't match any case
|
||||
$borderColor = '#464646';
|
||||
$textColor = '#464646';
|
||||
}
|
||||
switch (strtoupper($status)) {
|
||||
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';
|
||||
}
|
||||
|
||||
// Generating style attribute based on the selected colors
|
||||
$style = "display: flex; height: 15px;font-weight:400; width:90px; margin-top:10px; font-size:10px !important; justify-content:center; align-items:center; padding: 10px; border: 3px solid $borderColor; border-radius: 30px; color: $textColor;";
|
||||
|
||||
?>
|
||||
|
||||
<td><span style="<?php echo $style; ?>"> <p><?php echo $status; ?></p></span></td>
|
||||
// Generating style attribute based on the selected colors
|
||||
$style = "display: flex; height: 15px; font-weight: bold;
|
||||
width: 90px; font-size: 10px !important;
|
||||
justify-content: center; align-items: center; padding: 10px;
|
||||
background-color: $backgroundColor; border-radius: 30px; color: $textColor;";
|
||||
?>
|
||||
|
||||
<td><span style="<?php echo $style; ?>"> <p><?php echo $status; ?></p></span></td>
|
||||
<td><span style="text-transform:capitalize"><?php echo $orderItems['shipping_address']['shipping_first_name']; ?></span></td>
|
||||
<td ><span><?php echo $orderItems['total_amount']; ?></span></td>
|
||||
<td style="display:flex; justify-content:center; margin-top:-4px;">
|
||||
|
|
Loading…
Reference in New Issue