inventrack 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +25 -0
  2. package/api/index.js +13 -0
  3. package/backend/README.md +35 -0
  4. package/backend/data/db.json +1239 -0
  5. package/backend/package-lock.json +532 -0
  6. package/backend/package.json +8 -0
  7. package/frontend/README.md +22 -0
  8. package/frontend/assets/Icon.png +0 -0
  9. package/frontend/assets/IconSort.png +0 -0
  10. package/frontend/assets/activity-1.png +0 -0
  11. package/frontend/assets/activity-2.png +0 -0
  12. package/frontend/assets/activity-3.png +0 -0
  13. package/frontend/assets/activity-4.png +0 -0
  14. package/frontend/assets/card-icon-1.png +0 -0
  15. package/frontend/assets/card-icon-2.png +0 -0
  16. package/frontend/assets/card-icon-3.png +0 -0
  17. package/frontend/assets/card-icon-4.png +0 -0
  18. package/frontend/assets/login.png +0 -0
  19. package/frontend/assets/logo.png +0 -0
  20. package/frontend/categories.html +143 -0
  21. package/frontend/css/all.min.css +9 -0
  22. package/frontend/css/bootstrap.min.css +6 -0
  23. package/frontend/css/categories.css +359 -0
  24. package/frontend/css/dashboard.css +373 -0
  25. package/frontend/css/inventoryInsights.css +308 -0
  26. package/frontend/css/inventoryOverview.css +353 -0
  27. package/frontend/css/orders.css +632 -0
  28. package/frontend/css/products.css +364 -0
  29. package/frontend/css/signin.css +120 -0
  30. package/frontend/css/style.css +282 -0
  31. package/frontend/css/suppliers.css +136 -0
  32. package/frontend/dashboard.html +160 -0
  33. package/frontend/index.html +124 -0
  34. package/frontend/inventoryInsights.html +182 -0
  35. package/frontend/inventoryOverview.html +187 -0
  36. package/frontend/js/api.js +55 -0
  37. package/frontend/js/auth.js +70 -0
  38. package/frontend/js/bootstrap.bundle.min.js +7 -0
  39. package/frontend/js/categories.js +356 -0
  40. package/frontend/js/dashboard.js +341 -0
  41. package/frontend/js/inventoryInsights.js +396 -0
  42. package/frontend/js/inventoryOverview.js +503 -0
  43. package/frontend/js/orders.js +662 -0
  44. package/frontend/js/products.js +650 -0
  45. package/frontend/js/suppliers.js +535 -0
  46. package/frontend/js/utils.js +234 -0
  47. package/frontend/orders.html +216 -0
  48. package/frontend/products.html +152 -0
  49. package/frontend/suppliers.html +175 -0
  50. package/frontend/webfonts/fa-brands-400.woff2 +0 -0
  51. package/frontend/webfonts/fa-regular-400.woff2 +0 -0
  52. package/frontend/webfonts/fa-solid-900.woff2 +0 -0
  53. package/frontend/webfonts/fa-v4compatibility.woff2 +0 -0
  54. package/package.json +38 -0
  55. package/vercel.json +18 -0
@@ -0,0 +1,632 @@
1
+ .orders-page {
2
+ min-height: 100vh;
3
+ display: flex;
4
+ flex-direction: column;
5
+ background: #f6f4f8;
6
+ }
7
+
8
+ .orders-content {
9
+ flex: 1;
10
+ padding: 32px 0 48px;
11
+ }
12
+
13
+ /* Header */
14
+ .orders-header {
15
+ margin-bottom: 24px;
16
+ }
17
+
18
+ .orders-title {
19
+ font-size: 2rem;
20
+ font-weight: 800;
21
+ color: #16213e;
22
+ margin-bottom: 6px;
23
+ }
24
+
25
+ .orders-subtitle {
26
+ font-size: 1rem;
27
+ color: #6b7280;
28
+ }
29
+
30
+ .create-order-btn {
31
+ background: linear-gradient(135deg, #7c3aed, #9333ea);
32
+ border: none;
33
+ color: #fff;
34
+ font-weight: 600;
35
+ padding: 12px 20px;
36
+ border-radius: 12px;
37
+ box-shadow: 0 8px 18px rgba(124, 58, 237, 0.25);
38
+ display: inline-flex;
39
+ align-items: center;
40
+ gap: 8px;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ .create-order-btn:hover {
45
+ background: linear-gradient(135deg, #6d28d9, #7e22ce);
46
+ color: #fff;
47
+ }
48
+
49
+ /* Search */
50
+ .search-wrapper {
51
+ position: relative;
52
+ margin-bottom: 22px;
53
+ }
54
+
55
+ .search-icon {
56
+ position: absolute;
57
+ top: 50%;
58
+ left: 16px;
59
+ transform: translateY(-50%);
60
+ color: #94a3b8;
61
+ font-size: 0.95rem;
62
+ }
63
+
64
+ .order-search-input {
65
+ height: 56px;
66
+ border-radius: 14px;
67
+ border: 1px solid #e8def7;
68
+ padding-left: 42px;
69
+ font-size: 0.97rem;
70
+ color: #334155;
71
+ box-shadow: none;
72
+ }
73
+
74
+ .order-search-input:focus {
75
+ border-color: #8b5cf6;
76
+ box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.12);
77
+ }
78
+
79
+ /* Table Card */
80
+ .orders-table-card {
81
+ background: #fff;
82
+ border: 1px solid #ece7f5;
83
+ border-radius: 16px;
84
+ overflow: hidden;
85
+ }
86
+
87
+ .orders-table thead th {
88
+ background: #f3eefb;
89
+ color: #64748b;
90
+ font-size: 0.75rem;
91
+ font-weight: 700;
92
+ padding: 18px 20px;
93
+ border-bottom: 1px solid #ece7f5;
94
+ white-space: nowrap;
95
+ }
96
+
97
+ .orders-table tbody td {
98
+ padding: 16px 20px;
99
+ border-bottom: 1px solid #f1edf7;
100
+ vertical-align: middle;
101
+ color: #475569;
102
+ font-size: 0.95rem;
103
+ }
104
+
105
+ .orders-table tbody tr:last-child td {
106
+ border-bottom: none;
107
+ }
108
+
109
+ .supplier-link {
110
+ color: #7c3aed;
111
+ text-decoration: none;
112
+ font-weight: 500;
113
+ }
114
+
115
+ .supplier-link:hover {
116
+ text-decoration: underline;
117
+ }
118
+
119
+ /* Status */
120
+ .status-badge {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ gap: 7px;
124
+ padding: 6px 12px;
125
+ border-radius: 999px;
126
+ font-size: 0.8rem;
127
+ font-weight: 600;
128
+ }
129
+
130
+ .status-badge .dot {
131
+ width: 7px;
132
+ height: 7px;
133
+ border-radius: 50%;
134
+ display: inline-block;
135
+ }
136
+
137
+ .status-badge.pending {
138
+ background: #fef3c7;
139
+ color: #b45309;
140
+ }
141
+
142
+ .status-badge.pending .dot {
143
+ background: #f59e0b;
144
+ }
145
+
146
+ .status-badge.received {
147
+ background: #d1fae5;
148
+ color: #047857;
149
+ }
150
+
151
+ .status-badge.received .dot {
152
+ background: #10b981;
153
+ }
154
+
155
+ /* Actions */
156
+ .action-btn {
157
+ border: none;
158
+ background: transparent;
159
+ padding: 0;
160
+ font-size: 1rem;
161
+ line-height: 1;
162
+ transition: 0.2s ease;
163
+ }
164
+
165
+ .action-btn.view {
166
+ color: #7c3aed;
167
+ }
168
+
169
+ .action-btn.edit {
170
+ color: #64748b;
171
+ }
172
+
173
+ .action-btn.delete {
174
+ color: #ef4444;
175
+ }
176
+
177
+ .action-btn:hover {
178
+ transform: scale(1.1);
179
+ }
180
+
181
+ /* Footer */
182
+ .table-footer {
183
+ border-top: 1px solid #f1edf7;
184
+ padding: 14px 20px;
185
+ background: #fff;
186
+ }
187
+
188
+ .results-text {
189
+ color: #64748b;
190
+ font-size: 0.92rem;
191
+ }
192
+
193
+ .pagination-custom {
194
+ flex-wrap: wrap;
195
+ }
196
+
197
+ .page-btn {
198
+ min-width: 36px;
199
+ height: 36px;
200
+ border: 1px solid #e5e7eb;
201
+ background: #fff;
202
+ color: #64748b;
203
+ border-radius: 10px;
204
+ font-size: 0.9rem;
205
+ transition: 0.2s ease;
206
+ }
207
+
208
+ .page-btn:hover {
209
+ border-color: #8b5cf6;
210
+ color: #8b5cf6;
211
+ }
212
+
213
+ .page-btn.active {
214
+ background: #7c3aed;
215
+ border-color: #7c3aed;
216
+ color: #fff;
217
+ }
218
+
219
+ /* Mobile Cards */
220
+ .orders-mobile {
221
+ display: grid;
222
+ gap: 16px;
223
+ }
224
+
225
+ .order-mobile-card {
226
+ background: #fff;
227
+ border: 1px solid #ece7f5;
228
+ border-radius: 16px;
229
+ padding: 16px;
230
+ }
231
+
232
+ .mobile-top {
233
+ display: flex;
234
+ justify-content: space-between;
235
+ align-items: flex-start;
236
+ gap: 12px;
237
+ margin-bottom: 14px;
238
+ }
239
+
240
+ .mobile-details {
241
+ display: grid;
242
+ gap: 8px;
243
+ color: #475569;
244
+ font-size: 0.92rem;
245
+ margin-bottom: 14px;
246
+ }
247
+
248
+ .mobile-actions {
249
+ display: flex;
250
+ gap: 18px;
251
+ }
252
+
253
+ .mobile-pagination {
254
+ background: #fff;
255
+ border: 1px solid #ece7f5;
256
+ border-radius: 16px;
257
+ padding: 16px;
258
+ }
259
+
260
+ /* Responsive */
261
+ @media (max-width: 991.98px) {
262
+ .orders-title {
263
+ font-size: 1.7rem;
264
+ }
265
+
266
+ .orders-table thead th,
267
+ .orders-table tbody td {
268
+ padding: 14px 14px;
269
+ }
270
+ }
271
+
272
+ @media (max-width: 767.98px) {
273
+ .orders-content {
274
+ padding: 24px 0 40px;
275
+ }
276
+
277
+ .orders-header {
278
+ margin-bottom: 20px;
279
+ }
280
+
281
+ .orders-title {
282
+ font-size: 1.5rem;
283
+ }
284
+
285
+ .orders-subtitle {
286
+ font-size: 0.95rem;
287
+ }
288
+
289
+ .create-order-btn {
290
+ width: 100%;
291
+ justify-content: center;
292
+ }
293
+
294
+ .order-search-input {
295
+ height: 52px;
296
+ font-size: 0.95rem;
297
+ }
298
+ }
299
+
300
+ @media (max-width: 575.98px) {
301
+ .orders-title {
302
+ font-size: 1.35rem;
303
+ }
304
+
305
+ .mobile-top {
306
+ flex-direction: column;
307
+ align-items: flex-start;
308
+ }
309
+
310
+ .status-badge {
311
+ font-size: 0.75rem;
312
+ }
313
+
314
+ .results-text {
315
+ font-size: 0.85rem;
316
+ }
317
+
318
+ .page-btn {
319
+ min-width: 34px;
320
+ height: 34px;
321
+ }
322
+ }
323
+
324
+ /* Modal */
325
+
326
+ .create-order-modal .modal-dialog {
327
+ max-width: 760px;
328
+ }
329
+
330
+ .create-order-modal .modal-content {
331
+ border: none;
332
+ border-radius: 18px;
333
+ overflow: hidden;
334
+ box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
335
+ }
336
+
337
+ .create-order-modal .modal-backdrop,
338
+ .modal-backdrop.show {
339
+ opacity: 0.45;
340
+ }
341
+
342
+ .create-order-modal-header {
343
+ padding: 18px 20px;
344
+ border-bottom: 1px solid #e9eef5;
345
+ background: #ffffff;
346
+ }
347
+
348
+ .modal-icon-box {
349
+ width: 38px;
350
+ height: 38px;
351
+ border-radius: 10px;
352
+ display: flex;
353
+ align-items: center;
354
+ justify-content: center;
355
+ background: #f3e8ff;
356
+ color: #7c3aed;
357
+ font-size: 1rem;
358
+ flex-shrink: 0;
359
+ }
360
+
361
+ .create-order-modal-title {
362
+ font-size: 1.6rem;
363
+ font-weight: 800;
364
+ color: #1e293b;
365
+ margin: 0;
366
+ }
367
+
368
+ .custom-close-btn {
369
+ box-shadow: none !important;
370
+ opacity: 1;
371
+ }
372
+
373
+ .create-order-modal-body {
374
+ padding: 20px;
375
+ background: #ffffff;
376
+ }
377
+
378
+ .create-order-modal-footer {
379
+ padding: 16px 20px;
380
+ border-top: 1px solid #e9eef5;
381
+ background: #ffffff;
382
+ gap: 12px;
383
+ }
384
+
385
+ .modal-label {
386
+ font-size: 0.9rem;
387
+ font-weight: 600;
388
+ color: #475569;
389
+ margin-bottom: 8px;
390
+ }
391
+
392
+ .modal-input,
393
+ .item-input {
394
+ height: 46px;
395
+ border: 1px solid #d7dee9;
396
+ border-radius: 10px;
397
+ color: #334155;
398
+ box-shadow: none;
399
+ background: #fff;
400
+ }
401
+
402
+ .modal-input:focus,
403
+ .item-input:focus {
404
+ border-color: #8b5cf6;
405
+ box-shadow: 0 0 0 0.18rem rgba(139, 92, 246, 0.12);
406
+ }
407
+
408
+ .order-items-title {
409
+ font-size: 1.2rem;
410
+ font-weight: 800;
411
+ color: #1e293b;
412
+ letter-spacing: 0.03em;
413
+ }
414
+
415
+ .add-row-btn {
416
+ border: none;
417
+ background: transparent;
418
+ color: #7c3aed;
419
+ font-weight: 600;
420
+ padding: 0;
421
+ display: inline-flex;
422
+ align-items: center;
423
+ gap: 8px;
424
+ }
425
+
426
+ .add-row-btn:hover {
427
+ color: #6d28d9;
428
+ }
429
+
430
+ .items-table-wrapper {
431
+ border: 1px solid #dbe3ee;
432
+ border-radius: 14px;
433
+ overflow: hidden;
434
+ background: #fff;
435
+ }
436
+
437
+ .modal-items-table thead th {
438
+ background: #f4f7fb;
439
+ color: #64748b;
440
+ font-size: 0.76rem;
441
+ font-weight: 700;
442
+ padding: 14px 14px;
443
+ border-bottom: 1px solid #e7edf5;
444
+ white-space: nowrap;
445
+ }
446
+
447
+ .modal-items-table tbody td {
448
+ padding: 10px 12px;
449
+ border-bottom: 1px solid #edf2f7;
450
+ vertical-align: middle;
451
+ }
452
+
453
+ .modal-items-table tbody tr:last-child td {
454
+ border-bottom: none;
455
+ }
456
+
457
+ .modal-items-table .item-input {
458
+ border: none;
459
+ background: transparent;
460
+ height: auto;
461
+ padding: 6px 0;
462
+ border-radius: 0;
463
+ }
464
+
465
+ .modal-items-table .item-input:focus {
466
+ box-shadow: none;
467
+ border: none;
468
+ }
469
+
470
+ .remove-row-btn {
471
+ border: none;
472
+ background: transparent;
473
+ color: #94a3b8;
474
+ font-size: 0.95rem;
475
+ }
476
+
477
+ .remove-row-btn:hover {
478
+ color: #ef4444;
479
+ }
480
+
481
+ .total-card {
482
+ width: 100%;
483
+ max-width: 230px;
484
+ border: 1px solid #dbe3ee;
485
+ border-radius: 12px;
486
+ overflow: hidden;
487
+ background: #fff;
488
+ }
489
+
490
+ .total-row {
491
+ display: flex;
492
+ justify-content: space-between;
493
+ align-items: center;
494
+ padding: 12px 14px;
495
+ }
496
+
497
+ .small-row {
498
+ color: #64748b;
499
+ font-size: 0.92rem;
500
+ border-bottom: 1px solid #edf2f7;
501
+ }
502
+
503
+ .grand-total-row {
504
+ font-size: 1rem;
505
+ font-weight: 800;
506
+ color: #1e293b;
507
+ }
508
+
509
+ .grand-total-row span:last-child {
510
+ color: #7c3aed;
511
+ }
512
+
513
+ .modal-cancel-btn {
514
+ min-width: 96px;
515
+ height: 46px;
516
+ border-radius: 10px;
517
+ border: 1px solid #d7dee9;
518
+ color: #475569;
519
+ font-weight: 600;
520
+ background: #fff;
521
+ }
522
+
523
+ .modal-cancel-btn:hover {
524
+ background: #f8fafc;
525
+ color: #334155;
526
+ }
527
+
528
+ .modal-save-btn {
529
+ min-width: 120px;
530
+ height: 46px;
531
+ border-radius: 10px;
532
+ border: none;
533
+ font-weight: 700;
534
+ color: #fff;
535
+ background: linear-gradient(135deg, #7c3aed, #6d28d9);
536
+ box-shadow: 0 10px 22px rgba(124, 58, 237, 0.24);
537
+ }
538
+
539
+ .modal-save-btn:hover {
540
+ color: #fff;
541
+ background: linear-gradient(135deg, #6d28d9, #5b21b6);
542
+ }
543
+
544
+ /* Responsive modal */
545
+ @media (max-width: 767.98px) {
546
+ .create-order-modal .modal-dialog {
547
+ max-width: calc(100% - 20px);
548
+ margin: 10px auto;
549
+ }
550
+
551
+ .create-order-modal-title {
552
+ font-size: 1.15rem;
553
+ }
554
+
555
+ .create-order-modal-body,
556
+ .create-order-modal-header,
557
+ .create-order-modal-footer {
558
+ padding-left: 14px;
559
+ padding-right: 14px;
560
+ }
561
+
562
+ .create-order-modal-footer {
563
+ flex-direction: column;
564
+ }
565
+
566
+ .modal-cancel-btn,
567
+ .modal-save-btn {
568
+ width: 100%;
569
+ }
570
+
571
+ .total-card {
572
+ max-width: 100%;
573
+ }
574
+
575
+ .modal-items-table thead {
576
+ display: none;
577
+ }
578
+
579
+ .modal-items-table,
580
+ .modal-items-table tbody,
581
+ .modal-items-table tr,
582
+ .modal-items-table td {
583
+ display: block;
584
+ width: 100%;
585
+ }
586
+
587
+ .modal-items-table tbody tr {
588
+ padding: 10px 0;
589
+ border-bottom: 1px solid #edf2f7;
590
+ }
591
+
592
+ .modal-items-table tbody tr:last-child {
593
+ border-bottom: none;
594
+ }
595
+
596
+ .modal-items-table tbody td {
597
+ border: none;
598
+ padding: 6px 0;
599
+ }
600
+
601
+ .modal-items-table tbody td::before {
602
+ display: block;
603
+ font-size: 0.72rem;
604
+ font-weight: 700;
605
+ color: #64748b;
606
+ margin-bottom: 4px;
607
+ text-transform: uppercase;
608
+ }
609
+
610
+ .modal-items-table tbody td:nth-child(1)::before {
611
+ content: "Product";
612
+ }
613
+
614
+ .modal-items-table tbody td:nth-child(2)::before {
615
+ content: "Qty";
616
+ }
617
+
618
+ .modal-items-table tbody td:nth-child(3)::before {
619
+ content: "Cost";
620
+ }
621
+
622
+ .modal-items-table tbody td:nth-child(4)::before {
623
+ content: "Remove";
624
+ }
625
+
626
+ .modal-items-table .item-input {
627
+ padding: 10px 12px;
628
+ border: 1px solid #d7dee9;
629
+ border-radius: 10px;
630
+ background: #fff;
631
+ }
632
+ }