Skip to content
Snippets Groups Projects
Commit 885f2d8f authored by DewanaGustavus's avatar DewanaGustavus
Browse files

feat: history detail

parent b42f7dcd
No related merge requests found
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>History</title>
<link rel="stylesheet" href="../../styles/Global.css">
<link rel="stylesheet" href="../../styles/history/HistoryDetail.css">
</head>
<body>
<?php
include(dirname(__DIR__) . '/template/Navbar.php');
?>
<div>
<h1>Detail history</h1>
<div class="container">
<?php
// TODO : fetch from REST
$history = ['courierName' => "jamal", 'shippingCost' => 2, 'rating' => 0, 'historyId' => 1];
$productDetails = [
["productName" => "pisau cukur", "quantity" => 69],
["productName" => "ivan gunawan", "quantity" => 420],
["productName" => "pisau cukur 2", "quantity" => 692],
["productName" => "ivan gunawan 2", "quantity" => 4202],
];
?>
<label>Nama Kurir : </label>
<p><?=$history['courierName']?></p>
<label>Biaya ongkir : </label>
<p><?=$history['shippingCost']?></p>
<label>Rating : </label>
<p><?=($history['rating'] === 0) ? 'belum memberi rating' : $history['rating']?></p>
<?php
if($history['rating'] === 0) {
// TODO : giving rating
}
?>
<h3>Product Details</h3>
<table>
<tr>
<th>Product Name</th>
<th>Quantity</th>
</tr>
<?php foreach ($productDetails as $product) { ?>
<tr>
<td><?php echo $product['productName']; ?></td>
<td><?php echo $product['quantity']; ?></td>
</tr>
<?php } ?>
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php
class HistoryDetailController extends Controller{
public function index($id = 0) {
$this->render();
}
}
\ No newline at end of file
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
background-color: #f5f5f5;
color: #333;
margin: 0;
}
.container {
max-width: 600px;
margin: 0 auto;
background-color: #fff;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
text-align: start;
}
h1, h3 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
.container label {
font-weight: bold;
}
.container p {
margin-bottom: 10px;
}
th {
text-align: start;
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment