create-myexam-app 1.0.22 → 1.0.24

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 (134) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/projects/SMS-/frontend-project/src/pages/Reports.jsx +179 -23
  4. package/projects/SCMS/frontend/node_modules/.bin/acorn +0 -16
  5. package/projects/SCMS/frontend/node_modules/.bin/acorn.cmd +0 -17
  6. package/projects/SCMS/frontend/node_modules/.bin/acorn.ps1 +0 -28
  7. package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping +0 -16
  8. package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping.cmd +0 -17
  9. package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping.ps1 +0 -28
  10. package/projects/SCMS/frontend/node_modules/.bin/browserslist +0 -16
  11. package/projects/SCMS/frontend/node_modules/.bin/browserslist.cmd +0 -17
  12. package/projects/SCMS/frontend/node_modules/.bin/browserslist.ps1 +0 -28
  13. package/projects/SCMS/frontend/node_modules/.bin/eslint +0 -16
  14. package/projects/SCMS/frontend/node_modules/.bin/eslint.cmd +0 -17
  15. package/projects/SCMS/frontend/node_modules/.bin/eslint.ps1 +0 -28
  16. package/projects/SCMS/frontend/node_modules/.bin/jiti +0 -16
  17. package/projects/SCMS/frontend/node_modules/.bin/jiti.cmd +0 -17
  18. package/projects/SCMS/frontend/node_modules/.bin/jiti.ps1 +0 -28
  19. package/projects/SCMS/frontend/node_modules/.bin/jsesc +0 -16
  20. package/projects/SCMS/frontend/node_modules/.bin/jsesc.cmd +0 -17
  21. package/projects/SCMS/frontend/node_modules/.bin/jsesc.ps1 +0 -28
  22. package/projects/SCMS/frontend/node_modules/.bin/json5 +0 -16
  23. package/projects/SCMS/frontend/node_modules/.bin/json5.cmd +0 -17
  24. package/projects/SCMS/frontend/node_modules/.bin/json5.ps1 +0 -28
  25. package/projects/SCMS/frontend/node_modules/.bin/nanoid +0 -16
  26. package/projects/SCMS/frontend/node_modules/.bin/nanoid.cmd +0 -17
  27. package/projects/SCMS/frontend/node_modules/.bin/nanoid.ps1 +0 -28
  28. package/projects/SCMS/frontend/node_modules/.bin/node-which +0 -16
  29. package/projects/SCMS/frontend/node_modules/.bin/node-which.cmd +0 -17
  30. package/projects/SCMS/frontend/node_modules/.bin/node-which.ps1 +0 -28
  31. package/projects/SCMS/frontend/node_modules/.bin/parser +0 -16
  32. package/projects/SCMS/frontend/node_modules/.bin/parser.cmd +0 -17
  33. package/projects/SCMS/frontend/node_modules/.bin/parser.ps1 +0 -28
  34. package/projects/SCMS/frontend/node_modules/.bin/rolldown +0 -16
  35. package/projects/SCMS/frontend/node_modules/.bin/rolldown.cmd +0 -17
  36. package/projects/SCMS/frontend/node_modules/.bin/rolldown.ps1 +0 -28
  37. package/projects/SCMS/frontend/node_modules/.bin/semver +0 -16
  38. package/projects/SCMS/frontend/node_modules/.bin/semver.cmd +0 -17
  39. package/projects/SCMS/frontend/node_modules/.bin/semver.ps1 +0 -28
  40. package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db +0 -16
  41. package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db.cmd +0 -17
  42. package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db.ps1 +0 -28
  43. package/projects/SCMS/frontend/node_modules/.bin/vite +0 -16
  44. package/projects/SCMS/frontend/node_modules/.bin/vite.cmd +0 -17
  45. package/projects/SCMS/frontend/node_modules/.bin/vite.ps1 +0 -28
  46. package/projects/SCMS/frontend/node_modules/.package-lock.json +0 -2401
  47. package/projects/SCMS/frontend/node_modules/.vite/deps/_metadata.json +0 -56
  48. package/projects/SCMS/frontend/node_modules/.vite/deps/axios.js +0 -3184
  49. package/projects/SCMS/frontend/node_modules/.vite/deps/axios.js.map +0 -1
  50. package/projects/SCMS/frontend/node_modules/.vite/deps/chunk-B-1-B7_t.js +0 -33
  51. package/projects/SCMS/frontend/node_modules/.vite/deps/package.json +0 -3
  52. package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom.js +0 -186
  53. package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom.js.map +0 -1
  54. package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom_client.js +0 -14385
  55. package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom_client.js.map +0 -1
  56. package/projects/SCMS/frontend/node_modules/.vite/deps/react-router-dom.js +0 -10177
  57. package/projects/SCMS/frontend/node_modules/.vite/deps/react-router-dom.js.map +0 -1
  58. package/projects/SCMS/frontend/node_modules/.vite/deps/react.js +0 -769
  59. package/projects/SCMS/frontend/node_modules/.vite/deps/react.js.map +0 -1
  60. package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -205
  61. package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -1
  62. package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-runtime.js +0 -209
  63. package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -1
  64. package/projects/SCMS/frontend/node_modules/@babel/code-frame/LICENSE +0 -22
  65. package/projects/SCMS/frontend/node_modules/@babel/code-frame/README.md +0 -19
  66. package/projects/SCMS/frontend/node_modules/@babel/code-frame/lib/index.js +0 -217
  67. package/projects/SCMS/frontend/node_modules/@babel/code-frame/lib/index.js.map +0 -1
  68. package/projects/SCMS/frontend/node_modules/@babel/code-frame/package.json +0 -32
  69. package/projects/SCMS/frontend/node_modules/@babel/compat-data/LICENSE +0 -22
  70. package/projects/SCMS/frontend/node_modules/@babel/compat-data/README.md +0 -19
  71. package/projects/SCMS/frontend/node_modules/@babel/compat-data/corejs2-built-ins.js +0 -2
  72. package/projects/SCMS/frontend/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +0 -2
  73. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/corejs2-built-ins.json +0 -2120
  74. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json +0 -5
  75. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/native-modules.json +0 -18
  76. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/overlapping-plugins.json +0 -38
  77. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/plugin-bugfixes.json +0 -231
  78. package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/plugins.json +0 -843
  79. package/projects/SCMS/frontend/node_modules/@babel/compat-data/native-modules.js +0 -2
  80. package/projects/SCMS/frontend/node_modules/@babel/compat-data/overlapping-plugins.js +0 -2
  81. package/projects/SCMS/frontend/node_modules/@babel/compat-data/package.json +0 -40
  82. package/projects/SCMS/frontend/node_modules/@babel/compat-data/plugin-bugfixes.js +0 -2
  83. package/projects/SCMS/frontend/node_modules/@babel/compat-data/plugins.js +0 -2
  84. package/projects/SCMS/frontend/node_modules/@babel/core/LICENSE +0 -22
  85. package/projects/SCMS/frontend/node_modules/@babel/core/README.md +0 -19
  86. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/cache-contexts.js +0 -5
  87. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/cache-contexts.js.map +0 -1
  88. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/caching.js +0 -261
  89. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/caching.js.map +0 -1
  90. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-chain.js +0 -469
  91. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-chain.js.map +0 -1
  92. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-descriptors.js +0 -190
  93. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-descriptors.js.map +0 -1
  94. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/configuration.js +0 -290
  95. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/configuration.js.map +0 -1
  96. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/import.cjs +0 -6
  97. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/import.cjs.map +0 -1
  98. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index-browser.js +0 -58
  99. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index-browser.js.map +0 -1
  100. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index.js +0 -78
  101. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index.js.map +0 -1
  102. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/full.js +0 -312
  103. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/full.js.map +0 -1
  104. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/index.js +0 -87
  105. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/index.js.map +0 -1
  106. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/item.js +0 -67
  107. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/item.js.map +0 -1
  108. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/partial.js +0 -158
  109. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/partial.js.map +0 -1
  110. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/pattern-to-regex.js +0 -38
  111. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/pattern-to-regex.js.map +0 -1
  112. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/plugin.js +0 -33
  113. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/plugin.js.map +0 -1
  114. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/printer.js +0 -113
  115. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/printer.js.map +0 -1
  116. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets-browser.js +0 -41
  117. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +0 -1
  118. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets.js +0 -61
  119. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets.js.map +0 -1
  120. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/util.js +0 -31
  121. package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/util.js.map +0 -1
  122. package/projects/SCMS/frontend/node_modules/@babel/core/lib/index.js +0 -230
  123. package/projects/SCMS/frontend/node_modules/@babel/core/lib/index.js.map +0 -1
  124. package/projects/SCMS/frontend/node_modules/@babel/core/lib/parse.js +0 -45
  125. package/projects/SCMS/frontend/node_modules/@babel/core/lib/parse.js.map +0 -1
  126. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-ast.js +0 -48
  127. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-ast.js.map +0 -1
  128. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file-browser.js +0 -23
  129. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file-browser.js.map +0 -1
  130. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file.js +0 -40
  131. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file.js.map +0 -1
  132. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform.js +0 -47
  133. package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform.js.map +0 -1
  134. package/projects/SCMS/frontend/node_modules/@babel/core/package.json +0 -84
package/index.js CHANGED
@@ -35,7 +35,7 @@ rl.question('Pick (1-14): ', (answer) => {
35
35
  '3':'EPMS(Ely)',
36
36
  '4':'middleware',
37
37
  '5': 'parking managementt system',
38
- '6':'SCMS',
38
+
39
39
  '7':'SCMS(Ely)',
40
40
  '8': 'sfms-app',
41
41
  '9':'SHMS(Ely)',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  "name": "create-myexam-app",
4
4
 
5
- "version": "1.0.22",
5
+ "version": "1.0.24",
6
6
 
7
7
  "description": "My exam projects",
8
8
 
@@ -1,7 +1,8 @@
1
1
  import { useState, useEffect } from "react";
2
2
  import axios from '../axiosInstance';
3
3
 
4
- function Reports () {
4
+ function Reports() {
5
+
5
6
  const [products, setProducts] = useState([]);
6
7
  const [warehouses, setWarehouses] = useState([]);
7
8
  const [stockTransaction, setStockTransaction] = useState([]);
@@ -17,7 +18,7 @@ function Reports () {
17
18
 
18
19
  const txRes = await axios.get('http://localhost:5000/api/stockTransaction');
19
20
  setStockTransaction(txRes.data);
20
- } catch(error) {
21
+ } catch (error) {
21
22
  setError("Failed to generate report summaries.");
22
23
  }
23
24
  };
@@ -26,38 +27,150 @@ function Reports () {
26
27
  fetchAllReports();
27
28
  }, []);
28
29
 
30
+ const today = new Date();
31
+
32
+ const dailyTransactions = stockTransaction.filter((tx) => {
33
+ if (!tx.transactionDate) return false;
34
+ const txDate = new Date(tx.transactionDate);
35
+ return txDate.toDateString() === today.toDateString();
36
+ });
37
+
38
+ const weeklyTransactions = stockTransaction.filter((tx) => {
39
+ if (!tx.transactionDate) return false;
40
+
41
+ const txDate = new Date(tx.transactionDate);
42
+
43
+ const startOfWeek = new Date(today);
44
+ startOfWeek.setHours(0, 0, 0, 0);
45
+ startOfWeek.setDate(today.getDate() - today.getDay());
46
+
47
+ const endOfWeek = new Date(startOfWeek);
48
+ endOfWeek.setDate(startOfWeek.getDate() + 6);
49
+ endOfWeek.setHours(23, 59, 59, 999);
50
+
51
+ return txDate >= startOfWeek && txDate <= endOfWeek;
52
+ });
53
+
54
+ const monthlyTransactions = stockTransaction.filter((tx) => {
55
+ if (!tx.transactionDate) return false;
56
+
57
+ const txDate = new Date(tx.transactionDate);
58
+
59
+ return (
60
+ txDate.getMonth() === today.getMonth() &&
61
+ txDate.getFullYear() === today.getFullYear()
62
+ );
63
+ });
64
+
65
+ const dailyQuantity = dailyTransactions.reduce(
66
+ (sum, tx) => sum + Number(tx.quantityMoved || 0),
67
+ 0
68
+ );
69
+
70
+ const weeklyQuantity = weeklyTransactions.reduce(
71
+ (sum, tx) => sum + Number(tx.quantityMoved || 0),
72
+ 0
73
+ );
74
+
75
+ const monthlyQuantity = monthlyTransactions.reduce(
76
+ (sum, tx) => sum + Number(tx.quantityMoved || 0),
77
+ 0
78
+ );
79
+
29
80
  return (
30
81
  <div className="p-6 bg-slate-50 min-h-screen flex flex-col gap-8">
82
+
31
83
  <div>
32
84
  <h2 className="text-2xl font-bold text-slate-800">System Summary Reports</h2>
33
85
  <p className="text-sm text-slate-500">Live summary data across your inventory portal.</p>
34
86
  </div>
35
87
 
36
88
  {error && (
37
- <p className="text-red-500 bg-red-100 p-2 rounded text-sm font-semibold text-center">{error}</p>
89
+ <p className="text-red-500 bg-red-100 p-2 rounded text-sm font-semibold text-center">
90
+ {error}
91
+ </p>
38
92
  )}
39
93
 
40
- {/* Quick Stats Grid Cards */}
41
94
  <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
95
+
96
+ <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
97
+ <span className="text-xs font-bold text-slate-400 uppercase">
98
+ Total Items
99
+ </span>
100
+ <h4 className="text-2xl font-extrabold text-blue-600">
101
+ {products.length} Products
102
+ </h4>
103
+ </div>
104
+
105
+ <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
106
+ <span className="text-xs font-bold text-slate-400 uppercase">
107
+ Active Spots
108
+ </span>
109
+ <h4 className="text-2xl font-extrabold text-green-600">
110
+ {warehouses.length} Warehouses
111
+ </h4>
112
+ </div>
113
+
114
+ <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
115
+ <span className="text-xs font-bold text-slate-400 uppercase">
116
+ Logged Activity
117
+ </span>
118
+ <h4 className="text-2xl font-extrabold text-purple-600">
119
+ {stockTransaction.length} Logs
120
+ </h4>
121
+ </div>
122
+
123
+ </div>
124
+
125
+ <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
126
+
42
127
  <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
43
- <span className="text-xs font-bold text-slate-400 uppercase">Total Items</span>
44
- <h4 className="text-2xl font-extrabold text-blue-600">{products.length} Products</h4>
128
+ <span className="text-xs font-bold text-slate-400 uppercase">
129
+ Daily Report
130
+ </span>
131
+ <h4 className="text-2xl font-extrabold text-blue-600">
132
+ {dailyTransactions.length} Transactions
133
+ </h4>
134
+ <p className="text-sm text-slate-500">
135
+ {dailyQuantity} Units Moved Today
136
+ </p>
45
137
  </div>
138
+
46
139
  <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
47
- <span className="text-xs font-bold text-slate-400 uppercase">Active Spots</span>
48
- <h4 className="text-2xl font-extrabold text-green-600">{warehouses.length} Warehouses</h4>
140
+ <span className="text-xs font-bold text-slate-400 uppercase">
141
+ Weekly Report
142
+ </span>
143
+ <h4 className="text-2xl font-extrabold text-green-600">
144
+ {weeklyTransactions.length} Transactions
145
+ </h4>
146
+ <p className="text-sm text-slate-500">
147
+ {weeklyQuantity} Units Moved This Week
148
+ </p>
49
149
  </div>
150
+
50
151
  <div className="bg-white p-4 rounded shadow-sm border border-slate-200">
51
- <span className="text-xs font-bold text-slate-400 uppercase">Logged Activity</span>
52
- <h4 className="text-2xl font-extrabold text-purple-600">{stockTransaction.length} Logs</h4>
152
+ <span className="text-xs font-bold text-slate-400 uppercase">
153
+ Monthly Report
154
+ </span>
155
+ <h4 className="text-2xl font-extrabold text-purple-600">
156
+ {monthlyTransactions.length} Transactions
157
+ </h4>
158
+ <p className="text-sm text-slate-500">
159
+ {monthlyQuantity} Units Moved This Month
160
+ </p>
53
161
  </div>
162
+
54
163
  </div>
55
164
 
56
- {/* Products Table */}
57
165
  <div className="bg-white rounded shadow-sm border border-slate-200 flex flex-col gap-2 p-4">
58
- <h3 className="text-lg font-bold text-slate-700">Available Products Summary</h3>
166
+
167
+ <h3 className="text-lg font-bold text-slate-700">
168
+ Available Products Summary
169
+ </h3>
170
+
59
171
  <div className="overflow-x-auto">
60
172
  <table className="w-full text-left border-collapse">
173
+
61
174
  <thead>
62
175
  <tr className="bg-slate-100 border-b border-slate-200 text-slate-700 text-sm font-bold">
63
176
  <th className="p-3">Product Code</th>
@@ -69,28 +182,43 @@ function Reports () {
69
182
  <th className="p-3">Date</th>
70
183
  </tr>
71
184
  </thead>
185
+
72
186
  <tbody className="text-slate-600 text-sm divide-y divide-slate-100">
73
187
  {Array.isArray(products) && products.map((prod) => (
74
188
  <tr key={prod._id} className="hover:bg-slate-50">
75
- <td className="p-3 font-semibold text-slate-700">{prod.productCode}</td>
189
+ <td className="p-3 font-semibold text-slate-700">
190
+ {prod.productCode}
191
+ </td>
76
192
  <td className="p-3">{prod.productName}</td>
77
193
  <td className="p-3">{prod.category}</td>
78
194
  <td className="p-3">{prod.quantityInStock}</td>
79
195
  <td className="p-3">${prod.unitPrice}</td>
80
196
  <td className="p-3">{prod.supplierName}</td>
81
- <td className="p-3">{prod.date ? prod.date.substring(0, 10) : (prod.dateReceived ? prod.dateReceived.substring(0, 10) : "")}</td>
197
+ <td className="p-3">
198
+ {prod.date
199
+ ? prod.date.substring(0, 10)
200
+ : (prod.dateReceived
201
+ ? prod.dateReceived.substring(0, 10)
202
+ : "")}
203
+ </td>
82
204
  </tr>
83
205
  ))}
84
206
  </tbody>
207
+
85
208
  </table>
86
209
  </div>
210
+
87
211
  </div>
88
212
 
89
- {/* Warehouse Table */}
90
213
  <div className="bg-white rounded shadow-sm border border-slate-200 flex flex-col gap-2 p-4">
91
- <h3 className="text-lg font-bold text-slate-700">Warehouse Setup Summary</h3>
214
+
215
+ <h3 className="text-lg font-bold text-slate-700">
216
+ Warehouse Setup Summary
217
+ </h3>
218
+
92
219
  <div className="overflow-x-auto">
93
220
  <table className="w-full text-left border-collapse">
221
+
94
222
  <thead>
95
223
  <tr className="bg-slate-100 border-b border-slate-200 text-slate-700 text-sm font-bold">
96
224
  <th className="p-3">Warehouse Code</th>
@@ -98,24 +226,33 @@ function Reports () {
98
226
  <th className="p-3">Warehouse Location</th>
99
227
  </tr>
100
228
  </thead>
229
+
101
230
  <tbody className="text-slate-600 text-sm divide-y divide-slate-100">
102
231
  {Array.isArray(warehouses) && warehouses.map((wh) => (
103
232
  <tr key={wh._id} className="hover:bg-slate-50">
104
- <td className="p-3 font-semibold text-slate-700">{wh.warehouseCode}</td>
233
+ <td className="p-3 font-semibold text-slate-700">
234
+ {wh.warehouseCode}
235
+ </td>
105
236
  <td className="p-3">{wh.warehouseName}</td>
106
237
  <td className="p-3">{wh.warehouseLocation}</td>
107
238
  </tr>
108
239
  ))}
109
240
  </tbody>
241
+
110
242
  </table>
111
243
  </div>
244
+
112
245
  </div>
113
246
 
114
- {/* Transactions Table */}
115
247
  <div className="bg-white rounded shadow-sm border border-slate-200 flex flex-col gap-2 p-4">
116
- <h3 className="text-lg font-bold text-slate-700">Stock Activity Logs</h3>
248
+
249
+ <h3 className="text-lg font-bold text-slate-700">
250
+ Stock Activity Logs
251
+ </h3>
252
+
117
253
  <div className="overflow-x-auto">
118
254
  <table className="w-full text-left border-collapse">
255
+
119
256
  <thead>
120
257
  <tr className="bg-slate-100 border-b border-slate-200 text-slate-700 text-sm font-bold">
121
258
  <th className="p-3">Transaction Date</th>
@@ -123,24 +260,43 @@ function Reports () {
123
260
  <th className="p-3">Transaction Type</th>
124
261
  </tr>
125
262
  </thead>
263
+
126
264
  <tbody className="text-slate-600 text-sm divide-y divide-slate-100">
127
265
  {Array.isArray(stockTransaction) && stockTransaction.map((tx) => (
128
266
  <tr key={tx._id} className="hover:bg-slate-50">
129
- <td className="p-3">{tx.transactionDate ? tx.transactionDate.substring(0, 10) : ""}</td>
130
- <td className="p-3 font-semibold">{tx.quantityMoved}</td>
131
267
  <td className="p-3">
132
- <span className={`px-2 py-0.5 rounded text-xs font-bold ${tx.transactionType?.toLowerCase().includes('in') ? 'bg-green-100 text-green-700' : 'bg-amber-100 text-amber-700'}`}>
268
+ {tx.transactionDate
269
+ ? tx.transactionDate.substring(0, 10)
270
+ : ""}
271
+ </td>
272
+
273
+ <td className="p-3 font-semibold">
274
+ {tx.quantityMoved}
275
+ </td>
276
+
277
+ <td className="p-3">
278
+ <span
279
+ className={`px-2 py-0.5 rounded text-xs font-bold ${
280
+ tx.transactionType?.toLowerCase().includes('in')
281
+ ? 'bg-green-100 text-green-700'
282
+ : 'bg-amber-100 text-amber-700'
283
+ }`}
284
+ >
133
285
  {tx.transactionType}
134
286
  </span>
135
287
  </td>
288
+
136
289
  </tr>
137
290
  ))}
138
291
  </tbody>
292
+
139
293
  </table>
140
294
  </div>
295
+
141
296
  </div>
142
297
 
143
298
  </div>
144
299
  );
145
300
  }
146
- export default Reports;
301
+
302
+ export default Reports;
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
14
- else
15
- exec node "$basedir/../acorn/bin/acorn" "$@"
16
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../acorn/bin/acorn" $args
23
- } else {
24
- & "node$exe" "$basedir/../acorn/bin/acorn" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@"
14
- else
15
- exec node "$basedir/../baseline-browser-mapping/dist/cli.cjs" "$@"
16
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\baseline-browser-mapping\dist\cli.cjs" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
23
- } else {
24
- & "node$exe" "$basedir/../baseline-browser-mapping/dist/cli.cjs" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@"
14
- else
15
- exec node "$basedir/../browserslist/cli.js" "$@"
16
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../browserslist/cli.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../browserslist/cli.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
14
- else
15
- exec node "$basedir/../eslint/bin/eslint.js" "$@"
16
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args
23
- } else {
24
- & "node$exe" "$basedir/../eslint/bin/eslint.js" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret
@@ -1,16 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -x "$basedir/node" ]; then
13
- exec "$basedir/node" "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
14
- else
15
- exec node "$basedir/../jiti/lib/jiti-cli.mjs" "$@"
16
- fi
@@ -1,17 +0,0 @@
1
- @ECHO off
2
- GOTO start
3
- :find_dp0
4
- SET dp0=%~dp0
5
- EXIT /b
6
- :start
7
- SETLOCAL
8
- CALL :find_dp0
9
-
10
- IF EXIST "%dp0%\node.exe" (
11
- SET "_prog=%dp0%\node.exe"
12
- ) ELSE (
13
- SET "_prog=node"
14
- SET PATHEXT=%PATHEXT:;.JS;=;%
15
- )
16
-
17
- endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jiti\lib\jiti-cli.mjs" %*
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env pwsh
2
- $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3
-
4
- $exe=""
5
- if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6
- # Fix case when both the Windows and Linux builds of Node
7
- # are installed in the same directory
8
- $exe=".exe"
9
- }
10
- $ret=0
11
- if (Test-Path "$basedir/node$exe") {
12
- # Support pipeline input
13
- if ($MyInvocation.ExpectingInput) {
14
- $input | & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
15
- } else {
16
- & "$basedir/node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
17
- }
18
- $ret=$LASTEXITCODE
19
- } else {
20
- # Support pipeline input
21
- if ($MyInvocation.ExpectingInput) {
22
- $input | & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
23
- } else {
24
- & "node$exe" "$basedir/../jiti/lib/jiti-cli.mjs" $args
25
- }
26
- $ret=$LASTEXITCODE
27
- }
28
- exit $ret