Skip to content
Snippets Groups Projects
Commit de133e5a authored by Muhammad Umar Fariz Tumbuan's avatar Muhammad Umar Fariz Tumbuan
Browse files

Ngeformat rating: di transaction history pakai jumlah bintang dan di driver...

Ngeformat rating: di transaction history pakai jumlah bintang dan di driver history pakai integer oranya dengan spacing khusus
parent 6da7d3e8
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
......@@ -52,7 +52,7 @@ table.history_table {
}
table.history_table p {
margin: 0;
margin: 5px 0;
padding: 0;
font-style: "Lucida Console", Monaco, monospace;
}
......@@ -85,11 +85,11 @@ p.history_comment {
}
table.history_table th, td {
padding: 5px;
padding: 0 5px;
border-collapse: collapse;
}
p.history_table td {
table.history_table tr td.order_data {
vertical-align: top;
}
......@@ -102,9 +102,20 @@ img.history_pict {
}
.hide_hist_button {
button.hide_hist_button {
margin: 0;
color: white;
background-color: red;
font-size: 9px;
margin-bottom: 45px;
}
.checked {
color:orange
}
.yellow_score {
font-size: 20px;
color: orange;
vertical-align: middle;
}
\ No newline at end of file
......@@ -64,17 +64,19 @@
$driver_query=mysqli_query($con,"SELECT username FROM user WHERE user_id='".$row['cust_id']."'") or die(mysqli_error());
$driver_row=mysqli_fetch_assoc($driver_query);
$driver_name=$driver_row['username'];
$given_score=(int)$row['score'];
echo
"<tr>
<td>
<img class='history_pict' src='../profile/getProfilePict.php?id=".$row['cust_id']."'>
<button class='hide_hist_button' type='button' value='hide' onclick='hide_row(this)'>Hide</button>
</td>
<td>
<td class='order_data'>
<p class='history_date'>".$row['date']."</p>
<p class='history_username'>".$driver_name."</p>
<p class='history_loc'>".$row['pick_city']." - ".$row['dest_city']."</p>
<p class='history_rating'>gave ".$row['score']." stars for this order</p>
<p class='history_rating'>gave <span class='yellow_score'>&nbsp&nbsp".$given_score."&nbsp</span> stars for this order</p>
<p class='history_comment'>and left comment:</p>
<p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p>
</td>
......
......@@ -2,6 +2,7 @@
<html>
<head>
<title>transaction history</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../css/default_style.css">
<link rel="stylesheet" type="text/css" href="../css/history.css">
<link rel="stylesheet" type="text/css" href="../css/header.css">
......@@ -72,11 +73,18 @@
<img class='history_pict' src='../profile/getProfilePict.php?id=".$row['driver_id']."'>
<button class='hide_hist_button' type='button' value='hide' onclick='hide_row(this)'>Hide</button>
</td>
<td>
<td class='order_data'>
<p class='history_date'>".$row['date']."</p>
<p class='history_username'>".$driver_name."</p>
<p class='history_loc'>".$row['pick_city']." - ".$row['dest_city']."</p>
<p class='history_rating'>rating ".$row['score']."</p>
<p class='history_rating'>You rated: ";
for ($i = 0; $i < $row['score']; $i++) {
echo "<span class='fa fa-star checked'></span>";
}
echo
"</p>
<p class='history_comment'>You commented:</p>
<p class='history_comment' style='margin-left: 30px;'>".$row['comment']."</p>
</td>
......
......@@ -5,6 +5,7 @@
<link rel="stylesheet" type="text/css" href="../css/default_style.css">
<link rel="stylesheet" type="text/css" href="../css/order.css">
<link rel="stylesheet" type="text/css" href="../css/header.css">
</head>
<body>
<div class="frame">
......
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