diff --git a/src/views/Profile.php b/src/views/Profile.php index d4c8be9..09fd683 100644 --- a/src/views/Profile.php +++ b/src/views/Profile.php @@ -8,7 +8,7 @@ * @var Client $client signed in client * @var Order[] $orders array of orders * @var bool $show_account_deletion_confirmation Whether to display a confirmation dialog for account deletion - * @var bool $reorder_cancel Whether to display reorder and cancel buttons + * @var string $order_action_error Error when user performed action on orders tab */ use Steamy\Model\Client; @@ -16,7 +16,8 @@ ?> - +

Deleting your account!

@@ -29,7 +30,8 @@
- +

My profile

@@ -72,6 +74,12 @@

Orders summary

+ +
ERROR 🔺: .
+ +
@@ -87,36 +95,30 @@ foreach ($orders as $order) { $date = htmlspecialchars($order->getCreatedDate()->format('Y-m-d H:i:s')); $id = filter_var($order->getOrderID(), FILTER_SANITIZE_NUMBER_INT); - $storeid = filter_var($order->getStoreID(), FILTER_SANITIZE_NUMBER_INT); + $store_id = filter_var($order->getStoreID(), FILTER_SANITIZE_NUMBER_INT); $status = htmlspecialchars(ucfirst($order->getStatus()->value)); $totalPrice = htmlspecialchars(number_format($order->calculateTotalPrice(), 2)); // Determine button states - $cancelDisabled = $status === 'completed' ? 'disabled' : ''; - $reorderDisabled = $status !== 'completed' ? 'disabled' : ''; + $cancelDisabled = $order->getStatus()->value === 'completed' ? 'disabled' : ''; echo <<< EOL - + - EOL; - if ($reorder_cancel) { - echo <<< EOL - - EOL; - } - echo ""; + + EOL; } ?>
$id$storeid$store_id $date $status \$$totalPrice -
- +
+ - - + +