feat(cms): add management for partnerships, history, accreditation, admissions, and policies pages

Implement a singleton page content system to manage static informational pages. This includes:
- New controllers, models, and data files for Partnerships, History, Accreditation, Admissions, and Policies.
- Admin routes and views for updating page content.
- Public API endpoints for fetching page data.
- Migration scripts for initializing page data.
- Updated admin navigation layout to include a dropdown for "About" sections.
- Audit action constants for tracking updates to these pages.
This commit is contained in:
Tống Thành Đạt
2026-04-20 14:08:38 +07:00
parent fab72e86a6
commit 8b6bf5fe6e
48 changed files with 2357 additions and 4 deletions
+31
View File
@@ -7,6 +7,11 @@ const homeController = require("../controllers/homeController");
const headerController = require("../controllers/headerController");
const footerController = require("../controllers/footerController");
const aboutUsController = require("../controllers/aboutUsController");
const partnershipsController = require("../controllers/partnershipsController");
const historyPageController = require("../controllers/historyPageController");
const accreditationController = require("../controllers/accreditationController");
const admissionsController = require("../controllers/admissionsController");
const policiesController = require("../controllers/policiesController");
const formController = require("../controllers/formController");
const contactController = require("../controllers/contactController");
const pageController = require("../controllers/pageController");
@@ -50,6 +55,32 @@ router.param("code", (req, res, next, code) => {
// About Us
router.get("/about-us", ensureAuthenticated, aboutUsController.index);
router.post("/about-us/update", ensureAuthenticated, aboutUsController.update);
router.get("/partnerships", ensureAuthenticated, partnershipsController.index);
router.post(
"/partnerships/update",
ensureAuthenticated,
partnershipsController.update,
);
router.get("/history", ensureAuthenticated, historyPageController.index);
router.post("/history/update", ensureAuthenticated, historyPageController.update);
router.get(
"/accreditation",
ensureAuthenticated,
accreditationController.index,
);
router.post(
"/accreditation/update",
ensureAuthenticated,
accreditationController.update,
);
router.get("/admissions", ensureAuthenticated, admissionsController.index);
router.post(
"/admissions/update",
ensureAuthenticated,
admissionsController.update,
);
router.get("/policies", ensureAuthenticated, policiesController.index);
router.post("/policies/update", ensureAuthenticated, policiesController.update);
// Booking admin CRUD removed