location controller updated with heading and created new models and controllers for remaining modules

This commit is contained in:
Shibi Chakkaravarthy
2026-05-04 20:57:03 +05:30
parent 1245e09111
commit 54d9508dc8
31 changed files with 2140 additions and 96 deletions
+20
View File
@@ -8,7 +8,11 @@ import {
createDepartmentController,
createDesignationController,
createRoleController,
getAllEmployeeController,
getEmployeeDetailsController,
getEmployeeLocationHistoryController,
} from "../controllers/admin.controller";
import { createEmployee } from "../controllers/workflow.controller";
const router = new Router();
@@ -25,6 +29,22 @@ router.post(
authorize("department", "write"),
createDepartmentController,
);
router.get(
"/employees",
authorize("employee", "read"),
getAllEmployeeController,
);
router.post("/employee", authorize("employee", "write"), createEmployee);
router.get(
"/employee/:id",
authorize("employee", "read"),
getEmployeeDetailsController,
);
router.get(
"/employee/:user/locations",
authorize("employee", "read"),
getEmployeeLocationHistoryController,
);
router.post(
"/designation",
authorize("designation", "write"),