forked from UKSOURCE/cms.hailearning.edu.vn
refactor: update primary color scheme and remove camp location functionality from admin routes and views
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
|
||||
:root {
|
||||
/* Primary Colors (Gold/Cinnamon) */
|
||||
--primary-color: #bc9f69;
|
||||
--primary-color: #0048b4;
|
||||
--primary-rgb: 188, 159, 105;
|
||||
--primary-light: #d4c4a8;
|
||||
--primary-dark: #a68b58;
|
||||
--primary-light: #0038b4;
|
||||
--primary-dark: #0028b4;
|
||||
--primary-soft: rgba(188, 159, 105, 0.1);
|
||||
|
||||
/* Secondary Colors */
|
||||
|
||||
@@ -10,7 +10,6 @@ const footerController = require("../controllers/footerController");
|
||||
const aboutUsController = require("../controllers/aboutUsController");
|
||||
const formController = require("../controllers/formController");
|
||||
const contactController = require("../controllers/contactController");
|
||||
const campLocationController = require("../controllers/campLocationController");
|
||||
const pageController = require("../controllers/pageController");
|
||||
const settingController = require("../controllers/settingController");
|
||||
const faqController = require("../controllers/faqController"); // Thêm import này
|
||||
@@ -224,13 +223,6 @@ router.put(
|
||||
// Safety routes
|
||||
router.get("/safety", ensureAuthenticated, safetyController.index);
|
||||
router.post("/safety/update", ensureAuthenticated, safetyController.update);
|
||||
// Camp Location routes
|
||||
router.get("/camp-location", ensureAuthenticated, campLocationController.index);
|
||||
router.post(
|
||||
"/camp-location/update",
|
||||
ensureAuthenticated,
|
||||
campLocationController.update,
|
||||
);
|
||||
|
||||
//Insurance routes
|
||||
router.get("/insurance", ensureAuthenticated, insuranceController.index);
|
||||
@@ -265,65 +257,6 @@ router.post(
|
||||
serviceController.updateDetails,
|
||||
);
|
||||
|
||||
// Test Image Paths route
|
||||
router.get("/test-images", ensureAuthenticated, (req, res) => {
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const campLocationData = require("../data/camp-location.json");
|
||||
|
||||
// Collect all image paths
|
||||
const imagePaths = [];
|
||||
|
||||
// Camps images
|
||||
if (campLocationData.camps) {
|
||||
campLocationData.camps.forEach((camp) => {
|
||||
if (camp.image) {
|
||||
imagePaths.push({
|
||||
type: "Camp",
|
||||
name: camp.title,
|
||||
path: camp.image,
|
||||
exists: fs.existsSync(path.join(__dirname, "../public", camp.image)),
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Locations images
|
||||
if (campLocationData.locations) {
|
||||
campLocationData.locations.forEach((location) => {
|
||||
if (location.imageSrc) {
|
||||
imagePaths.push({
|
||||
type: "Location",
|
||||
name: location.title,
|
||||
path: location.imageSrc,
|
||||
exists: fs.existsSync(path.join(__dirname, "../public", location.imageSrc)),
|
||||
});
|
||||
}
|
||||
|
||||
// Program images
|
||||
if (location.programOptions) {
|
||||
location.programOptions.forEach((program) => {
|
||||
if (program.imageSrc) {
|
||||
imagePaths.push({
|
||||
type: "Program",
|
||||
name: program.title,
|
||||
path: program.imageSrc,
|
||||
exists: fs.existsSync(path.join(__dirname, "../public", program.imageSrc)),
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
res.render("admin/test-images", {
|
||||
layout: "layouts/admin",
|
||||
title: "Test Image Paths",
|
||||
images: imagePaths,
|
||||
user: req.session.user,
|
||||
});
|
||||
});
|
||||
|
||||
// Display visa management page
|
||||
router.get("/visa", ensureAuthenticated, visaController.index);
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ const faqController = require("../controllers/faqController");
|
||||
const visaController = require("../controllers/visaController");
|
||||
const headerMenuController = require("../controllers/headerMenuController");
|
||||
const safetyController = require("../controllers/safetyController");
|
||||
const campLocationController = require("../controllers/campLocationController");
|
||||
// Booking flow removed
|
||||
|
||||
const insuranceController = require("../controllers/insuranceController");
|
||||
@@ -83,10 +82,6 @@ router.get("/api/safety", safetyController.api);
|
||||
// Activity API routes
|
||||
router.get("/api/activities", activityController.api);
|
||||
router.get("/api/activities/:id", activityController.apiDetail);
|
||||
|
||||
// Camp Location API route
|
||||
router.get("/api/camp-location", campLocationController.api);
|
||||
// Booking routes removed
|
||||
// Insurance APi route
|
||||
router.get("/api/insurance", insuranceController.api);
|
||||
|
||||
@@ -127,16 +122,6 @@ router.get(
|
||||
bookingSubmissionController.getSessionAvailability,
|
||||
);
|
||||
|
||||
// New API for creating bookings directly into camp sessions (by program)
|
||||
router.post("/api/camps/:program/sessions/:sessionId/bookings", activityController.createSessionBookingByProgram);
|
||||
router.get("/api/camps/:program/sessions/:sessionId/bookings", activityController.getSessionBookingsByProgram);
|
||||
// Keep admin-style update/delete by activityId (protected) if needed
|
||||
router.put("/api/camps/:activityId/sessions/:sessionId/bookings/:bookingId", activityController.updateSessionBooking);
|
||||
router.delete(
|
||||
"/api/camps/:activityId/sessions/:sessionId/bookings/:bookingId",
|
||||
activityController.deleteSessionBooking,
|
||||
);
|
||||
|
||||
// Demo booking form
|
||||
router.get("/demo/booking-form", (req, res) => {
|
||||
res.sendFile(path.join(__dirname, "../views/demo/booking-form.html"));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -217,25 +217,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Camp Location -->
|
||||
<div class="col-md-4 border-top">
|
||||
<div class="p-4">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<div class="rounded-circle d-flex align-items-center justify-content-center me-3"
|
||||
style="width: 50px; height: 50px; background-color: rgba(184, 183, 106, 0.1);">
|
||||
<i class="fas fa-campground fa-lg" style="color: var(--primary-color);"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="mb-0">Camp Location</h5>
|
||||
<p class="text-muted mb-0 small">Manage camp location</p>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/admin/camp-location" class="btn btn-sm btn-primary w-100 mt-2">
|
||||
<i class="fas fa-edit me-2"></i>Edit
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Activities -->
|
||||
<div class="col-md-4 border-end border-top">
|
||||
<div class="p-4">
|
||||
@@ -675,7 +656,7 @@
|
||||
<div
|
||||
class="card-header"
|
||||
style="
|
||||
background: linear-gradient(135deg, #b8b76a, #9a994a);
|
||||
background: linear-gradient(135deg, #0048b4, #0028b4);
|
||||
color: white;
|
||||
"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user