-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·347 lines (338 loc) · 10.4 KB
/
index.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fair Trade Coffee</title>
<link
rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<link
href="https://fonts.googleapis.com/css?family=Roboto"
rel="stylesheet"
/>
<link rel="stylesheet" type="text/css" href="style.css" />
<style>
.col-md-4 > .form-group {
border: 1px solid rgb(18, 41, 117);
/* margin-bottom: 1px;
margin-right: 1px; */
width: 100%;
}
.col-md-12 > .form-group {
width: 100%;
}
.col-md-12 > .form-group > input[type='text'] {
width: 350px;
/* background-color: greenyellow; */
}
</style>
</head>
<body>
<div class="container">
<h1 style="text-align: center;">Fair Trade Coffee</h1>
<hr />
<p style="text-align: center;">
Prove the authenticity of coffee using the Ethereum blockchain.
</p>
<h2>Role Registeration</h2>
<div class="row">
<div class="col-md-8 form-inline">
<div class="col-md-12">
<!-- <h2>Farmer Register</h2> -->
<div class="form-group">
<label for="usr">New Farmer ID:</label>
<input
type="text"
class="form-control"
id="newFarmerID"
name="newFarmerID"
value="0x018c2dabef4904ecbd7118350a0c54dbeae3549a"
size="50"
/>
<button type="button" class="btn btn-info" data-id="11">
Save
</button>
</div>
<!-- form-group -->
</div>
<!-- col-md-12 -->
<div class="col-md-12">
<!-- <h2>Distributor Register</h2> -->
<div class="form-group">
<label for="usr">New Distributor ID:</label>
<input
type="text"
class="form-control"
id="newDistributorID"
name="newDistributorID"
value="0xce5144391b4ab80668965f2cc4f2cc102380ef0a"
size="50"
/>
<button type="button" class="btn btn-info" data-id="12">
Save
</button>
</div>
<!-- form-group -->
</div>
<!-- col-md-12 -->
<div class="col-md-12">
<!-- <h2>Retailer Register</h2> -->
<div class="form-group">
<label for="usr">New Retailer ID:</label>
<input
type="text"
class="form-control"
id="newRetailerID"
name="newRetailerID"
value="0x460c31107dd048e34971e57da2f99f659add4f02"
size="50"
/>
<button type="button" class="btn btn-info" data-id="13">
Save
</button>
</div>
<!-- form-group -->
</div>
<!-- col-md-12 -->
<div class="col-md-12">
<!-- <h2>Consumer Register</h2> -->
<div class="form-group">
<label for="usr">New Consumer ID:</label>
<input
type="text"
class="form-control"
id="newConsumerID"
name="newConsumerID"
value="0xd37b7b8c62be2fdde8daa9816483aebdbd356088"
size="50"
/>
<button type="button" class="btn btn-info" data-id="14">
Save
</button>
</div>
<!-- form-group -->
</div>
<!-- col-md-12 -->
</div>
<!-- col-md-8 -->
</div>
<!-- row -->
<div class="row">
<div class="col-md-4">
<h2>Product Overview</h2>
<div class="form-group">
SKU
<br />
<input
class="input-field"
type="number"
id="sku"
name="sku"
value="1"
/><br />
UPC
<br />
<input type="number" id="upc" name="upc" value="1" /><br />
Current Owner ID
<br />
<input
type="text"
id="ownerID"
name="ownerID"
value="0x963865f57804b38459dd4b2da2f760211a200438"
size="50"
/><br />
<div class="button-div">
<button
class="btn-fetchOne"
id="button"
type="button"
data-id="9"
>
Fetch Data 1
</button>
<button
class="btn-fetchTwo"
id="button"
type="button"
data-id="10"
>
Fetch Data 2
</button>
</div>
</div>
<!-- form-group -->
</div>
<!-- col-md-4 -->
<div class="col-md-4">
<h2>Farmer Stage</h2>
<div class="form-group">
Farmer ID
<br />
<input
type="text"
id="originFarmerID"
name="originFarmerID"
value="0x018c2dabef4904ecbd7118350a0c54dbeae3549a"
size="50"
/><br />
Farm Name
<br />
<input
type="text"
id="originFarmName"
name="originFarmName"
value="Greenwell Kona Coffee"
/><br />
Farm Information
<br />
<input
style="width:100%;"
type="text"
id="originFarmInformation"
name="originFarmInformation"
value="The Greenwell Farms legacy began in 1850 when Henry Nicholas Greenwell left England and first set foot on the fertile soil of rural Kona."
/><br />
Farm Latitude
<br />
<input
type="text"
id="originFarmLatitude"
name="originFarmLatitude"
value="-38.239770"
/><br />
Farm Longitude
<br />
<input
type="text"
id="originFarmLongitude"
name="originFarmLongitude"
value="144.341490"
/><br />
Product Notes
<br />
<input
type="text"
id="productNotes"
name="productNotes"
value="Best beans for Espresso"
size="60"
/><br />
<br />
<button class="btn-harvest" id="button" type="button" data-id="1">
Harvest
</button>
<button class="btn-process" id="button" type="button" data-id="2">
Process
</button>
<button class="btn-pack" id="button" type="button" data-id="3">
Pack
</button>
<button class="btn-forsale" id="button" type="button" data-id="4">
ForSale
</button>
</div>
<!-- form-group -->
</div>
<!-- col-md-4 -->
<div class="col-md-4">
<h2>Distributor Stage</h2>
<div class="form-group">
Product Price
<br />
<input
type="number"
id="productPrice"
name="productPrice"
value="2"
/>ETH<br />
Distributor ID
<br />
<input
type="text"
id="distributorID"
name="distributorID"
value="0xce5144391b4ab80668965f2cc4f2cc102380ef0a"
size="50"
/>
<button class="btn-buy" id="button" type="button" data-id="5">
Buy
</button>
<button class="btn-ship" id="button" type="button" data-id="6">
Ship
</button>
</div>
<!-- form-group -->
<div class="form-group">
Retailer ID
<br />
<input
type="text"
id="retailerID"
name="retailerID"
value="0x460c31107dd048e34971e57da2f99f659add4f02"
size="50"
/><br />
<button class="btn-receive" id="button" type="button" data-id="7">
Receive
</button>
</div>
<!-- form-group -->
<div class="form-group">
Consumer ID
<br />
<input
type="text"
id="consumerID"
name="consumerID"
value="0xd37b7b8c62be2fdde8daa9816483aebdbd356088"
size="50"
/><br />
<br />
<button class="btn-purchase" id="button" type="button" data-id="8">
Purchase
</button>
</div>
<!-- form-group -->
</div>
<!--
const distributorID = accounts[2]; 0xce5144391b4ab80668965f2cc4f2cc102380ef0a
const retailerID = accounts[3]; 0x460c31107dd048e34971e57da2f99f659add4f02
const consumerID = accounts[4]; 0xd37b7b8c62be2fdde8daa9816483aebdbd356088
-->
<!-- col-md-4 -->
</div>
<!-- row -->
</div>
<!-- <div id="ftc-harvest">
<div class="form-break"></div>
<div class="form-break"></div>
<div class="form-break"></div>
<hr />
</div> -->
<h2>Transaction History<span id="ftc-history"></span></h2>
<div>
<ul id="ftc-events">
<!-- Events will appear here from app.js -->
</ul>
<br />
<hr />
</div>
<h2>Transaction Logs<span id="ftc-history"></span></h2>
<div>
<ul id="ftc-logs">
<!-- Events will appear here from app.js -->
</ul>
<br />
<hr />
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- <script src="js/web3.min.js"></script> -->
<script src="js/truffle-contract.js"></script>
<script src="js/app.js"></script>
</body>
</html>