sms-tps 1.0.0 → 1.0.1
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/backend-project/.env +1 -1
- package/backend-project/Controller/ProductController.js +43 -0
- package/backend-project/Controller/StockTransactionController.js +89 -0
- package/backend-project/Controller/WarehouseController.js +20 -0
- package/backend-project/Models/ProductModel.js +17 -0
- package/backend-project/Models/StockTransactionModel.js +16 -0
- package/backend-project/Models/WarehouseModel.js +12 -0
- package/backend-project/Router/ProductRouter.js +7 -0
- package/backend-project/Router/StockTransactionRouter.js +10 -0
- package/backend-project/Router/WarehouseRouter.js +8 -0
- package/backend-project/package.json +2 -1
- package/backend-project/server.js +7 -2
- package/frontend-project/package-lock.json +65 -20
- package/frontend-project/package.json +2 -2
- package/frontend-project/src/App.jsx +36 -0
- package/frontend-project/src/Component/Product.jsx +388 -0
- package/frontend-project/src/Component/Report.jsx +162 -0
- package/frontend-project/src/Component/Transfer.jsx +442 -0
- package/frontend-project/src/Component/Warehouse.jsx +238 -0
- package/frontend-project/src/Layout/Pannel.jsx +40 -75
- package/frontend-project/src/index.css +1 -0
- package/frontend-project/src/main.jsx +12 -0
- package/frontend-project/vite.config.js +2 -1
- package/package.json +2 -2
- package/frontend-project/src/App.css +0 -0
package/backend-project/.env
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Product } from "../Models/ProductModel.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const Add = async(req,res)=>{
|
|
5
|
+
try {
|
|
6
|
+
const {
|
|
7
|
+
productCode,
|
|
8
|
+
productName,
|
|
9
|
+
category,
|
|
10
|
+
quantityInStock,
|
|
11
|
+
unitPrice,
|
|
12
|
+
supplierName,
|
|
13
|
+
dateReceived,
|
|
14
|
+
warehouse_id
|
|
15
|
+
} = req.body;
|
|
16
|
+
|
|
17
|
+
await Product.create({
|
|
18
|
+
productCode,
|
|
19
|
+
productName,
|
|
20
|
+
category,
|
|
21
|
+
quantityInStock,
|
|
22
|
+
unitPrice,
|
|
23
|
+
supplierName,
|
|
24
|
+
dateReceived,
|
|
25
|
+
warehouse_id,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return res.json({success:true,message:"Product Create Successfull"})
|
|
29
|
+
} catch (error) {
|
|
30
|
+
res.json({success:false,message:error.message})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const get = async(req,res)=>{
|
|
35
|
+
try {
|
|
36
|
+
const product = await Product.find().populate("warehouse_id")
|
|
37
|
+
return res.json({success:true,product})
|
|
38
|
+
} catch (error) {
|
|
39
|
+
res.json({success:false,message:error.message})
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Product } from "../Models/ProductModel.js";
|
|
2
|
+
import { StockTransaction } from "../Models/StockTransactionModel.js";
|
|
3
|
+
|
|
4
|
+
export const Add = async (req, res) => {
|
|
5
|
+
try {
|
|
6
|
+
const {
|
|
7
|
+
warehouse_id,
|
|
8
|
+
product_id,
|
|
9
|
+
transactionDate,
|
|
10
|
+
quantityMoved,
|
|
11
|
+
transactionType,
|
|
12
|
+
} = req.body;
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
await StockTransaction.create({
|
|
17
|
+
warehouse_id,
|
|
18
|
+
product_id,
|
|
19
|
+
transactionDate,
|
|
20
|
+
quantityMoved,
|
|
21
|
+
transactionType
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
await Product.findByIdAndUpdate(
|
|
25
|
+
{ _id: product_id },
|
|
26
|
+
{
|
|
27
|
+
$inc: { quantityInStock: -quantityMoved },
|
|
28
|
+
},
|
|
29
|
+
);
|
|
30
|
+
return res.json({success:true,message:"Transaction Create Successfull"})
|
|
31
|
+
} catch (error) {
|
|
32
|
+
res.json({success:false,message:error.message})
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const get = async(req,res)=>{
|
|
37
|
+
try {
|
|
38
|
+
const transfer = await StockTransaction.find().populate(["warehouse_id","product_id"])
|
|
39
|
+
return res.json({success:true,transfer})
|
|
40
|
+
} catch (error) {
|
|
41
|
+
res.json({success:false,message:error.message})
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const update = async(req,res)=>{
|
|
46
|
+
try {
|
|
47
|
+
const {id} = req.params;
|
|
48
|
+
const {
|
|
49
|
+
warehouse_id,
|
|
50
|
+
product_id,
|
|
51
|
+
transactionDate,
|
|
52
|
+
quantityMoved,
|
|
53
|
+
transactionType,
|
|
54
|
+
} = req.body;
|
|
55
|
+
|
|
56
|
+
await StockTransaction.findByIdAndUpdate({_id:id},{
|
|
57
|
+
warehouse_id,
|
|
58
|
+
product_id,
|
|
59
|
+
transactionDate,
|
|
60
|
+
quantityMoved,
|
|
61
|
+
transactionType
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
if(quantityMoved){
|
|
65
|
+
await Product.findByIdAndUpdate(
|
|
66
|
+
{ _id: product_id },
|
|
67
|
+
{
|
|
68
|
+
$inc: { quantityInStock: -quantityMoved },
|
|
69
|
+
},
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return res.json({success:true,message:"Transfer Updated Successfull"})
|
|
74
|
+
|
|
75
|
+
} catch (error) {
|
|
76
|
+
res.json({success:false,message:error.message})
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
export const remove = async(req,res)=>{
|
|
82
|
+
try {
|
|
83
|
+
const {id} = req.params;
|
|
84
|
+
await StockTransaction.findByIdAndDelete({_id:id})
|
|
85
|
+
return res.json({success:true,message:"Transfer Delete Successfull"})
|
|
86
|
+
} catch (error) {
|
|
87
|
+
res.json({ success: false, message: error.message });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Warehouse } from "../Models/WarehouseModel.js";
|
|
2
|
+
|
|
3
|
+
export const Add = async (req, res) => {
|
|
4
|
+
try {
|
|
5
|
+
const { warehouseCode, warehouseName, warehouseLocation } = req.body;
|
|
6
|
+
await Warehouse.create({ warehouseCode, warehouseName, warehouseLocation });
|
|
7
|
+
return res.json({success:true,message:"Warehouse Create Successfull"})
|
|
8
|
+
} catch (error) {
|
|
9
|
+
res.json({success:false,message:error.message})
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const get = async(req,res)=>{
|
|
14
|
+
try {
|
|
15
|
+
const warehouse = await Warehouse.find()
|
|
16
|
+
return res.json({success:true,warehouse})
|
|
17
|
+
} catch (error) {
|
|
18
|
+
res.json({success:false,message:error.message})
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
const ProductSchema = mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
productCode: { type: String, required: true },
|
|
6
|
+
productName: { type: String, required: true },
|
|
7
|
+
category: { type: String, required: true },
|
|
8
|
+
quantityInStock: { type: Number, required: true },
|
|
9
|
+
unitPrice: { type: Number, required: true },
|
|
10
|
+
supplierName: { type: String, required: true },
|
|
11
|
+
dateReceived: { type: Date, required: true },
|
|
12
|
+
warehouse_id: { type: mongoose.Schema.Types.ObjectId, ref: "warehouse" },
|
|
13
|
+
},
|
|
14
|
+
{ timestamps: true },
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const Product = mongoose.model("product", ProductSchema);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const StockTransactionSchema = mongoose.Schema(
|
|
5
|
+
{
|
|
6
|
+
warehouse_id: { type: mongoose.Schema.Types.ObjectId, ref: "warehouse" },
|
|
7
|
+
product_id: { type: mongoose.Schema.Types.ObjectId, ref: "product" },
|
|
8
|
+
transactionDate: { type: Date, required: true },
|
|
9
|
+
quantityMoved: { type: Number, required: true },
|
|
10
|
+
transactionType: { type: String, required: true },
|
|
11
|
+
},
|
|
12
|
+
{ timestamps: true },
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export const StockTransaction = mongoose.model("stocktransaction",StockTransactionSchema);
|
|
16
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import mongoose from "mongoose";
|
|
2
|
+
|
|
3
|
+
const WarehouseSchema = mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
warehouseCode: { type: String, required: true },
|
|
6
|
+
warehouseName: { type: String, required: true },
|
|
7
|
+
warehouseLocation: { type: String, required: true },
|
|
8
|
+
},
|
|
9
|
+
{ timestapms: true },
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export const Warehouse = mongoose.model("warehouse", WarehouseSchema);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
import { Add, get, remove, update } from '../Controller/StockTransactionController.js';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export const transferRouter = express.Router();
|
|
6
|
+
|
|
7
|
+
transferRouter.post("/add",Add)
|
|
8
|
+
transferRouter.get("/get", get);
|
|
9
|
+
transferRouter.put("/update/:id", update);
|
|
10
|
+
transferRouter.delete("/delete/:id", remove);
|
|
@@ -3,7 +3,9 @@ import cors from "cors";
|
|
|
3
3
|
import "dotenv/config";
|
|
4
4
|
import db_conn from "./Config/db.js";
|
|
5
5
|
import { userRouter } from "./Router/UserRouter.js";
|
|
6
|
-
|
|
6
|
+
import { warehouseRouter } from "./Router/WarehouseRouter.js";
|
|
7
|
+
import { productRouter } from "./Router/ProductRouter.js";
|
|
8
|
+
import { transferRouter } from "./Router/StockTransactionRouter.js";
|
|
7
9
|
|
|
8
10
|
// Prepare Express Enviroment Function
|
|
9
11
|
const app = express();
|
|
@@ -32,5 +34,8 @@ app.get("/", (req, res) => {
|
|
|
32
34
|
res.send("Server API Working Well");
|
|
33
35
|
});
|
|
34
36
|
|
|
37
|
+
app.use("/api/user", userRouter);
|
|
35
38
|
|
|
36
|
-
app.use("/api/
|
|
39
|
+
app.use("/api/warehouse", warehouseRouter);
|
|
40
|
+
app.use("/api/product",productRouter)
|
|
41
|
+
app.use("/api/transfer", transferRouter);
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
"react-hot-toast": "^2.6.0",
|
|
16
16
|
"react-icons": "^5.6.0",
|
|
17
17
|
"react-router-dom": "^7.16.0",
|
|
18
|
-
"tailwindcss": "^4.3.0"
|
|
19
|
-
"tps-make": "^1.0.2"
|
|
18
|
+
"tailwindcss": "^4.3.0"
|
|
20
19
|
},
|
|
21
20
|
"devDependencies": {
|
|
22
21
|
"@eslint/js": "^10.0.1",
|
|
@@ -61,7 +60,6 @@
|
|
|
61
60
|
"integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
|
|
62
61
|
"dev": true,
|
|
63
62
|
"license": "MIT",
|
|
64
|
-
"peer": true,
|
|
65
63
|
"dependencies": {
|
|
66
64
|
"@babel/code-frame": "^7.29.7",
|
|
67
65
|
"@babel/generator": "^7.29.7",
|
|
@@ -271,6 +269,27 @@
|
|
|
271
269
|
"node": ">=6.9.0"
|
|
272
270
|
}
|
|
273
271
|
},
|
|
272
|
+
"node_modules/@emnapi/core": {
|
|
273
|
+
"version": "1.10.0",
|
|
274
|
+
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
|
275
|
+
"integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
|
|
276
|
+
"license": "MIT",
|
|
277
|
+
"optional": true,
|
|
278
|
+
"dependencies": {
|
|
279
|
+
"@emnapi/wasi-threads": "1.2.1",
|
|
280
|
+
"tslib": "^2.4.0"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"node_modules/@emnapi/runtime": {
|
|
284
|
+
"version": "1.10.0",
|
|
285
|
+
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
|
|
286
|
+
"integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
|
|
287
|
+
"license": "MIT",
|
|
288
|
+
"optional": true,
|
|
289
|
+
"dependencies": {
|
|
290
|
+
"tslib": "^2.4.0"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
274
293
|
"node_modules/@emnapi/wasi-threads": {
|
|
275
294
|
"version": "1.2.1",
|
|
276
295
|
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
|
@@ -634,6 +653,9 @@
|
|
|
634
653
|
"cpu": [
|
|
635
654
|
"arm64"
|
|
636
655
|
],
|
|
656
|
+
"libc": [
|
|
657
|
+
"glibc"
|
|
658
|
+
],
|
|
637
659
|
"license": "MIT",
|
|
638
660
|
"optional": true,
|
|
639
661
|
"os": [
|
|
@@ -650,6 +672,9 @@
|
|
|
650
672
|
"cpu": [
|
|
651
673
|
"arm64"
|
|
652
674
|
],
|
|
675
|
+
"libc": [
|
|
676
|
+
"musl"
|
|
677
|
+
],
|
|
653
678
|
"license": "MIT",
|
|
654
679
|
"optional": true,
|
|
655
680
|
"os": [
|
|
@@ -666,6 +691,9 @@
|
|
|
666
691
|
"cpu": [
|
|
667
692
|
"ppc64"
|
|
668
693
|
],
|
|
694
|
+
"libc": [
|
|
695
|
+
"glibc"
|
|
696
|
+
],
|
|
669
697
|
"license": "MIT",
|
|
670
698
|
"optional": true,
|
|
671
699
|
"os": [
|
|
@@ -682,6 +710,9 @@
|
|
|
682
710
|
"cpu": [
|
|
683
711
|
"s390x"
|
|
684
712
|
],
|
|
713
|
+
"libc": [
|
|
714
|
+
"glibc"
|
|
715
|
+
],
|
|
685
716
|
"license": "MIT",
|
|
686
717
|
"optional": true,
|
|
687
718
|
"os": [
|
|
@@ -698,6 +729,9 @@
|
|
|
698
729
|
"cpu": [
|
|
699
730
|
"x64"
|
|
700
731
|
],
|
|
732
|
+
"libc": [
|
|
733
|
+
"glibc"
|
|
734
|
+
],
|
|
701
735
|
"license": "MIT",
|
|
702
736
|
"optional": true,
|
|
703
737
|
"os": [
|
|
@@ -714,6 +748,9 @@
|
|
|
714
748
|
"cpu": [
|
|
715
749
|
"x64"
|
|
716
750
|
],
|
|
751
|
+
"libc": [
|
|
752
|
+
"musl"
|
|
753
|
+
],
|
|
717
754
|
"license": "MIT",
|
|
718
755
|
"optional": true,
|
|
719
756
|
"os": [
|
|
@@ -920,6 +957,9 @@
|
|
|
920
957
|
"cpu": [
|
|
921
958
|
"arm64"
|
|
922
959
|
],
|
|
960
|
+
"libc": [
|
|
961
|
+
"glibc"
|
|
962
|
+
],
|
|
923
963
|
"license": "MIT",
|
|
924
964
|
"optional": true,
|
|
925
965
|
"os": [
|
|
@@ -936,6 +976,9 @@
|
|
|
936
976
|
"cpu": [
|
|
937
977
|
"arm64"
|
|
938
978
|
],
|
|
979
|
+
"libc": [
|
|
980
|
+
"musl"
|
|
981
|
+
],
|
|
939
982
|
"license": "MIT",
|
|
940
983
|
"optional": true,
|
|
941
984
|
"os": [
|
|
@@ -952,6 +995,9 @@
|
|
|
952
995
|
"cpu": [
|
|
953
996
|
"x64"
|
|
954
997
|
],
|
|
998
|
+
"libc": [
|
|
999
|
+
"glibc"
|
|
1000
|
+
],
|
|
955
1001
|
"license": "MIT",
|
|
956
1002
|
"optional": true,
|
|
957
1003
|
"os": [
|
|
@@ -968,6 +1014,9 @@
|
|
|
968
1014
|
"cpu": [
|
|
969
1015
|
"x64"
|
|
970
1016
|
],
|
|
1017
|
+
"libc": [
|
|
1018
|
+
"musl"
|
|
1019
|
+
],
|
|
971
1020
|
"license": "MIT",
|
|
972
1021
|
"optional": true,
|
|
973
1022
|
"os": [
|
|
@@ -1089,7 +1138,6 @@
|
|
|
1089
1138
|
"integrity": "sha512-esJiCAnl0kfpNdE69f3So4WJUXy95dLZydX0KwK46riIHDzHM7O9Vtf9xCHW0PXIqvgqNrswl522kA/5yx+F4w==",
|
|
1090
1139
|
"dev": true,
|
|
1091
1140
|
"license": "MIT",
|
|
1092
|
-
"peer": true,
|
|
1093
1141
|
"dependencies": {
|
|
1094
1142
|
"csstype": "^3.2.2"
|
|
1095
1143
|
}
|
|
@@ -1136,7 +1184,6 @@
|
|
|
1136
1184
|
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
|
1137
1185
|
"dev": true,
|
|
1138
1186
|
"license": "MIT",
|
|
1139
|
-
"peer": true,
|
|
1140
1187
|
"bin": {
|
|
1141
1188
|
"acorn": "bin/acorn"
|
|
1142
1189
|
},
|
|
@@ -1257,7 +1304,6 @@
|
|
|
1257
1304
|
}
|
|
1258
1305
|
],
|
|
1259
1306
|
"license": "MIT",
|
|
1260
|
-
"peer": true,
|
|
1261
1307
|
"dependencies": {
|
|
1262
1308
|
"baseline-browser-mapping": "^2.10.12",
|
|
1263
1309
|
"caniuse-lite": "^1.0.30001782",
|
|
@@ -1357,8 +1403,7 @@
|
|
|
1357
1403
|
"version": "3.2.3",
|
|
1358
1404
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
|
1359
1405
|
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
|
1360
|
-
"license": "MIT"
|
|
1361
|
-
"peer": true
|
|
1406
|
+
"license": "MIT"
|
|
1362
1407
|
},
|
|
1363
1408
|
"node_modules/debug": {
|
|
1364
1409
|
"version": "4.4.3",
|
|
@@ -1510,7 +1555,6 @@
|
|
|
1510
1555
|
"integrity": "sha512-AyIKhnOBuOAdueD7RB3xB+YeAWScb9jHsJBgH2Hcde8InP5JYhqrRR6iTMHyTEwgENK54Cp44e4v8BwNhsuHuw==",
|
|
1511
1556
|
"dev": true,
|
|
1512
1557
|
"license": "MIT",
|
|
1513
|
-
"peer": true,
|
|
1514
1558
|
"dependencies": {
|
|
1515
1559
|
"@eslint-community/eslint-utils": "^4.8.0",
|
|
1516
1560
|
"@eslint-community/regexpp": "^4.12.2",
|
|
@@ -2277,6 +2321,9 @@
|
|
|
2277
2321
|
"cpu": [
|
|
2278
2322
|
"arm64"
|
|
2279
2323
|
],
|
|
2324
|
+
"libc": [
|
|
2325
|
+
"glibc"
|
|
2326
|
+
],
|
|
2280
2327
|
"license": "MPL-2.0",
|
|
2281
2328
|
"optional": true,
|
|
2282
2329
|
"os": [
|
|
@@ -2297,6 +2344,9 @@
|
|
|
2297
2344
|
"cpu": [
|
|
2298
2345
|
"arm64"
|
|
2299
2346
|
],
|
|
2347
|
+
"libc": [
|
|
2348
|
+
"musl"
|
|
2349
|
+
],
|
|
2300
2350
|
"license": "MPL-2.0",
|
|
2301
2351
|
"optional": true,
|
|
2302
2352
|
"os": [
|
|
@@ -2317,6 +2367,9 @@
|
|
|
2317
2367
|
"cpu": [
|
|
2318
2368
|
"x64"
|
|
2319
2369
|
],
|
|
2370
|
+
"libc": [
|
|
2371
|
+
"glibc"
|
|
2372
|
+
],
|
|
2320
2373
|
"license": "MPL-2.0",
|
|
2321
2374
|
"optional": true,
|
|
2322
2375
|
"os": [
|
|
@@ -2337,6 +2390,9 @@
|
|
|
2337
2390
|
"cpu": [
|
|
2338
2391
|
"x64"
|
|
2339
2392
|
],
|
|
2393
|
+
"libc": [
|
|
2394
|
+
"musl"
|
|
2395
|
+
],
|
|
2340
2396
|
"license": "MPL-2.0",
|
|
2341
2397
|
"optional": true,
|
|
2342
2398
|
"os": [
|
|
@@ -2593,7 +2649,6 @@
|
|
|
2593
2649
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
|
|
2594
2650
|
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
|
|
2595
2651
|
"license": "MIT",
|
|
2596
|
-
"peer": true,
|
|
2597
2652
|
"engines": {
|
|
2598
2653
|
"node": ">=12"
|
|
2599
2654
|
},
|
|
@@ -2663,7 +2718,6 @@
|
|
|
2663
2718
|
"resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz",
|
|
2664
2719
|
"integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==",
|
|
2665
2720
|
"license": "MIT",
|
|
2666
|
-
"peer": true,
|
|
2667
2721
|
"engines": {
|
|
2668
2722
|
"node": ">=0.10.0"
|
|
2669
2723
|
}
|
|
@@ -2673,7 +2727,6 @@
|
|
|
2673
2727
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz",
|
|
2674
2728
|
"integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==",
|
|
2675
2729
|
"license": "MIT",
|
|
2676
|
-
"peer": true,
|
|
2677
2730
|
"dependencies": {
|
|
2678
2731
|
"scheduler": "^0.27.0"
|
|
2679
2732
|
},
|
|
@@ -2867,12 +2920,6 @@
|
|
|
2867
2920
|
"url": "https://github.com/sponsors/SuperchupuDev"
|
|
2868
2921
|
}
|
|
2869
2922
|
},
|
|
2870
|
-
"node_modules/tps-make": {
|
|
2871
|
-
"version": "1.0.2",
|
|
2872
|
-
"resolved": "https://registry.npmjs.org/tps-make/-/tps-make-1.0.2.tgz",
|
|
2873
|
-
"integrity": "sha512-spjl1djyC9g1xkf5rBC62/DhIyHbfhr0FZ5SR3NmJU8234gq1WRNGtjj20OYyN4NAKbX1upFKSQbMgQkQS0NUg==",
|
|
2874
|
-
"license": "MIT"
|
|
2875
|
-
},
|
|
2876
2923
|
"node_modules/tslib": {
|
|
2877
2924
|
"version": "2.8.1",
|
|
2878
2925
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
|
@@ -2939,7 +2986,6 @@
|
|
|
2939
2986
|
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz",
|
|
2940
2987
|
"integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==",
|
|
2941
2988
|
"license": "MIT",
|
|
2942
|
-
"peer": true,
|
|
2943
2989
|
"dependencies": {
|
|
2944
2990
|
"lightningcss": "^1.32.0",
|
|
2945
2991
|
"picomatch": "^4.0.4",
|
|
@@ -3064,7 +3110,6 @@
|
|
|
3064
3110
|
"integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==",
|
|
3065
3111
|
"dev": true,
|
|
3066
3112
|
"license": "MIT",
|
|
3067
|
-
"peer": true,
|
|
3068
3113
|
"funding": {
|
|
3069
3114
|
"url": "https://github.com/sponsors/colinhacks"
|
|
3070
3115
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
8
|
+
"start": "vite",
|
|
8
9
|
"build": "vite build",
|
|
9
10
|
"lint": "eslint .",
|
|
10
11
|
"preview": "vite preview"
|
|
@@ -17,8 +18,7 @@
|
|
|
17
18
|
"react-hot-toast": "^2.6.0",
|
|
18
19
|
"react-icons": "^5.6.0",
|
|
19
20
|
"react-router-dom": "^7.16.0",
|
|
20
|
-
"tailwindcss": "^4.3.0"
|
|
21
|
-
"tps-make": "^1.0.2"
|
|
21
|
+
"tailwindcss": "^4.3.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@eslint/js": "^10.0.1",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BrowserRouter, Route, Routes } from "react-router-dom";
|
|
3
|
+
import Login from "./Page/Login";
|
|
4
|
+
import Register from "./Page/Register";
|
|
5
|
+
import Pannel from "./Layout/Pannel";
|
|
6
|
+
import { Toaster } from "react-hot-toast";
|
|
7
|
+
import NotFound from "./Page/NotFound";
|
|
8
|
+
import Product from "./Component/Product";
|
|
9
|
+
import Warehouse from "./Component/Warehouse";
|
|
10
|
+
import Transfer from "./Component/Transfer";
|
|
11
|
+
import Report from "./Component/Report";
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
const App = () => {
|
|
15
|
+
return (
|
|
16
|
+
<div>
|
|
17
|
+
<Toaster />
|
|
18
|
+
<BrowserRouter>
|
|
19
|
+
<Routes>
|
|
20
|
+
<Route path="/login" element={<Login />} />
|
|
21
|
+
<Route path="/register" element={<Register />} />
|
|
22
|
+
<Route path="/" element={<Pannel />}>
|
|
23
|
+
{/* Your Other Route Here NB: Do not use "/.." and on first route use index instead of path=".." */}
|
|
24
|
+
<Route index element={<Warehouse />} />
|
|
25
|
+
<Route path="product" element={<Product />} />
|
|
26
|
+
<Route path="transfer" element={<Transfer />} />
|
|
27
|
+
<Route path="report" element={<Report />} />
|
|
28
|
+
</Route>
|
|
29
|
+
<Route path="*" element={<NotFound />} />
|
|
30
|
+
</Routes>
|
|
31
|
+
</BrowserRouter>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default App;
|