-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
558 lines (523 loc) · 31.7 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
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
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.lineicons.com/4.0/lineicons.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
</head>
<body >
<div class="wrapper">
<aside id="sidebar">
<div class="d-flex">
<button class="toggle-btn" type="button">
<i class="lni lni-slack-line"></i>
</button>
<div class="sidebar-logo">
<a href="#">Danuka Dev</a>
</div>
</div>
<ul class="sidebar-nav">
<li class="sidebar-item">
<a href="#" class="sidebar-link"id="linkHome">
<i class="lni lni-grid-alt"></i>
<span>Dashboard</span>
</a>
<li class="sidebar-item" >
<a href="#" class="sidebar-link collapsed has-dropdown" id="linkCustomer"
data-bs-target="#auth" aria-expanded="false" aria-controls="auth">
<i class="lni lni-user"></i>
<span>Customers</span>
</a>
</li>
<li class="sidebar-item" >
<a href="#" class="sidebar-link collapsed has-dropdown" id="itemLink""
data-bs-target="#auth" aria-expanded="false" aria-controls="auth">
<i class="lni lni-database"></i>
<span>Items</span>
</a>
</li>
<li class="sidebar-item">
<a href="#" class="sidebar-link collapsed has-dropdown" id="orderLink"
data-bs-target="#multi" aria-expanded="false" aria-controls="multi">
<i class="lni lni-light lni-cart"></i>
<span>Orders</span>
</a>
</li>
<li class="sidebar-item">
<a href="#" class="sidebar-link">
<i class="lni lni-popup"></i>
<span>Notification</span>
</a>
</li>
<li class="sidebar-item">
<a href="#" class="sidebar-link">
<i class="lni lni-cog"></i>
<span>Setting</span>
</a>
</li>
</ul>
<div class="form-check form-switch mx-4">
<input
class="form-check-input p-2"
type="checkbox"
role="switch"
id="flexSwitchCheckChecked"
checked
onclick="myFunction()"
/>
<span class="btndark">Dark Mode</span>
<div class="sidebar-footer">
<a href="#" class="sidebar-link">
<!-- <i class="lni lni-exit"></i> -->
<!-- <span>Logout</span> -->
</a>
</div>
</aside>
<div class="main p-3">
<div class="text-center">
<!-- <h1>Customer Save</h1> -->
</div>
<!--Home-->
<div id="homeContent" class="container-fluid mt-5">
<h1>Point Of Sale System</h1>
<div class="container d-flex justify-content-center align-items-center min-vh-100">
<!----------------------- Login Container -------------------------->
<div class="row border rounded-5 p-3 bg-white shadow box-area">
<!--------------------------- Left Box ----------------------------->
<div class="col-md-6 rounded-4 d-flex justify-content-center align-items-center flex-column left-box" style="background: #103cbe;">
<div class="featured-image mb-3">
<img src="assets/1.png" class="img-fluid" style="width: 250px;">
</div>
<p class="text-white fs-2" style="font-family: 'Courier New', Courier, monospace; font-weight: 600;">Be Verified</p>
<small class="text-white text-wrap text-center" style="width: 17rem;font-family: 'Courier New', Courier, monospace;">Join experienced Designers on this platform.</small>
</div>
<!-------------------- ------ Right Box ---------------------------->
<div class="col-md-6 right-box">
<div class="row align-items-center">
<div class="header-text mb-4">
<h2>Hello,Again</h2>
<p>We are happy to have you back.</p>
</div>
<div class="input-group mb-3">
<input type="text" class="form-control form-control-lg bg-light fs-6" placeholder="Email address">
</div>
<div class="input-group mb-1">
<input type="password" class="form-control form-control-lg bg-light fs-6" placeholder="Password">
</div>
<div class="input-group mb-5 d-flex justify-content-between">
<div class="form-check">
<input type="checkbox" class="form-check-input" id="formCheck">
<label for="formCheck" class="form-check-label text-secondary"><small>Remember Me</small></label>
</div>
<div class="forgot">
<small><a href="#">Forgot Password?</a></small>
</div>
</div>
<div class="input-group mb-3">
<button class="btn btn-lg btn-primary w-100 fs-6">Login</button>
</div>
<div class="input-group mb-3">
<button class="btn btn-lg btn-light w-100 fs-6"><img src="assets/google.png" style="width:20px" class="me-2"><small>Sign In with Google</small></button>
</div>
<div class="row">
<small>Don't have account? <a href="#">Sign Up</a></small>
</div>
</div>
</div>
</div>
</div>
</div>
<!--Customers page-->
<section id="customerContent">
<h1>Customer Save Page</h1>
<div class="container-fluid mt-5 d-flex flex-column">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4 col-xxl-3 ">
<div class="card shadow-lg mb-3">
<div class="card-header text-white" style="background-color: #050C9C;">
New Customer
</div>
<div class="card-body" >
<form class="form-control-sm">
<div class="mb-3">
<label for="txtCusId" class="form-label">Customer ID:</label>
<button id="btnClearCustomer" class="btn btn btn-sm" type="button">
<i class="lni lni-eraser" style="color: black; font-size: 1rem;" ></i> </button>
<input type="text" class="form-control form-control-sm" id="txtCusId">
</div>
<div class="mb-3">
<label for="txtCusName" class="form-label">Customer Name:</label>
<input type="text" class="form-control form-control-sm" id="txtCusName">
</div>
<div class="mb-3">
<label for="txtCusAddress" class="form-label">Customer Address:</label>
<input type="text" class="form-control form-control-sm" id="txtCusAddress">
</div>
<div class="mb-3">
<label for="txtCusSalary" class="form-label">Customer Salary:</label>
<input type="text" class="form-control form-control-sm" id="txtCusSalary">
</div>
<div class="btn-group">
<button id="btnSaveCustomer" type="button" class="btn btn-outline-success btn-sm">Save</button>
<button id="btnUpdateCustomer" class="btn btn-outline-primary btn-sm" type="button">Update</button>
<button id="btnDeleteCustomer" class="btn btn-outline-danger btn-sm" type="button">Delete</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg col-xl col-xxl">
<div class="card mb-4 shadow-lg">
<div class="card-header text-white" style="background-color: #050C9C;">
Search Customer
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl">
<form class="form-control-sm">
<div class="mb-3">
<input type="text" class="form-control form-control-sm" id="exampleInput" placeholder="Search here...">
</div>
<div class="row">
<div class="col-sm-4 col-md-4 col-lg-3 col-xl-3 col-xxl-2">
<button id="btnSearchCustomer" type="button" class="btn btn-outline-success btn-sm mb-2">Search</button>
</div>
<div class="col-sm-6 col-md-6 col-lg-5 col-xl-5 col-xxl-3">
<select class="form-select form-select-sm" aria-label="Default select example" >
<option selected>Name</option>
<option value="1">ID</option>
<option value="2">Address</option>
<option value="3">Salary</option>
</select>
</div>
</div>
</form>
</div>
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl d-flex justify-content-center flex-column">
<!-- Button trigger modal -->
<button id="getAll" type="button" class="btn btn-outline-success w-25 align-self-end" data-bs-toggle="modal" data-bs-target="#exampleModal">
Get All
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">ID</th>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Name</th>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Address</th>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Salary</th>
</tr>
</thead>
<tbody id="modalTable">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="height: 350px; overflow-y: auto;">
<table class="table table-hover table-bordered shadow-lg mb-0">
<thead class="table-light">
<tr>
<th scope="col" class=" text-white" style="background-color: #050C9C;">ID</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Name</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Address</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Salary</th>
</tr>
</thead>
<tbody id="tblCustomer">
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<section id="orderContent">
<h1> Place Order Page</h1>
<div class="container-fluid">
<div class="m-3">
<div class="row">
<div class="col-4">
<div class="card">
<div class="card-header text-white " style="background-color: #050C9C;">
Order Details
</div>
<div class="card-body">
<form class="form-control-sm">
<div class="row g-3">
<div class="col-6">
<label for="orderId" class="form-label">Order ID:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Order ID" aria-label="First name" id="orderId">
</div>
<div class="col-6">
<label for="orderDate" class="form-label">Date:</label>
<input type="date" disabled class="form-control form-control-sm" id="orderDate">
</div>
<div class="col-6">
<label for="selectFormCustomer" class="form-label">Customer:</label>
<select id="selectFormCustomer" class="form-select form-select-sm">
<option selected>C001</option>
</select>
</div>
<div class="col-6">
<label for="cusId" class="form-label">Customer ID:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Customer ID" aria-label="Last name" id="cusId">
</div>
<div class="col-6">
<label for="cusName" class="form-label">Customer Name:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Customer Name" aria-label="First name" id="cusName">
</div>
<div class="col-6">
<label for="cusSalary" class="form-label">Salary:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Salary" aria-label="Last name" id="cusSalary">
</div>
<div class="col-12">
<label for="cusAddress" class="form-label">Address:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Address" aria-label="Last name" id="cusAddress">
</div>
</div>
</form>
</div>
</div>
</div>
<div class="col-5">
<div class="card h-100">
<div class="card-header text-white " style="background-color: #050C9C;">
Item Select
</div>
<div class="card-body">
<div class="row g-3">
<div class="col-6">
<label for="selectItemFormItem" class="form-label">Item:</label>
<select id="selectItemFormItem" class="form-select form-select-sm">
<option selected>P001</option>
</select>
</div>
<div class="col-6">
<label for="itemId" class="form-label">Item Code:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Item Code" id="itemId">
</div>
<div class="col-5">
<label for="itemName" class="form-label">Item Name:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Item Name" aria-label="Item Name" id="itemName">
</div>
<div class="col-4">
<label for="price" class="form-label">Price:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Price" aria-label="Price" id="price">
</div>
<div class="col-3">
<label for="quantity" class="form-label">QtyOnHand:</label>
<input type="text" disabled class="form-control form-control-sm" placeholder="Qty" aria-label="Qty" id="quantity">
</div>
<div class="col-12">
<label for="orderQty" class="form-label">Order Quantity:</label>
<input type="text" class="form-control form-control-sm" placeholder="Quantity" aria-label="Quantity" id="orderQty">
<p><small class="text-danger" id="orderQtyError"></small></p>
</div>
<div class="col-12 d-flex flex-column">
<button id="btnPlaceOrder" type="button" class="btn btn-outline-danger btn-sm align-self-end">Place Order</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-3">
<div class="card h-100">
<div class="card-body">
<div class="row">
<div class="col-12">
<label class="h1 text-primary" >Total: <span id="total" class="h3"></span></label>
</div>
<div class="col-12 mb-3">
<label class="h1 text-danger">SubTotal: <span id="subTotal" class="h3"></span></label>
</div>
<div class="col-6">
<label for="cash" class="form-label">Cash:</label>
<input type="text" class="form-control" placeholder="Cash" aria-label="Cash" id="cash">
</div>
<div class="col-6">
<label for="discount" class="form-label">Discount:</label>
<input type="number" class="form-control" placeholder="Discount" aria-label="Discount" id="discount">
</div>
<div class="col-12">
<label for="balance" class="form-label">Balance:</label>
<input type="text" disabled class="form-control" placeholder="Balance" aria-label="Balance" id="balance">
</div>
<div class="col d-flex justify-content-center mt-5">
<button id="btnPurchase" type="button" class="btn btn-outline-success btn-sm align-self-center">Purchase</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row mt-3">
<div class="col-12">
<div style="height: 185px; overflow-y: auto;">
<table class="table table-bordered table-hover shadow-lg">
<thead>
<tr>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Item Code</th>
<th scope="col" class="text-white" style="background-color: #050C9C;">Item Name</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;" >Price</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Quantity</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Total</th>
</tr>
</thead>
<tbody id="tblPlaceOrder">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section>
<!--Items-->
<section id="itemContent">
<h1>Item Save Page</h1>
<div class="container-fluid mt-5 d-flex flex-column">
<div class="row justify-content-center">
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-4 col-xxl-3">
<div class="card shadow-lg mb-3">
<div class="card-header text-white" style="background-color: #050C9C;">
New Item
</div>
<div class="card-body">
<form class="form-control-sm">
<div class="mb-3">
<label for="txtItemCode" class="form-label">Item Code:</label>
<button id="btnClearItem" type="button" class="btn btn btn-sm">
<i class="lni lni-eraser" style="color: black; font-size: 1rem;" ></i>
</button>
<input type="text" class="form-control form-control-sm" id="txtItemCode">
</div>
<div class="mb-3">
<label for="txtItemName" class="form-label">Item Name:</label>
<input type="text" class="form-control form-control-sm" id="txtItemName">
</div>
<div class="mb-3">
<label for="txtItemPrice" class="form-label">Item Price:</label>
<input type="text" class="form-control form-control-sm" id="txtItemPrice">
</div>
<div class="mb-3">
<label for="txtItemQuantity" class="form-label">Item Quantity:</label>
<input type="number" class="form-control form-control-sm" id="txtItemQuantity">
</div>
<div class="btn-group">
<button id="btnSaveItem" type="button" class="btn btn-outline-success btn-sm">Save</button>
<button id="btnUpdateItem" type="button" class="btn btn-outline-primary btn-sm">Update</button>
<button id="btnDeleteItem" type="button" class="btn btn-outline-danger btn-sm">Delete</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg col-xl col-xxl">
<div class="card mb-4 shadow-lg">
<div class="card-header text-white" style="background-color: #050C9C;">
Search Item
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl">
<form class="form-control-sm">
<div class="mb-3">
<input type="text" class="form-control form-control-sm" id="txtItemSearch" placeholder="Search here...">
</div>
<div class="row">
<div class="col-sm-6 col-md-6 col-lg-3 col-xl-3 col-xxl-2">
<button id="btnItemSearch" type="button" class="btn btn-outline-success btn-sm mb-2">Search</button>
</div>
<div class="col-sm-6 col-md-6 col-lg-5 col-xl-5 col-xxl-3">
<select class="form-select form-select-sm" aria-label="Default select example" >
<option selected>Code</option>
<option value="1">Name</option>
<option value="2">Price</option>
<option value="3">Quantity</option>
</select>
</div>
</div>
</form>
</div>
<div class="col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl d-flex justify-content-center flex-column">
<!-- Button trigger modal -->
<button id="btnGetAllItem" type="button" class="btn btn-outline-success w-25 align-self-end" data-bs-toggle="modal" data-bs-target="#exampleModal1">
Get All
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal1" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<table class="table table-bordered">
<thead class="table-light">
<tr>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Code</th>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Name</th>
<th scope="col" class=" text-white" style="background-color:#40A2D8;">Price</th>
<th scope="col" class=" text-white" style="background-color: #40A2D8;">Quantity</th>
</tr>
</thead>
<tbody id="modalItemTable">
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="height: 350px; overflow-y: auto;">
<table class="table table-hover table-bordered shadow-lg" style="height: 200px; overflow-y: auto;">
<thead class="table-light">
<tr>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Code</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Name</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Price</th>
<th scope="col" class=" text-white" style="background-color: #050C9C;">Quantity</th>
</tr>
</thead>
<tbody id="tblItem">
</tbody>
</table>
</div>
</div>
</div>
</div>
</section>
<!-- javascript link -->
<script src="script.js"></script>
<script src="https://kit.fontawesome.com/a68fe81b98.js" crossorigin="anonymous"></script>
<script src="assets/Jquery/code.jquery.com_jquery-3.7.1.min.js"></script>
<script src="assets/Bootstrap/js/bootstrap.js"></script>
<script src="controller/DashboardController.js"></script>
<script src="db/DB.js"></script>
<script src="controller/CustomerController.js"></script>
<script src="controller/validation/CustomerValidation.js"></script>
<script src="model/CustomerModel.js"></script>
<script src="controller/ItemController.js"></script>
<script src="controller/validation/ItemValidation.js"></script>
<script src="model/ItemModel.js"></script>
<script src="controller/OrderController.js"></script>
<script src="controller/validation/OrderValidation.js"></script>
<script src="model/OrderModel.js"></script>
<script src="model/OrderDetailsModel.js"></script>
<script src="model/cartModel.js"></script>
</body>
</html>