-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfarmer_dashboard.html
507 lines (468 loc) · 21 KB
/
farmer_dashboard.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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FarmConnect Dashboard</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css" rel="stylesheet">
<style>
body {
background-color: #f8f9fa;
}
.card {
border: none;
border-radius: 10px;
}
.footer {
background-color: #343a40;
color: white;
padding: 20px 0;
}
</style>
</head>
<body>
<!-- Header -->
<header class="bg-success text-white py-3">
<div class="container d-flex justify-content-between align-items-center">
<h1 class="h3">FarmConnect</h1>
<nav>
<a href="index.html" class="text-white me-3">Home</a>
<!-- Change the Profile link to scroll to the Profile Management section -->
<a href="#profile-management" class="text-white me-3">Profile</a>
<a href="#" class="text-white">Logout</a>
</nav>
</div>
</header>
<!-- Main Content -->
<main class="container my-4">
<!-- Welcome Section -->
<div class="text-center mb-4">
<h2 class="fw-bold">Welcome back, [Farmer's Name]!</h2>
<p class="text-muted">Here’s your dashboard overview.</p>
</div>
<!-- Quick Stats Section -->
<div class="row text-center mb-4">
<!-- Total Earnings -->
<div class="col-md-3 mb-3">
<div class="card shadow-sm">
<div class="card-body">
<i class="bi bi-currency-exchange fs-1 text-success"></i>
<h5 class="card-title mt-3">Total Earnings</h5>
<p class="fs-4 fw-bold text-success">GHS 12,450</p>
</div>
</div>
</div>
<!-- Active Orders -->
<div class="col-md-3 mb-3">
<div class="card shadow-sm">
<div class="card-body">
<i class="bi bi-cart-check fs-1 text-primary"></i>
<h5 class="card-title mt-3">Active Orders</h5>
<p class="fs-4 fw-bold text-primary">15</p>
</div>
</div>
</div>
<!-- Pending Deliveries -->
<div class="col-md-3 mb-3">
<div class="card shadow-sm">
<div class="card-body">
<i class="bi bi-truck fs-1 text-warning"></i>
<h5 class="card-title mt-3">Pending Deliveries</h5>
<p class="fs-4 fw-bold text-warning">7</p>
</div>
</div>
</div>
<!-- Customer Reviews -->
<div class="col-md-3 mb-3">
<div class="card shadow-sm">
<div class="card-body">
<i class="bi bi-stars fs-1 text-info"></i>
<h5 class="card-title mt-3">Customer Reviews</h5>
<p class="fs-4 fw-bold text-info">4.8/5</p>
</div>
</div>
</div>
</div>
<!-- Recent Orders Section -->
<div class="card shadow-sm mb-4">
<div class="card-body">
<h5 class="card-title">Recent Orders</h5>
<p class="text-muted">A quick look at your recent orders.</p>
<table class="table table-bordered">
<thead class="table-success">
<tr>
<th>Order ID</th>
<th>Product</th>
<th>Quantity</th>
<th>Status</th>
<th>Amount (GHS)</th>
</tr>
</thead>
<tbody>
<tr>
<td>001</td>
<td>Tomatoes</td>
<td>50 kg</td>
<td><span class="badge bg-primary">Processing</span></td>
<td>500</td>
</tr>
<tr>
<td>002</td>
<td>Plantains</td>
<td>100 kg</td>
<td><span class="badge bg-warning text-dark">Pending</span></td>
<td>1,000</td>
</tr>
<tr>
<td>003</td>
<td>Carrots</td>
<td>30 kg</td>
<td><span class="badge bg-success">Completed</span></td>
<td>300</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Product Management Section -->
<div class="container mt-5">
<div class="row">
<div class="col-12">
<h3>Product Management</h3>
</div>
</div>
<!-- Add New Product Form -->
<div class="row mt-4">
<div class="col-md-6">
<div class="card">
<div class="card-header">Add New Product</div>
<div class="card-body">
<form>
<div class="form-group">
<label for="product-name">Product Name</label>
<input type="text" class="form-control" id="product-name" placeholder="Enter product name">
</div>
<div class="form-group">
<label for="product-price">Price (GHS)</label>
<input type="number" class="form-control" id="product-price" placeholder="Enter price">
</div>
<div class="form-group">
<label for="product-stock">Stock Quantity</label>
<input type="number" class="form-control" id="product-stock" placeholder="Enter stock quantity">
</div>
<div class="form-group">
<label for="product-description">Product Description</label>
<textarea class="form-control" id="product-description" rows="3" placeholder="Enter product description"></textarea>
</div>
<button type="submit" class="btn btn-primary">Add Product</button>
</form>
</div>
</div>
</div>
</div>
<!-- Existing Products Table -->
<div class="row mt-4">
<div class="col-12">
<div class="card">
<div class="card-header">Manage Existing Products</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Product Name</th>
<th scope="col">Price</th>
<th scope="col">Stock</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Tomatoes</td>
<td>GHS 10</td>
<td>50</td>
<td>
<button class="btn btn-warning btn-sm">Edit</button>
<button class="btn btn-danger btn-sm">Delete</button>
</td>
</tr>
<tr>
<td>2</td>
<td>Cassava</td>
<td>GHS 15</td>
<td>30</td>
<td>
<button class="btn btn-warning btn-sm">Edit</button>
<button class="btn btn-danger btn-sm">Delete</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Financials Section -->
<div class="container mt-5">
<div class="row">
<div class="col-12">
<h3>Financials</h3>
</div>
</div>
<!-- Total Earnings Card -->
<div class="row mt-4">
<div class="col-12 col-md-6">
<div class="card">
<div class="card-header">Total Earnings</div>
<div class="card-body">
<h4 class="card-title">GHS 5,200</h4>
<p class="card-text">Total earnings from sales in the past month.</p>
</div>
</div>
</div>
<!-- Pending Payments Card -->
<div class="col-12 col-md-6">
<div class="card">
<div class="card-header">Pending Payments</div>
<div class="card-body">
<h4 class="card-title">GHS 1,000</h4>
<p class="card-text">Payments pending confirmation or processing.</p>
</div>
</div>
</div>
</div>
<!-- Payment History Table -->
<div class="row mt-4">
<div class="col-12">
<div class="card">
<div class="card-header">Payment History</div>
<div class="card-body">
<table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Payment Date</th>
<th scope="col">Amount</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2025-01-10</td>
<td>GHS 500</td>
<td><span class="badge bg-success">Completed</span></td>
</tr>
<tr>
<td>2</td>
<td>2025-01-05</td>
<td>GHS 1,200</td>
<td><span class="badge bg-warning">Pending</span></td>
</tr>
<tr>
<td>3</td>
<td>2025-01-01</td>
<td>GHS 1,000</td>
<td><span class="badge bg-success">Completed</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- Profile Management Section with Tabs -->
<div class="container mt-5">
<div class="row">
<!-- Profile Management Section -->
<div id="profile-management" class="container mt-5">
<h3>Profile Management</h3>
<!-- Rest of the Profile Management content here -->
</div>
</div>
<!-- Nav Tabs for Profile Management -->
<ul class="nav nav-tabs" id="profileTab" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="profile-info-tab" data-bs-toggle="tab" href="#profile-info" role="tab" aria-controls="profile-info" aria-selected="true">Profile Info</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="change-password-tab" data-bs-toggle="tab" href="#change-password" role="tab" aria-controls="change-password" aria-selected="false">Change Password</a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content mt-3" id="profileTabContent">
<!-- Profile Info Tab -->
<div class="tab-pane fade show active" id="profile-info" role="tabpanel" aria-labelledby="profile-info-tab">
<div class="card">
<div class="card-header">Profile Information</div>
<div class="card-body">
<!-- Editable Profile Form -->
<form id="profileForm">
<div class="mb-3">
<label for="profileName" class="form-label">Name</label>
<input type="text" class="form-control" id="profileName" value="John Doe">
</div>
<div class="mb-3">
<label for="farmName" class="form-label">Farm Name</label>
<input type="text" class="form-control" id="farmName" value="Green Acres Farm">
</div>
<div class="mb-3">
<label for="phone" class="form-label">Phone</label>
<input type="text" class="form-control" id="phone" value="+233 123 456 789">
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" value="johndoe@email.com">
</div>
<div class="mb-3">
<label for="location" class="form-label">Location</label>
<input type="text" class="form-control" id="location" value="Takoradi, Western Region, Ghana">
</div>
<!-- Save Changes Button -->
<button type="submit" class="btn btn-success">Save Changes</button>
</form>
<!-- Edit Profile Button (visible when form is not editing) -->
<button id="editProfileButton" class="btn btn-primary mt-3">Edit Profile</button>
</div>
</div>
</div>
<!-- Change Password Tab -->
<div class="tab-pane fade" id="change-password" role="tabpanel" aria-labelledby="change-password-tab">
<div class="card">
<div class="card-header">Change Password</div>
<div class="card-body">
<form>
<div class="mb-3">
<label for="currentPassword" class="form-label">Current Password</label>
<input type="password" class="form-control" id="currentPassword" required>
</div>
<div class="mb-3">
<label for="newPassword" class="form-label">New Password</label>
<input type="password" class="form-control" id="newPassword" required>
</div>
<div class="mb-3">
<label for="confirmPassword" class="form-label">Confirm New Password</label>
<input type="password" class="form-control" id="confirmPassword" required>
</div>
<button type="submit" class="btn btn-success">Update Password</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Marketing & Promotions Section -->
<div class="container mt-5">
<h3>Marketing & Promotions</h3>
<!-- Tab Navigation for Marketing & Promotions -->
<ul class="nav nav-tabs" id="marketingTab" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="discounts-offers-tab" data-bs-toggle="tab" href="#discounts-offers" role="tab" aria-controls="discounts-offers" aria-selected="true">Discounts & Offers</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="featured-products-tab" data-bs-toggle="tab" href="#featured-products" role="tab" aria-controls="featured-products" aria-selected="false">Featured Products</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="seasonal-campaigns-tab" data-bs-toggle="tab" href="#seasonal-campaigns" role="tab" aria-controls="seasonal-campaigns" aria-selected="false">Seasonal Campaigns</a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content mt-3" id="marketingTabContent">
<!-- Discounts & Offers Tab -->
<div class="tab-pane fade show active" id="discounts-offers" role="tabpanel" aria-labelledby="discounts-offers-tab">
<div class="card">
<div class="card-header">Manage Discounts & Offers</div>
<div class="card-body">
<form id="discountForm">
<div class="mb-3">
<label for="discountTitle" class="form-label">Discount Title</label>
<input type="text" class="form-control" id="discountTitle" placeholder="Enter discount title (e.g., Christmas Sale)">
</div>
<div class="mb-3">
<label for="discountPercentage" class="form-label">Discount Percentage (%)</label>
<input type="number" class="form-control" id="discountPercentage" placeholder="Enter discount percentage (e.g., 20)">
</div>
<div class="mb-3">
<label for="discountStartDate" class="form-label">Start Date</label>
<input type="date" class="form-control" id="discountStartDate">
</div>
<div class="mb-3">
<label for="discountEndDate" class="form-label">End Date</label>
<input type="date" class="form-control" id="discountEndDate">
</div>
<button type="submit" class="btn btn-primary">Create Discount</button>
</form>
</div>
</div>
</div>
<!-- Featured Products Tab -->
<div class="tab-pane fade" id="featured-products" role="tabpanel" aria-labelledby="featured-products-tab">
<div class="card">
<div class="card-header">Manage Featured Products</div>
<div class="card-body">
<form id="featuredProductsForm">
<div class="mb-3">
<label for="productSelection" class="form-label">Select Product</label>
<select class="form-select" id="productSelection">
<option value="">Select product</option>
<option value="1">Product 1</option>
<option value="2">Product 2</option>
<option value="3">Product 3</option>
<!-- Add other products here dynamically -->
</select>
</div>
<button type="submit" class="btn btn-success">Mark as Featured</button>
</form>
</div>
</div>
</div>
<!-- Seasonal Campaigns Tab -->
<div class="tab-pane fade" id="seasonal-campaigns" role="tabpanel" aria-labelledby="seasonal-campaigns-tab">
<div class="card">
<div class="card-header">Manage Seasonal Campaigns</div>
<div class="card-body">
<form id="seasonalCampaignForm">
<div class="mb-3">
<label for="campaignTitle" class="form-label">Campaign Title</label>
<input type="text" class="form-control" id="campaignTitle" placeholder="Enter campaign title (e.g., Harvest Deals)">
</div>
<div class="mb-3">
<label for="campaignStartDate" class="form-label">Start Date</label>
<input type="date" class="form-control" id="campaignStartDate">
</div>
<div class="mb-3">
<label for="campaignEndDate" class="form-label">End Date</label>
<input type="date" class="form-control" id="campaignEndDate">
</div>
<button type="submit" class="btn btn-danger">Start Campaign</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Optional Success Alert for Successful Actions -->
<div id="marketingSuccessAlert" class="alert alert-success alert-dismissible fade show" role="alert" style="display: none;">
<strong>Action completed successfully!</strong> The marketing action has been applied.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Optional Error Alert for Errors -->
<div id="marketingErrorAlert" class="alert alert-danger alert-dismissible fade show" role="alert" style="display: none;">
<strong>Oops!</strong> Something went wrong. Please try again.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</main>
<!-- Footer -->
<footer class="footer text-center">
<p>© 2025 FarmConnect - Empowering Farmers in Ghana</p>
</footer>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>