-
Notifications
You must be signed in to change notification settings - Fork 0
/
customer.html
67 lines (63 loc) · 2.26 KB
/
customer.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Customer Panel</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" />
<script src="./jquery-3.6.0.min.js"></script>
<style>
#back {
position: absolute;
color: white;
left: 10px;
cursor: pointer;
}
.buy-btn {
background-color: green;
height: 20px;
width: 40px;
}
.buy-btn[disabled] {
background-color: #cccccc;
}
</style>
</head>
<body>
<header style="background-color: #2c3c80; color: white" class="text-center">
<div onclick="location.href = 'index.html'" id="back">< Home</div>
<h1>VIMTO SOFTDRINKS DISPENSER</h1>
<h2>Customer Panel</h2>
</header>
<p>Insert coin here</p>
<div id="wallet">
<button class="btn btn-primary" onclick="insert(event)" id="0" value="100" > RM1 </button>
<button class="btn btn-primary" onclick="insert(event)" id="1" value="50"> 50sen </button>
<button class="btn btn-primary" onclick="insert(event)" id="2" value="20"> 20sen </button>
<button class="btn btn-primary" onclick="insert(event)" id="3" value="10"> 10sen </button>
<button class="btn btn-primary" onclick="flashInvalid()"> Invalid coin </button>
</div>
<p>Total coin inserted: <span id="inserted">RM 0</span></p>
<p>Error: <span id="invalidMsg">-</span></p>
<div id="choose-brand">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Brand</th>
<th>Price</th>
<th>Stock</th>
<th>Press to select</th>
</tr>
</thead>
<tbody> </tbody>
</table>
</div>
<button class="btn btn-primary" id="terminate-btn" onclick="terminate()" disabled > Terminate </button>
<button class="btn btn-primary" id="collect-change-btn" onclick="collectChange()" disabled > Collect change </button>
<div id="deposit-change"></div>
<span id="insufficient-change"></span>
<script src="./js/customer.js"></script>
</body>
</html>