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.
- package/index.js +1 -1
- package/package.json +1 -1
- package/projects/SMS-/frontend-project/src/pages/Reports.jsx +179 -23
- package/projects/SCMS/frontend/node_modules/.bin/acorn +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/acorn.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/acorn.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/baseline-browser-mapping.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/browserslist +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/browserslist.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/browserslist.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/eslint +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/eslint.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/eslint.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/jiti +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/jiti.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/jiti.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/jsesc +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/jsesc.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/jsesc.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/json5 +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/json5.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/json5.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/nanoid +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/nanoid.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/nanoid.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/node-which +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/node-which.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/node-which.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/parser +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/parser.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/parser.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/rolldown +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/rolldown.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/rolldown.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/semver +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/semver.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/semver.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/update-browserslist-db.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.bin/vite +0 -16
- package/projects/SCMS/frontend/node_modules/.bin/vite.cmd +0 -17
- package/projects/SCMS/frontend/node_modules/.bin/vite.ps1 +0 -28
- package/projects/SCMS/frontend/node_modules/.package-lock.json +0 -2401
- package/projects/SCMS/frontend/node_modules/.vite/deps/_metadata.json +0 -56
- package/projects/SCMS/frontend/node_modules/.vite/deps/axios.js +0 -3184
- package/projects/SCMS/frontend/node_modules/.vite/deps/axios.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/chunk-B-1-B7_t.js +0 -33
- package/projects/SCMS/frontend/node_modules/.vite/deps/package.json +0 -3
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom.js +0 -186
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom_client.js +0 -14385
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-dom_client.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-router-dom.js +0 -10177
- package/projects/SCMS/frontend/node_modules/.vite/deps/react-router-dom.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/react.js +0 -769
- package/projects/SCMS/frontend/node_modules/.vite/deps/react.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -205
- package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-runtime.js +0 -209
- package/projects/SCMS/frontend/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/code-frame/LICENSE +0 -22
- package/projects/SCMS/frontend/node_modules/@babel/code-frame/README.md +0 -19
- package/projects/SCMS/frontend/node_modules/@babel/code-frame/lib/index.js +0 -217
- package/projects/SCMS/frontend/node_modules/@babel/code-frame/lib/index.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/code-frame/package.json +0 -32
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/LICENSE +0 -22
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/README.md +0 -19
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/corejs2-built-ins.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/corejs3-shipped-proposals.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/corejs2-built-ins.json +0 -2120
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json +0 -5
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/native-modules.json +0 -18
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/overlapping-plugins.json +0 -38
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/plugin-bugfixes.json +0 -231
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/data/plugins.json +0 -843
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/native-modules.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/overlapping-plugins.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/package.json +0 -40
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/plugin-bugfixes.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/compat-data/plugins.js +0 -2
- package/projects/SCMS/frontend/node_modules/@babel/core/LICENSE +0 -22
- package/projects/SCMS/frontend/node_modules/@babel/core/README.md +0 -19
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/cache-contexts.js +0 -5
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/cache-contexts.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/caching.js +0 -261
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/caching.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-chain.js +0 -469
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-chain.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-descriptors.js +0 -190
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/config-descriptors.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/configuration.js +0 -290
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/configuration.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/import.cjs +0 -6
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/import.cjs.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index-browser.js +0 -58
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index-browser.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index.js +0 -78
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/files/index.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/full.js +0 -312
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/full.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/index.js +0 -87
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/index.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/item.js +0 -67
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/item.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/partial.js +0 -158
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/partial.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/pattern-to-regex.js +0 -38
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/pattern-to-regex.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/plugin.js +0 -33
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/plugin.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/printer.js +0 -113
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/printer.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets-browser.js +0 -41
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets-browser.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets.js +0 -61
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/resolve-targets.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/util.js +0 -31
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/config/util.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/index.js +0 -230
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/index.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/parse.js +0 -45
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/parse.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-ast.js +0 -48
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-ast.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file-browser.js +0 -23
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file-browser.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file.js +0 -40
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform-file.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform.js +0 -47
- package/projects/SCMS/frontend/node_modules/@babel/core/lib/transform.js.map +0 -1
- package/projects/SCMS/frontend/node_modules/@babel/core/package.json +0 -84
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -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">
|
|
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">
|
|
44
|
-
|
|
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">
|
|
48
|
-
|
|
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">
|
|
52
|
-
|
|
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
|
-
|
|
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">
|
|
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">
|
|
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
|
-
|
|
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">
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|