create-jinmankn-app 1.0.12 → 1.0.14
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/package.json +1 -1
- package/templates/EPMS(Employee Payroll Managment System)/package-lock.json +13 -0
- package/templates/HRMS (reba kuri iyi bro)/README.md +1 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/config/db.js +12 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/controllers/authController.js +138 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/controllers/departmentController.js +74 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/controllers/employeeController.js +204 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/controllers/positionController.js +78 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/controllers/reportController.js +45 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/middleware/auth.js +28 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/models/Department.js +15 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/models/Employee.js +73 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/models/Position.js +20 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/models/User.js +37 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/package-lock.json +2231 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/package.json +23 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/authRoutes.js +13 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/departmentRoutes.js +17 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/employeeRoutes.js +19 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/positionRoutes.js +17 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/protectedRoutes.js +10 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/routes/reportRoutes.js +9 -0
- package/templates/HRMS (reba kuri iyi bro)/backend/server.js +49 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/README.md +16 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/eslint.config.js +21 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/index.html +13 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/package-lock.json +3095 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/package.json +31 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/public/favicon.svg +1 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/App.css +0 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/App.jsx +37 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/assets/hero.png +0 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/components/DashboardLayout.jsx +108 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/components/ProtectedRoute.jsx +9 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/index.css +59 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/main.jsx +11 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/CreateUser.jsx +149 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/DashboardHome.jsx +57 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Department.jsx +160 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Employee.jsx +376 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Login.jsx +84 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Position.jsx +179 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Register.jsx +105 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/src/pages/Reports.jsx +92 -0
- package/templates/HRMS (reba kuri iyi bro)/frontend/vite.config.js +7 -0
- package/templates/SMS(Stock Managment System)/backend-project/server.js +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/components/AppLayout.jsx +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Login.jsx +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Product.jsx +211 -78
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Profile.jsx +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Register.jsx +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Reports.jsx +1 -1
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Sales.jsx +6 -6
- package/templates/SMS(Stock Managment System)/frontend-project/src/pages/Warehouse.jsx +150 -44
- package/templates/SMS(Stock Managment System)/package-lock.json +13 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const positionSchema = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
posName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
unique: true,
|
|
9
|
+
trim: true,
|
|
10
|
+
},
|
|
11
|
+
requiredQualification: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
trim: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{ timestamps: true }
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
module.exports = mongoose.model('Position', positionSchema);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const mongoose = require('mongoose');
|
|
2
|
+
|
|
3
|
+
const userSchema = new mongoose.Schema(
|
|
4
|
+
{
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
trim: true,
|
|
9
|
+
},
|
|
10
|
+
email: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
unique: true,
|
|
14
|
+
lowercase: true,
|
|
15
|
+
trim: true,
|
|
16
|
+
},
|
|
17
|
+
password: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
minlength: 6,
|
|
21
|
+
},
|
|
22
|
+
role: {
|
|
23
|
+
type: String,
|
|
24
|
+
enum: ['admin', 'user', 'employee'],
|
|
25
|
+
default: 'user',
|
|
26
|
+
},
|
|
27
|
+
employee: {
|
|
28
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
29
|
+
ref: 'Employee',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{ timestamps: true }
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const User = mongoose.model('User', userSchema);
|
|
36
|
+
|
|
37
|
+
module.exports = User;
|