Refactor: remove unused APIs, controllers, models and data files. Update: icon picker all system, Dashboard, Main UI more respone, Change: Logo, favicon.

This commit is contained in:
2026-04-23 18:44:37 +07:00
parent 8ce6cf3c7e
commit 4ba3eb4a82
48 changed files with 438 additions and 14850 deletions
+6 -3
View File
@@ -65,10 +65,13 @@ exports.index = async (req, res) => {
data[s] = data[s] || defaults[s];
});
const frontendUrl = process.env.FRONTEND_URL || "";
return res.render("admin/about/index", {
layout: "layouts/main",
title: "About Management",
data,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
@@ -114,17 +117,17 @@ exports.update = async (req, res) => {
if (!hasChanges) {
req.flash("info_msg", "No changes were made");
return req.session.save(() => res.redirect("/admin/about-us"));
return req.session.save(() => res.redirect("/admin/about"));
}
await doc.save();
req.flash("success_msg", "About page configuration has been updated!");
return req.session.save(() => res.redirect("/admin/about-us"));
return req.session.save(() => res.redirect("/admin/about"));
} catch (err) {
console.error("About update error:", err);
req.flash("error_msg", `Update error: ${err.message}`);
return req.session.save(() => res.redirect("/admin/about-us"));
return req.session.save(() => res.redirect("/admin/about"));
}
};
File diff suppressed because it is too large Load Diff
-154
View File
@@ -1,154 +0,0 @@
const Home = require("../models/home");
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// Helper to get FAQ data from Home model
const getFaqData = async () => {
const home = await Home.findOne().sort({ updatedAt: -1 });
if (!home || !home.faq) {
return {
heading: "",
subheading: "",
description: "",
items: [],
ctaButton: { label: "", href: "" },
};
}
return home.faq.toObject ? home.faq.toObject() : home.faq;
};
// API to get FAQ data for frontend
exports.api = async (req, res) => {
try {
const faqData = await getFaqData();
return res.json(faqData);
} catch (err) {
console.error("API Error:", err);
res.status(500).json({ error: "Error loading FAQ data" });
}
};
// Method for legacy route compatibility or internal use
exports.getFAQData = async (req, res) => {
return exports.api(req, res);
};
// Render admin view
exports.index = async (req, res) => {
try {
const data = await getFaqData();
// Ensure default structure if data is partial
const safeData = {
heading: data.heading || "",
subheading: data.subheading || "",
description: data.description || "",
ctaButton: data.ctaButton || { label: "", href: "" },
items: data.items || [],
};
const frontendUrl = process.env.FRONTEND_URL;
res.render("admin/home/faq/index", {
title: "FAQ Section Management",
layout: "layouts/main",
data: safeData,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
} catch (error) {
console.error("Error in FAQ index:", error);
req.flash("error_msg", "An error occurred while loading the page");
res.redirect("/admin/dashboard");
}
};
// Update FAQ data
exports.update = async (req, res) => {
try {
const { heading, subheading, description, ctaLabel, ctaHref, items } =
req.body;
let parsedItems = [];
if (items) {
try {
parsedItems = typeof items === "string" ? JSON.parse(items) : items;
} catch (e) {
console.error("Error parsing items JSON:", e);
parsedItems = [];
}
}
let home = await Home.findOne().sort({ updatedAt: -1 });
if (!home) {
home = new Home({});
}
// ✅ Capture BEFORE state
const beforeData = home.faq
? JSON.parse(
JSON.stringify(home.faq.toObject ? home.faq.toObject() : home.faq),
)
: {};
const updatedFaqData = {
heading: heading || "",
subheading: subheading || "",
description: description || "",
ctaButton: {
label: ctaLabel || "",
href: ctaHref || "",
},
items: parsedItems.map((item) => ({
question: item.question || "",
answer: item.answer || "",
})),
};
home.faq = updatedFaqData;
await home.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(JSON.stringify(updatedFaqData));
// ✅ AUDIT LOGGING - FAQ Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Home",
documentId: home._id,
action: AUDIT_ACTIONS.UPDATE_FAQ,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "FAQ section updated successfully");
res.redirect("/admin/home/faq");
} catch (err) {
console.error("Error updating FAQ:", err);
req.flash("error_msg", err.message || "Error updating FAQ");
res.redirect("/admin/home/faq");
}
};
// Placeholder methods to prevent route crashes if routes are not cleaned up immediately
exports.addFAQ = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.updateFAQItem = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.deleteFAQItem = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.addFAQSection = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.updateFAQSection = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.deleteFAQSection = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.reorderFAQSection = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
exports.updateSidebarNav = (req, res) =>
res.status(404).json({ error: "Endpoint deprecated" });
+3
View File
@@ -54,10 +54,13 @@ exports.index = async (req, res) => {
data[s] = data[s] || defaults[s];
});
const frontendUrl = process.env.FRONTEND_URL || "";
return res.render("admin/home/index", {
layout: "layouts/main",
title: "Home Management",
data,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
-539
View File
@@ -1,539 +0,0 @@
const Insurance = require("../models/insurance");
const { addBaseUrlToImages } = require("../utils/imageHelper");
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// API để lấy insurance data (cho frontend)
exports.api = async (req, res) => {
try {
const language = req.query.lang || "en";
// Sử dụng getDefault để đảm bảo luôn có data
const insurance = await Insurance.getDefault(language);
// Trả về data với cấu trúc mới
const insuranceData = insurance.toObject();
// Sử dụng helper để thêm base URL vào đường dẫn ảnh
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(insuranceData, baseUrl);
// Trả về trực tiếp hero, page, content (không wrap trong object)
res.json({
hero: processedData.hero,
page: processedData.page,
content: processedData.content,
});
} catch (error) {
console.error("API Error:", error);
res.status(500).json({
success: false,
error: "Error loading insurance data",
message: error.message,
});
}
};
// API để lấy toàn bộ insurance data (cho admin)
exports.getInsuranceData = async (req, res) => {
try {
const language = req.query.lang || "en";
const insurance = await Insurance.findOne({
name: "default",
language: language,
});
if (!insurance) {
return res.status(404).json({
success: false,
error: "Insurance data not found",
});
}
const insuranceData = insurance.toObject();
// Thêm base URL vào đường dẫn ảnh
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(insuranceData, baseUrl);
res.json({
success: true,
data: processedData,
});
} catch (error) {
console.error("Error getting insurance data:", error);
res.status(500).json({
success: false,
error: "Error loading insurance data",
});
}
};
// API để lấy data theo ngôn ngữ
exports.getByLanguage = async (req, res) => {
try {
const language = req.params.lang || "en";
const insurance = await Insurance.findOne({
name: "default",
language: language,
});
if (!insurance) {
return res.status(404).json({
success: false,
error: "Insurance data not found",
});
}
const insuranceData = insurance.toObject();
// Thêm base URL vào đường dẫn ảnh
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(insuranceData, baseUrl);
res.json({
success: true,
data: {
hero: processedData.hero,
page: processedData.page,
content: processedData.content,
},
});
} catch (error) {
console.error("Error getting insurance by language:", error);
res.status(500).json({
success: false,
error: "Error loading insurance data",
});
}
};
// Render admin view
exports.index = async (req, res) => {
try {
// Luôn đảm bảo có default data
const insurance = await Insurance.getDefault("en");
const data = insurance.toObject();
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
res.render("admin/insurance/index", {
title: "Insurance Management",
layout: "layouts/main",
data,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
} catch (error) {
console.error("Error in insurance index:", error);
req.flash("error_msg", "An error occurred while loading the page");
res.redirect("/admin/dashboard");
}
};
// Seed data từ JSON file (cấu trúc mới)
exports.seed = async (req, res) => {
try {
const fs = require("fs").promises;
const path = require("path");
// Đọc file JSON
const jsonPath = path.join(__dirname, "../data/insurance.json");
const jsonData = JSON.parse(await fs.readFile(jsonPath, "utf8"));
console.log("Seeding insurance from JSON...");
// Migrate từ cấu trúc cũ sang mới
const insurance = await Insurance.migrateFromJson(jsonData, "en");
res.json({
success: true,
message: "Insurance data seeded successfully",
data: {
id: insurance._id,
hero: insurance.hero,
page: insurance.page,
content: insurance.content,
},
});
} catch (error) {
console.error("Error seeding insurance:", error);
res.status(500).json({
success: false,
error: error.message || "Error seeding insurance data",
});
}
};
// API preview cho admin (tạo HTML preview)
exports.preview = async (req, res) => {
try {
const { hero, page, content } = req.body;
// Parse JSON strings
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
const heroData = parseJson(hero) || {};
const pageData = parseJson(page) || {};
const contentData = parseJson(content) || {};
// Thêm base URL vào đường dẫn ảnh cho preview
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedHeroData = addBaseUrlToImages(heroData, baseUrl);
// Render preview HTML
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${pageData.title || "Insurance Preview"}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body { font-family: Arial, sans-serif; }
.hero-section {
background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
url('${processedHeroData.backgroundImage || ""}');
background-size: cover;
background-position: center;
color: white;
padding: 100px 20px;
text-align: center;
}
.page-header {
padding: 40px 20px;
background: #f8f9fa;
}
.content-section {
padding: 40px 20px;
}
.content-item {
margin-bottom: 20px;
}
</style>
</head>
<body>
<!-- Hero Section -->
<div class="hero-section">
<h1>${heroData.title || "Insurance"}</h1>
<p>${heroData.subtitle || ""}</p>
</div>
<!-- Page Header -->
<div class="page-header">
<div class="container">
<h2>${pageData.title || "Insurance Information"}</h2>
${pageData.divider !== false ? "<hr>" : ""}
</div>
</div>
<!-- Content Section -->
<div class="content-section">
<div class="container">
${renderContentItems(contentData.content || [])}
</div>
</div>
</body>
</html>
`;
res.send(html);
} catch (error) {
console.error("Error generating preview:", error);
res.status(500).send("Error generating preview");
}
};
// Helper function để render content items
function renderContentItems(contentItems) {
if (!Array.isArray(contentItems) || contentItems.length === 0) {
return "<p>No content available.</p>";
}
return contentItems
.map((item) => {
switch (item.type) {
case "header":
return `<h${item.level || 2} class="content-item">${item.text}</h${item.level || 2}>`;
case "paragraph":
return `<p class="content-item">${item.text}</p>`;
case "section":
return `
<div class="content-item">
<h3>${item.title}</h3>
<p>${item.content}</p>
</div>
`;
case "list":
const listItems = (item.items || [])
.map((li) => `<li>${li}</li>`)
.join("");
return `<ul class="content-item">${listItems}</ul>`;
case "note":
return `<div class="alert alert-info content-item">${item.text}</div>`;
case "embed":
if (item.source === "youtube") {
return `
<div class="content-item">
<iframe width="${item.width || 560}" height="${item.height || 315}"
src="${item.url || item.embed}"
frameborder="0" allowfullscreen></iframe>
${item.caption ? `<p class="text-muted mt-2">${item.caption}</p>` : ""}
</div>
`;
}
return "";
default:
return "";
}
})
.join("");
}
// API để tạo insurance mới (cho các ngôn ngữ khác)
exports.create = async (req, res) => {
try {
const { hero, page, content, language } = req.body;
if (!language) {
return res.status(400).json({
success: false,
error: "Language is required",
});
}
// Kiểm tra đã tồn tại chưa
const existing = await Insurance.findOne({
name: "default",
language: language,
});
if (existing) {
return res.status(400).json({
success: false,
error: "Insurance already exists for this language",
});
}
// Parse JSON nếu cần
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
const insurance = new Insurance({
name: "default",
language: language,
hero: parseJson(hero) || {},
page: parseJson(page) || {},
content: parseJson(content) || {},
version: "2.0.0",
isActive: true,
migratedFromOldStructure: false,
});
await insurance.save();
res.json({
success: true,
message: "Insurance created successfully for language: " + language,
data: insurance,
});
} catch (error) {
console.error("Error creating insurance:", error);
res.status(500).json({
success: false,
error: error.message || "Error creating insurance",
});
}
};
// Cập nhật dữ liệu insurance (CẬP NHẬT CẤU TRÚC MỚI)
exports.update = async (req, res) => {
try {
const { hero, page, content } = req.body;
// Parse JSON strings
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
// Parse all data với cấu trúc mới
const heroData = parseJson(hero) || {};
const pageData = parseJson(page) || {};
const contentData = parseJson(content) || {};
// Normalize embed blocks (convert YouTube watch URLs to /embed/ URLs)
function extractYouTubeId(url) {
const regex =
/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/;
const match = url.match(regex);
return match ? match[1] : null;
}
if (contentData && Array.isArray(contentData.content)) {
contentData.content.forEach((item) => {
if (item.type === "embed" && item.source === "youtube") {
if (item.url && item.url.includes("watch?v=")) {
const videoId = extractYouTubeId(item.url);
if (videoId) {
item.url = `https://www.youtube.com/embed/${videoId}`;
item.videoId = videoId;
}
}
if (item.embed && item.embed.includes("watch?v=")) {
const videoId = extractYouTubeId(item.embed);
if (videoId) {
item.embed = `https://www.youtube.com/embed/${videoId}`;
item.videoId = videoId;
}
}
}
});
}
// Tìm hoặc tạo insurance
let insurance = await Insurance.findOne({
name: "default",
language: "en",
});
// ✅ Capture BEFORE state
const beforeData = insurance
? JSON.parse(
JSON.stringify(insurance.toObject ? insurance.toObject() : insurance),
)
: {};
if (!insurance) {
insurance = new Insurance({
name: "default",
language: "en",
hero: heroData,
page: pageData,
content: contentData,
version: "2.0.0",
isActive: true,
});
} else {
insurance.hero = heroData;
insurance.page = pageData;
insurance.content = contentData;
insurance.version = "2.0.0";
}
await insurance.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(
JSON.stringify(insurance.toObject ? insurance.toObject() : insurance),
);
// ✅ AUDIT LOGGING - Insurance Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Insurance",
documentId: insurance._id,
action: AUDIT_ACTIONS.UPDATE_INSURANCE,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "Insurance updated successfully");
res.redirect("/admin/insurance");
} catch (err) {
console.error("Error updating insurance:", err);
req.flash("error_msg", err.message || "Error updating insurance");
res.redirect("/admin/insurance");
}
};
// API để xóa insurance (theo ngôn ngữ)
exports.delete = async (req, res) => {
try {
const language = req.params.lang;
if (!language) {
return res.status(400).json({
success: false,
error: "Language parameter is required",
});
}
// Không cho phép xóa tiếng Anh mặc định
if (language === "en") {
return res.status(400).json({
success: false,
error: "Cannot delete default English insurance data",
});
}
const result = await Insurance.deleteOne({
name: "default",
language: language,
});
if (result.deletedCount === 0) {
return res.status(404).json({
success: false,
error: "Insurance not found for this language",
});
}
res.json({
success: true,
message: "Insurance deleted successfully for language: " + language,
});
} catch (error) {
console.error("Error deleting insurance:", error);
res.status(500).json({
success: false,
error: error.message || "Error deleting insurance",
});
}
};
-197
View File
@@ -1,197 +0,0 @@
const Safety = require("../models/safety");
const { addBaseUrlToImages } = require("../utils/imageHelper");
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// Lấy dữ liệu Safety từ MongoDB
const getSafetyData = async () => {
const safety = await Safety.findOne().sort({ updatedAt: -1 });
if (!safety) {
return null;
}
return safety.toObject();
};
// API endpoint cho frontend
exports.api = async (req, res) => {
try {
const safety = await getSafetyData();
if (!safety) {
return res.status(404).json({ error: "Safety data not found" });
}
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(safety, baseUrl);
res.json(processedData);
} catch (err) {
console.error("Safety API error:", err);
res.status(500).json({ error: "Error loading safety data" });
}
};
// Hiển thị danh sách Safety cho admin
exports.index = async (req, res) => {
try {
const items = await Safety.find().sort({ updatedAt: -1 }).limit(10);
// Lấy bản ghi mới nhất hoặc object rỗng nếu chưa có dữ liệu
const latest = items && items.length > 0 ? items[0] : null;
const data = latest
? latest.toObject
? latest.toObject()
: latest
: {
hero: { title: "", banner: "" },
approach: {},
approachImgs: [],
approachStats: [],
approachFeatures: [],
approachCards: [],
philosophy: {},
philosophyCards: [],
security: {},
securityCards: [],
};
res.render("admin/safety/index", {
layout: "layouts/main",
title: "Safety Management",
items,
data,
frontendUrl:
process.env.FRONTEND_URL || req.protocol + "://" + req.get("host"),
currentPath: req.path,
user: req.session.user,
});
} catch (err) {
console.error(err);
req.flash("error_msg", "Error loading Safety data");
res.redirect("/admin/dashboard");
}
};
// Hiển thị form tạo mới Safety
exports.createForm = async (req, res) => {
try {
res.render("admin/safety/create", {
layout: "layouts/main",
title: "Create Safety",
currentPath: req.path,
user: req.session.user,
});
} catch (err) {
console.error(err);
req.flash("error_msg", "Error loading create form");
res.redirect("/admin/safety");
}
};
// Tạo mới Safety
exports.create = async (req, res) => {
try {
const safetyData = req.body; // Tùy chỉnh parse nếu cần
const newSafety = new Safety(safetyData);
await newSafety.save();
req.flash("success_msg", "Safety created successfully");
res.redirect("/admin/safety");
} catch (err) {
console.error("Create error:", err);
req.flash("error_msg", `Create error: ${err.message || "Unknown"}`);
res.redirect("/admin/safety/create");
}
};
// Cập nhật Safety
exports.update = async (req, res) => {
try {
const { hero, approach, philosophy, security } = req.body;
// Parse JSON strings
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
return null;
}
}
return data;
};
const heroData = parseJson(hero);
const approachData = parseJson(approach);
const philosophyData = parseJson(philosophy);
const securityData = parseJson(security);
// Tìm hoặc tạo safety record
const items = await Safety.find().sort({ updatedAt: -1 }).limit(1);
let safety = items && items.length > 0 ? items[0] : null;
// ✅ Capture BEFORE state
const beforeData = safety
? JSON.parse(JSON.stringify(safety.toObject ? safety.toObject() : safety))
: {};
if (!safety) {
// Tạo mới
safety = new Safety({
hero: heroData || { title: "", banner: "" },
approach: approachData || {},
philosophy: philosophyData || {},
security: securityData || {},
});
} else {
// Cập nhật
if (heroData) safety.hero = heroData;
if (approachData) safety.approach = approachData;
if (philosophyData) safety.philosophy = philosophyData;
if (securityData) safety.security = securityData;
}
await safety.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(
JSON.stringify(safety.toObject ? safety.toObject() : safety),
);
// ✅ AUDIT LOGGING - Safety Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Safety",
documentId: safety._id,
action: AUDIT_ACTIONS.UPDATE_SAFETY,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "Safety updated successfully");
res.redirect("/admin/safety");
} catch (err) {
console.error("Update error:", err);
req.flash("error_msg", `Update error: ${err.message || "Unknown"}`);
res.redirect("/admin/safety");
}
};
// Xóa Safety
exports.delete = async (req, res) => {
try {
const safety = await Safety.findById(req.params.id);
if (!safety) {
req.flash("error_msg", "Safety record not found");
return res.redirect("/admin/safety");
}
await Safety.findByIdAndDelete(req.params.id);
req.flash("success_msg", "Safety record deleted successfully");
res.redirect("/admin/safety");
} catch (err) {
console.error("Delete error:", err);
req.flash("error_msg", `Delete error: ${err.message || "Unknown"}`);
res.redirect("/admin/safety");
}
};
-321
View File
@@ -1,321 +0,0 @@
const Header = require("../models/header");
// Get all social links
exports.index = async (req, res) => {
try {
const header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
return res.status(404).json({
success: false,
message: "No active header found",
});
}
res.json({
success: true,
data: header.top?.socialLinks || [],
});
} catch (error) {
res.status(500).json({
success: false,
message: error.message,
});
}
};
// Get single social link by platform
exports.show = async (req, res) => {
try {
const { platform } = req.params;
const header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
return res.status(404).json({
success: false,
message: "No active header found",
});
}
const socialLink = header.top?.socialLinks?.find((link) => link.platform === platform);
if (!socialLink) {
return res.status(404).json({
success: false,
message: "Social link not found",
});
}
res.json({
success: true,
data: socialLink,
});
} catch (error) {
res.status(500).json({
success: false,
message: error.message,
});
}
};
// Create social link
exports.store = async (req, res) => {
try {
let { platform, url, icon } = req.body;
// Convert platform to lowercase
platform = platform.toLowerCase().trim();
url = url.trim();
icon = icon ? icon.trim() : null;
console.log("Creating social link:", { platform, url, icon });
// Validate required fields
if (!platform || !url) {
console.log("Validation failed: platform or url missing");
return res.status(400).json({
success: false,
message: "Platform and URL are required",
});
}
// Validate platform is in enum
const validPlatforms = ["linkedin", "twitter", "instagram", "youtube", "facebook"];
if (!validPlatforms.includes(platform)) {
console.log("Invalid platform:", platform);
return res.status(400).json({
success: false,
message: `Invalid platform. Must be one of: ${validPlatforms.join(", ")}`,
});
}
// Find header
let header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
console.log("No active header found");
return res.status(404).json({
success: false,
message: "No active header found",
});
}
console.log("Found header:", header._id);
// Check if platform already exists
const existingLink = header.top?.socialLinks?.find((link) => link.platform === platform);
if (existingLink) {
console.log("Platform already exists:", platform);
return res.status(400).json({
success: false,
message: `Social link for ${platform} already exists`,
});
}
// Add new social link
if (!header.top) {
header.top = {};
}
if (!header.top.socialLinks) {
header.top.socialLinks = [];
}
// Calculate next order number
const maxOrder =
header.top.socialLinks.length > 0 ? Math.max(...header.top.socialLinks.map((link) => link.order || 0)) : 0;
header.top.socialLinks.push({
platform,
url,
icon: icon || `fa-brands fa-${platform}`,
order: maxOrder + 1,
});
console.log("Saving header with new social link");
await header.save();
console.log("Social link created successfully");
res.status(201).json({
success: true,
message: "Social link created successfully",
data: header.top.socialLinks[header.top.socialLinks.length - 1],
});
} catch (error) {
console.error("Error creating social link:", error);
res.status(400).json({
success: false,
message: error.message,
});
}
};
// Update social link
exports.update = async (req, res) => {
try {
let { platform } = req.params;
let { url, icon } = req.body;
// Convert to lowercase
platform = platform.toLowerCase().trim();
url = url.trim();
icon = icon ? icon.trim() : null;
// Validate required fields
if (!url) {
return res.status(400).json({
success: false,
message: "URL is required",
});
}
// Find header
const header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
return res.status(404).json({
success: false,
message: "No active header found",
});
}
// Find and update social link
const socialLink = header.top?.socialLinks?.find((link) => link.platform === platform);
if (!socialLink) {
return res.status(404).json({
success: false,
message: "Social link not found",
});
}
socialLink.url = url;
if (icon) {
socialLink.icon = icon;
}
await header.save();
res.json({
success: true,
message: "Social link updated successfully",
data: socialLink,
});
} catch (error) {
res.status(400).json({
success: false,
message: error.message,
});
}
};
// Delete social link
exports.destroy = async (req, res) => {
try {
let { platform } = req.params;
// Convert to lowercase
platform = platform.toLowerCase().trim();
console.log("Deleting social link:", platform);
// Find header
const header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
console.log("No active header found");
return res.status(404).json({
success: false,
message: "No active header found",
});
}
// Find and remove social link
const index = header.top?.socialLinks?.findIndex((link) => link.platform === platform);
if (index === -1 || index === undefined) {
console.log("Social link not found:", platform);
return res.status(404).json({
success: false,
message: "Social link not found",
});
}
const deletedLink = header.top.socialLinks.splice(index, 1);
console.log("Saving header after delete");
await header.save();
console.log("Social link deleted successfully");
res.json({
success: true,
message: "Social link deleted successfully",
data: deletedLink[0],
});
} catch (error) {
console.error("Error deleting social link:", error);
res.status(500).json({
success: false,
message: error.message,
});
}
};
// Bulk update social links (used for reordering and batch updates)
exports.reorder = async (req, res) => {
try {
const { socialLinks } = req.body;
if (!Array.isArray(socialLinks)) {
return res.status(400).json({
success: false,
message: "socialLinks must be an array",
});
}
// Find header
let header = await Header.findOne({ status: "active" }).sort({ order: 1 });
if (!header) {
return res.status(404).json({
success: false,
message: "No active header found",
});
}
// Validate all social links
for (const link of socialLinks) {
if (!link.platform || !link.url) {
return res.status(400).json({
success: false,
message: "Each social link must have platform and url",
});
}
}
// Update social links with order field
if (!header.top) {
header.top = {};
}
header.top.socialLinks = socialLinks.map((link, index) => ({
platform: link.platform,
url: link.url,
icon: link.icon || `fa-brands fa-${link.platform}`,
order: link.order || index + 1, // Use provided order or calculate from index
}));
await header.save();
res.json({
success: true,
message: "Social links updated successfully",
data: header.top.socialLinks,
});
} catch (error) {
res.status(400).json({
success: false,
message: error.message,
});
}
};
-574
View File
@@ -1,574 +0,0 @@
// controllers/termsController.js
const Terms = require("../models/terms");
const { addBaseUrlToImages } = require("../utils/imageHelper"); // Import helper
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// API để lấy terms data (cho frontend)
exports.api = async (req, res) => {
try {
const language = req.query.lang || "en";
// Sử dụng getDefault để đảm bảo luôn có data
const terms = await Terms.getDefault(language);
// Trả về data với cấu trúc mới
const termsData = terms.toObject();
// Sử dụng helper để thêm base URL vào đường dẫn ảnh
// Truyền baseUrl từ request hoặc từ environment
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(termsData, baseUrl);
res.json({
success: true,
data: {
hero: processedData.hero,
page: processedData.page,
content: processedData.content,
},
});
} catch (error) {
console.error("API Error:", error);
res.status(500).json({
success: false,
error: "Error loading terms data",
message: error.message,
});
}
};
// API để lấy toàn bộ terms data (cho admin)
exports.getTermsData = async (req, res) => {
try {
const language = req.query.lang || "en";
const terms = await Terms.findOne({ name: "default", language: language });
if (!terms) {
return res.status(404).json({
success: false,
error: "Terms data not found",
});
}
const termsData = terms.toObject();
// Thêm base URL vào đường dẫn ảnh
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(termsData, baseUrl);
res.json({
success: true,
data: processedData,
});
} catch (error) {
console.error("Error getting terms data:", error);
res.status(500).json({
success: false,
error: "Error loading terms data",
});
}
};
// API để lấy data theo ngôn ngữ
exports.getByLanguage = async (req, res) => {
try {
const language = req.params.lang || "en";
const terms = await Terms.findOne({ name: "default", language: language });
if (!terms) {
return res.status(404).json({
success: false,
error: "Terms data not found for language: " + language,
});
}
const termsData = terms.toObject();
// Thêm base URL vào đường dẫn ảnh
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(termsData, baseUrl);
res.json({
success: true,
data: {
hero: processedData.hero,
page: processedData.page,
content: processedData.content,
},
});
} catch (error) {
console.error("Error getting terms by language:", error);
res.status(500).json({
success: false,
error: "Error loading terms data",
});
}
};
// Render admin view (không cần thêm baseUrl ở đây vì dùng trong CMS)
exports.index = async (req, res) => {
try {
// Luôn đảm bảo có default data
const terms = await Terms.getDefault("en");
const data = terms.toObject();
const frontendUrl = process.env.FRONTEND_URL || "http://localhost:3000";
res.render("admin/terms/index", {
title: "Terms & Conditions Management",
layout: "layouts/main",
data, // Không cần addBaseUrlToImages cho admin view
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
} catch (error) {
console.error("Error in terms index:", error);
req.flash("error_msg", "An error occurred while loading the page");
res.redirect("/admin/dashboard");
}
};
// Cập nhật dữ liệu terms (CẬP NHẬT CẤU TRÚC MỚI)
exports.update = async (req, res) => {
try {
const { hero, page, content } = req.body;
// Parse JSON strings
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
// Parse all data với cấu trúc mới
const heroData = parseJson(hero) || {};
const pageData = parseJson(page) || {};
const contentData = parseJson(content) || {};
// Normalize embed blocks (convert YouTube watch URLs to /embed/ URLs)
function extractYouTubeId(url) {
if (!url || typeof url !== "string") return null;
// common YouTube URL patterns
const m = url.match(
/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:watch\?v=|embed\/|v\/|shorts\/))([A-Za-z0-9_-]{11})/,
);
return m ? m[1] : null;
}
// Trong exports.update
if (contentData && Array.isArray(contentData.content)) {
contentData.content = contentData.content.map((item) => {
if (item && item.type === "embed") {
let embedUrl = item.embed || item.url || item.source || "";
// Luôn chuyển đổi sang embed URL nếu là watch URL
if (embedUrl.includes("youtube.com/watch")) {
const videoId = extractYouTubeId(embedUrl);
if (videoId) {
item.embed = `https://www.youtube.com/embed/${videoId}`;
item.videoId = videoId;
}
}
// Đảm bảo có videoId
else if (embedUrl && !item.videoId) {
const videoId = extractYouTubeId(embedUrl);
if (videoId) {
item.videoId = videoId;
}
}
}
return item;
});
}
// Tìm hoặc tạo terms
let terms = await Terms.findOne({ name: "default", language: "en" });
// ✅ Capture BEFORE state
const beforeData = terms
? JSON.parse(JSON.stringify(terms.toObject ? terms.toObject() : terms))
: {};
if (!terms) {
// Tạo mới với cấu trúc mới
terms = new Terms({
name: "default",
language: "en",
hero: heroData,
page: pageData,
content: contentData,
version: "2.0.0",
isActive: true,
migratedFromOldStructure: false,
});
} else {
// Update existing với cấu trúc mới
terms.hero = heroData;
terms.page = pageData;
terms.content = contentData;
terms.version = "2.0.0";
terms.migratedFromOldStructure = false;
terms.updatedAt = new Date();
}
await terms.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(
JSON.stringify(terms.toObject ? terms.toObject() : terms),
);
// ✅ AUDIT LOGGING - Terms Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Terms",
documentId: terms._id,
action: AUDIT_ACTIONS.UPDATE_TERMS,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "Terms & Conditions updated successfully");
res.redirect("/admin/terms-conditions");
} catch (err) {
console.error("Error updating terms:", err);
req.flash("error_msg", err.message || "Error updating terms");
res.redirect("/admin/terms-conditions");
}
};
// Seed data từ JSON file mới (cấu trúc mới)
exports.seed = async (req, res) => {
try {
const fs = require("fs").promises;
const path = require("path");
// Đọc file JSON
const jsonPath = path.join(__dirname, "../data/terms-conditions.json");
const jsonData = JSON.parse(await fs.readFile(jsonPath, "utf8"));
console.log("Seeding from JSON...");
console.log("JSON structure keys:", Object.keys(jsonData));
// Kiểm tra cấu trúc JSON
let terms;
if (jsonData.hero && jsonData.page && jsonData.content) {
// Cấu trúc mới
console.log("Using new structure (hero, page, content)");
terms = await Terms.migrateFromNewJson(jsonData, "en");
} else if (jsonData.hero && jsonData.termsHeader && jsonData.sections) {
// Cấu trúc cũ
console.log("Using old structure, converting to new...");
terms = await Terms.migrateFromJson(jsonData, "en");
} else {
throw new Error("Unknown JSON structure");
}
res.json({
success: true,
message: "Terms data seeded successfully",
data: {
id: terms._id,
hero: terms.hero,
page: terms.page,
content: terms.content,
},
});
} catch (error) {
console.error("Error seeding terms:", error);
res.status(500).json({
success: false,
error: error.message || "Error seeding terms data",
});
}
};
// API preview cho admin (tạo HTML preview)
exports.preview = async (req, res) => {
try {
const { hero, page, content } = req.body;
// Parse JSON strings
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
const heroData = parseJson(hero) || {};
const pageData = parseJson(page) || {};
const contentData = parseJson(content) || {};
// Thêm base URL vào đường dẫn ảnh cho preview
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedHeroData = addBaseUrlToImages(heroData, baseUrl);
// Render preview HTML
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>${pageData.title || "Terms & Conditions Preview"}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
body { font-family: Arial, sans-serif; }
.hero-section {
background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
url('${processedHeroData.backgroundImage || ""}');
background-size: cover;
background-position: center;
color: white;
padding: 100px 20px;
text-align: center;
}
.page-header {
padding: 40px 20px;
background: #f8f9fa;
}
.content-section {
padding: 40px 20px;
}
.content-item {
margin-bottom: 20px;
}
</style>
</head>
<body>
<!-- Hero Section -->
<div class="hero-section">
<h1>${heroData.title || "Terms & Conditions"}</h1>
</div>
<!-- Page Header -->
<div class="page-header">
<div class="container">
<h2>${pageData.title || "Terms & Conditions"}</h2>
${pageData.divider !== false ? "<hr>" : ""}
</div>
</div>
<!-- Content Section -->
<div class="content-section">
<div class="container">
${renderContentItems(contentData.content || [])}
</div>
</div>
</body>
</html>
`;
res.send(html);
} catch (error) {
console.error("Error generating preview:", error);
res.status(500).send("Error generating preview");
}
};
// Helper function để render content items
function renderContentItems(contentItems) {
if (!Array.isArray(contentItems) || contentItems.length === 0) {
return "<p>No content available.</p>";
}
return contentItems
.map((item) => {
switch (item.type) {
case "paragraph":
return `<div class="content-item"><p>${item.text || ""}</p></div>`;
case "section":
let html = `<div class="content-item">`;
html += `<h3>${item.title || ""}</h3>`;
html += `<p>${item.content || ""}</p>`;
if (item.subsections && item.subsections.length > 0) {
item.subsections.forEach((subsection) => {
if (subsection.type === "cancellation_table") {
html += `<h4>${subsection.title || ""}</h4>`;
if (subsection.items && subsection.items.length > 0) {
html += "<ul>";
subsection.items.forEach((listItem) => {
html += `<li>${listItem}</li>`;
});
html += "</ul>";
}
} else if (subsection.type === "cancellation_section") {
html += `<h4>${subsection.title || ""}</h4>`;
if (subsection.items && subsection.items.length > 0) {
html += "<ul>";
subsection.items.forEach((listItem) => {
html += `<li>${listItem}</li>`;
});
html += "</ul>";
}
} else if (subsection.type === "note") {
html += `<div class="alert alert-info">${subsection.text || ""}</div>`;
}
});
}
html += `</div>`;
return html;
case "note":
return `<div class="content-item alert alert-info">${item.text || ""}</div>`;
case "embed":
// Support several embed shapes: { embed }, { url }, { source }, { videoId }
const embedSrc =
item.embed ||
item.url ||
item.source ||
(item.videoId
? `https://www.youtube.com/embed/${item.videoId}`
: "");
if (!embedSrc) return `<div class="content-item">Invalid embed</div>`;
return `<div class="content-item embed-item" style="margin-bottom:20px;">
<div style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;">
<iframe src="${embedSrc}" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;" allowfullscreen loading="lazy" referrerpolicy="no-referrer"></iframe>
</div>
</div>`;
default:
return `<div class="content-item">Unknown content type: ${item.type}</div>`;
}
})
.join("");
}
// API để tạo terms mới (cho các ngôn ngữ khác)
exports.create = async (req, res) => {
try {
const { hero, page, content, language } = req.body;
if (!language) {
return res.status(400).json({
success: false,
error: "Language is required",
});
}
// Kiểm tra đã tồn tại chưa
const existing = await Terms.findOne({
name: "default",
language: language,
});
if (existing) {
return res.status(400).json({
success: false,
error: "Terms already exists for language: " + language,
});
}
// Parse JSON nếu cần
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
console.error("JSON parse error:", e);
return null;
}
}
return data;
};
const terms = new Terms({
name: "default",
language: language,
hero: parseJson(hero) || {},
page: parseJson(page) || {},
content: parseJson(content) || {},
version: "2.0.0",
isActive: true,
migratedFromOldStructure: false,
});
await terms.save();
res.json({
success: true,
message: "Terms created successfully for language: " + language,
data: terms,
});
} catch (error) {
console.error("Error creating terms:", error);
res.status(500).json({
success: false,
error: error.message || "Error creating terms",
});
}
};
// API để xóa terms (theo ngôn ngữ)
exports.delete = async (req, res) => {
try {
const language = req.params.lang;
if (!language) {
return res.status(400).json({
success: false,
error: "Language is required",
});
}
// Không cho phép xóa tiếng Anh mặc định
if (language === "en") {
return res.status(400).json({
success: false,
error: "Cannot delete default English terms",
});
}
const result = await Terms.deleteOne({
name: "default",
language: language,
});
if (result.deletedCount === 0) {
return res.status(404).json({
success: false,
error: "Terms not found for language: " + language,
});
}
res.json({
success: true,
message: "Terms deleted successfully for language: " + language,
});
} catch (error) {
console.error("Error deleting terms:", error);
res.status(500).json({
success: false,
error: error.message || "Error deleting terms",
});
}
};
-138
View File
@@ -1,138 +0,0 @@
const { addBaseUrlToImages } = require("../utils/imageHelper");
const Home = require("../models/home");
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// Get testimonial data from Home model
const getTestimonialData = async () => {
const home = await Home.findOne().sort({ updatedAt: -1 });
if (!home || !home.testimonials) {
return null;
}
return home.testimonials.toObject
? home.testimonials.toObject()
: home.testimonials;
};
// API to get testimonial data
exports.api = async (req, res) => {
try {
const testimonial = await getTestimonialData();
if (!testimonial) {
return res.status(404).json({ error: "Testimonial data not found" });
}
const baseUrl =
process.env.BACKEND_URL || `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(testimonial, baseUrl);
res.json(processedData);
} catch (err) {
console.error("API Error:", err);
res.status(500).json({ error: "Error loading testimonial data" });
}
};
// Render admin view
exports.index = async (req, res) => {
try {
const data = (await getTestimonialData()) || {
heading: "Student Reviews & Testimonials",
subheading: "What Our Students Say",
videoUrl: "",
videoThumbnail: "",
items: [],
};
const frontendUrl = process.env.FRONTEND_URL;
res.render("admin/home/testimonial/index", {
title: "Testimonials Management",
layout: "layouts/main",
data,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
} catch (error) {
console.error("Error in testimonial index:", error);
req.flash("error_msg", "An error occurred while loading the page");
res.redirect("/admin/dashboard");
}
};
// Cập nhật dữ liệu testimonial (chỉ update phần testimonials của Home)
exports.update = async (req, res) => {
try {
const { heading, subheading, videoUrl, videoThumbnail, items } = req.body;
// Parse JSON strings nếu cần
const parseJson = (data) => {
if (!data) return null;
if (typeof data === "string") {
try {
return JSON.parse(data);
} catch (e) {
return null;
}
}
return data;
};
const itemsData = parseJson(items);
// Tìm hoặc tạo Home document
let home = await Home.findOne().sort({ updatedAt: -1 });
if (!home) {
home = new Home({});
}
// ✅ Capture BEFORE state
const beforeData = home.testimonials
? JSON.parse(
JSON.stringify(
home.testimonials.toObject
? home.testimonials.toObject()
: home.testimonials,
),
)
: {};
const updatedTestimonialData = {
heading: heading || "Student Reviews & Testimonials",
subheading: subheading || "What Our Students Say",
videoUrl: videoUrl || "",
videoThumbnail: videoThumbnail || "",
items: itemsData || [],
};
// Cập nhật chỉ phần testimonials
home.testimonials = updatedTestimonialData;
await home.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(JSON.stringify(updatedTestimonialData));
// ✅ AUDIT LOGGING - Testimonial Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Home",
documentId: home._id,
action: AUDIT_ACTIONS.UPDATE_TESTIMONIAL,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "Testimonials updated successfully");
res.redirect("/admin/home/testimonials");
} catch (err) {
console.error("Error updating testimonials:", err);
req.flash("error_msg", err.message || "Error updating testimonials");
res.redirect("/admin/home/testimonials");
}
};
-119
View File
@@ -1,119 +0,0 @@
const { addBaseUrlToImages } = require("../utils/imageHelper");
const Home = require("../models/home");
const writeAuditLog = require("../audit/writeAuditLog");
const diffObject = require("../audit/diffObject");
const AUDIT_ACTIONS = require("../constants/auditAction");
// Get videoGallery data from Home model
const getVideoGalleryData = async () => {
const home = await Home.findOne().sort({ updatedAt: -1 });
if (!home || !home.videoGallery) {
return null;
}
return home.videoGallery.toObject
? home.videoGallery.toObject()
: home.videoGallery;
};
// API to get videoGallery data
exports.api = async (req, res) => {
try {
const videoGallery = await getVideoGalleryData();
if (!videoGallery) {
return res.status(404).json({ error: "Video Gallery data not found" });
}
const baseUrl =
process.env.BACKEND_URL ?? `${req.protocol}://${req.get("host")}`;
const processedData = addBaseUrlToImages(videoGallery, baseUrl);
res.json(processedData);
} catch (err) {
console.error("API Error:", err);
res.status(500).json({ error: "Error loading video gallery data" });
}
};
// Render admin view
exports.index = async (req, res) => {
try {
const data = (await getVideoGalleryData()) || {
heading: "",
videoUrl: "",
thumbnail: "",
};
const frontendUrl = process.env.FRONTEND_URL;
res.render("admin/home/videoGallery/index", {
title: "Video Gallery Management",
layout: "layouts/main",
data,
frontendUrl,
currentPath: req.path,
user: req.session.user,
});
} catch (error) {
console.error("Error in videoGallery index:", error);
req.flash("error_msg", "An error occurred while loading the page");
res.redirect("/admin/dashboard");
}
};
// Cập nhật dữ liệu videoGallery
exports.update = async (req, res) => {
try {
const { heading, videoUrl, thumbnail } = req.body;
// Tìm hoặc tạo Home document
let home = await Home.findOne().sort({ updatedAt: -1 });
if (!home) {
home = new Home({});
}
// ✅ Capture BEFORE state
const beforeData = home.videoGallery
? JSON.parse(
JSON.stringify(
home.videoGallery.toObject
? home.videoGallery.toObject()
: home.videoGallery,
),
)
: {};
const updatedVideoGalleryData = {
heading: heading || "",
videoUrl: videoUrl || "",
thumbnail: thumbnail || "",
};
// Cập nhật chỉ phần videoGallery
home.videoGallery = updatedVideoGalleryData;
await home.save();
// ✅ Capture AFTER state
const afterData = JSON.parse(JSON.stringify(updatedVideoGalleryData));
// ✅ AUDIT LOGGING - Video Gallery Updated
const changes = diffObject(beforeData, afterData);
if (changes.length > 0) {
await writeAuditLog({
model: "Home",
documentId: home._id,
action: AUDIT_ACTIONS.UPDATE_VIDEO_GALLERY,
before: beforeData,
after: afterData,
changes,
req,
});
}
req.flash("success_msg", "Video Gallery updated successfully");
res.redirect("/admin/home/video-gallery");
} catch (err) {
console.error("Error updating video gallery:", err);
req.flash("error_msg", err.message || "Error updating video gallery");
res.redirect("/admin/home/video-gallery");
}
};
-114
View File
@@ -1,114 +0,0 @@
{
"countries": [
{
"id": 1,
"name": "France",
"icon": "assets/img/home-2/visa/03.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 2,
"name": "UK",
"icon": "assets/img/home-2/visa/11.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 3,
"name": "Canada",
"icon": "assets/img/home-2/visa/02.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 4,
"name": "Germany",
"icon": "assets/img/home-2/visa/12.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 5,
"name": "Spain",
"icon": "assets/img/home-2/visa/13.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 6,
"name": "South Korea",
"icon": "assets/img/home-2/visa/14.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 7,
"name": "Japan",
"icon": "assets/img/home-2/visa/15.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 8,
"name": "Croatia",
"icon": "assets/img/home-2/visa/16.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 9,
"name": "England",
"icon": "assets/img/home-2/visa/17.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 10,
"name": "Indonesia",
"icon": "assets/img/home-2/visa/18.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
}
]
}
-146
View File
@@ -1,146 +0,0 @@
{
"countryDetails": {
"id": 1,
"name": "United States of America",
"title": "COUNTRY USA",
"mainImage": "assets/img/inner-page/country-details/details-1.jpg",
"description": "The United States is one of the most popular destinations for international students and immigrants, offering world-class universities, diverse cultural experiences, and countless career opportunities. With top-ranked education systems, advanced research facilities, and a welcoming environment for skilled professionals, the USA is ideal for those seeking growth and global exposure.",
"additionalInfo": "Our consultancy provides complete guidance for study visas, work permits, and permanent residency pathways tailored to your goals.",
"tagline": "Over the last 35 Years we made an impact that is strong & we have long way to go.",
"visaTypes": [
{
"category": "Tourist & Work",
"items": [
{
"title": "Tourist Visa",
"description": "Broad term that can refer to various aspects of interconnectedness"
},
{
"title": "Work Permit",
"description": "Broad term that can refer to various aspects of interconnectedness"
}
]
},
{
"category": "Student & Family",
"items": [
{
"title": "Student",
"description": "Broad term that can refer to various aspects of interconnectedness"
},
{
"title": "Tourist Visa",
"description": "Broad term that can refer to various aspects of interconnectedness"
}
]
}
],
"visaProcess": [
{
"number": "01",
"title": "Consultation & Eligibility Check",
"description": "Our experts review your profile and visa requirements."
},
{
"number": "02",
"title": "Application Preparation",
"description": "We help with document collection, form filling, and statement drafting."
},
{
"number": "03",
"title": "Submission",
"description": "Visa application is submitted online with required fees."
},
{
"number": "04",
"title": "Interview Guidance",
"description": "Get training and mock sessions for embassy interview."
},
{
"number": "05",
"title": "Approval & Travel",
"description": "Once approved, we provide travel and pre-departure guidance."
}
],
"images": [
"assets/img/inner-page/country-details/details-2.jpg",
"assets/img/inner-page/country-details/details-3.png"
],
"visaCategories": [
"Student Visa (F1, M1, J1)",
"Work Visa (H1B, L1)",
"Tourist Visa (B1/B2)",
"Family/Spouse Visa (K1, IR1, F2A)",
"Green Card / Immigrant Visa"
],
"serviceOptions": [
{
"number": "01",
"title": "Consultation & Eligibility Check",
"description": "Our experts review your profile and visa requirements."
},
{
"number": "02",
"title": "Application Preparation",
"description": "We help with document collection, form filling, and statement drafting."
},
{
"number": "03",
"title": "Submission",
"description": "Visa application is submitted online with required fees."
},
{
"number": "04",
"title": "Interview Guidance",
"description": "Get training and mock sessions for embassy interview."
},
{
"number": "05",
"title": "Approval & Travel",
"description": "Once approved, we provide travel and pre-departure guidance."
}
]
},
"relatedCountries": [
{
"id": 1,
"name": "Canada",
"icon": "assets/img/inner-page/country-details/01.png"
},
{
"id": 2,
"name": "USA",
"icon": "assets/img/inner-page/country-details/02.png"
},
{
"id": 3,
"name": "USA",
"icon": "assets/img/inner-page/country-details/03.png"
},
{
"id": 4,
"name": "Saint Helena",
"icon": "assets/img/inner-page/country-details/05.png"
},
{
"id": 5,
"name": "Iran",
"icon": "assets/img/inner-page/country-details/06.png"
},
{
"id": 6,
"name": "Spain",
"icon": "assets/img/inner-page/country-details/07.png"
},
{
"id": 7,
"name": "Japan",
"icon": "assets/img/inner-page/country-details/08.png"
}
],
"contactInfo": {
"phone": "+009 438 222 9540",
"email": "infor@xridergamil.com",
"location": "Toronto, Montreal, City 2026"
}
}
-6762
View File
File diff suppressed because it is too large Load Diff
-77
View File
@@ -1,77 +0,0 @@
{
"hero": {
"title": "Make Appointment",
"backgroundImage": "/assets/img/inner-page/breadcrumb.jpg",
"subtitle": "About Our Consultancy",
"heading": "Want to meet us for your need?",
"description": "24/7 customer support is always ready to answer all your questions"
},
"visaOptions": [
"Canada Immigration",
"Tourist Visa",
"Medical Visa",
"Coaching",
"Student Visa",
"Spouse Visa",
"Job Opportunity",
"Exam"
],
"form": {
"heading": "Request Appointment",
"fields": [
{
"name": "name",
"label": "Your Name",
"type": "text",
"placeholder": "Your name",
"required": true,
"colClass": "col-lg-4"
},
{
"name": "email",
"label": "Your Email",
"type": "email",
"placeholder": "Your email",
"required": true,
"colClass": "col-lg-4"
},
{
"name": "phone",
"label": "Your Phone",
"type": "tel",
"placeholder": "Phone Number",
"required": false,
"colClass": "col-lg-4"
},
{
"name": "address",
"label": "Your Address",
"type": "text",
"placeholder": "Your address",
"required": false,
"colClass": "col-lg-6"
},
{
"name": "appointmentDate",
"label": "Appointment Date",
"type": "date",
"placeholder": "",
"required": false,
"colClass": "col-lg-6"
},
{
"name": "message",
"label": "Your Message",
"type": "textarea",
"placeholder": "Type your message",
"required": false,
"colClass": "col-lg-12"
}
],
"submitButton": {
"text": "Request Appointment",
"icon": "fa-solid fa-arrow-right",
"buttonClass": "theme-btn"
}
}
}
-690
View File
@@ -1,690 +0,0 @@
{
"hero": {
"title": "Booking",
"backgroundImage": "/uploads/booking/b13.jpg"
},
"searchBar": {
"locationLabel": "Location",
"holidaySeasonLabel": "Holiday Season",
"searchButtonText": "Search"
},
"filterPanel": {
"title": "FIND YOUR CAMP!",
"priceTitle": "Price",
"priceLabel": "Maximum Price (USD)",
"pricePlaceholder": "Enter max price",
"priceMin": 0,
"priceMax": 2000,
"activitiesTitle": "Activities",
"ageTitle": "AGE",
"ageSelectPlaceholder": "Select age",
"ageMin": 7,
"ageMax": 18,
"ratingTitle": "RATING WISE",
"ratingOptions": [
{ "value": "", "label": "All Ratings" },
{ "value": "5", "label": "5 Stars" },
{ "value": "4", "label": "4 Stars & Up" },
{ "value": "3", "label": "3 Stars & Up" },
{ "value": "2", "label": "2 Stars & Up" },
{ "value": "1", "label": "1 Star & Up" }
],
"resetButtonText": "Reset"
},
"programs": [
{ "value": "adventure", "label": "Adventure, Sports & Creative" },
{ "value": "arts-crafts", "label": "Arts & Crafts" },
{ "value": "climbing", "label": "Climbing" },
{ "value": "dancing", "label": "Dancing" },
{ "value": "diving", "label": "Diving" },
{ "value": "englisch-camps", "label": "Englischcamps" },
{ "value": "englisch-toefl", "label": "Englisch TOEFL©" },
{ "value": "fishing", "label": "Fishing" },
{ "value": "german-camps", "label": "German Camps" },
{ "value": "horseback", "label": "Horseback Riding" },
{ "value": "husky", "label": "Husky Camp" },
{ "value": "icit", "label": "International Counsellor in Training (ICIT)" },
{ "value": "lifeguarding", "label": "Lifeguarding" },
{ "value": "language", "label": "Language" },
{ "value": "leadership", "label": "Leadership" },
{ "value": "multi-water", "label": "Multi Water Adventure" },
{ "value": "sailing", "label": "Sailing" },
{ "value": "skating", "label": "Skating" },
{ "value": "soccer", "label": "Soccer" },
{ "value": "space", "label": "Space Exploration" },
{ "value": "spanish", "label": "Spanishcourse" },
{ "value": "survival", "label": "Survival" },
{ "value": "swimming", "label": "Swimming" },
{ "value": "tennis", "label": "Tennis" },
{ "value": "windsurf", "label": "Windsurfing" }
],
"holidays": [
{ "value": "autumn", "label": "Autumn" },
{ "value": "spring", "label": "Spring" },
{ "value": "summer", "label": "Summer" }
],
"locations": [
{ "value": "philippines", "label": "Philippines" },
{ "value": "vietnam", "label": "Vietnam" },
{ "value": "portugal", "label": "Portugal" },
{ "value": "china", "label": "China" },
{ "value": "thailand", "label": "Thailand" },
{ "value": "malaysia", "label": "Malaysia" },
{ "value": "holiday", "label": "Holiday" }
],
"camps": [
{
"name": "Adventure, Sports & Creative",
"price": 395,
"priceText": "from 395 USD",
"season": ["spring", "summer", "autumn"],
"age": [12, 18],
"locations": ["thailand"],
"image": "/uploads/booking/00_Abenteuercamp-Hike-533b20fa.jpg",
"link": "/activities/adventure-sports-creative",
"program": "adventure",
"rating": 5
},
{
"name": "Arts & Crafts",
"price": 500,
"priceText": "from 500 USD",
"season": ["spring", "summer", "autumn"],
"age": [12, 18],
"locations": ["vietnam"],
"image": "/uploads/booking/01-Kreativprogramm-in-der-Ferienfreizeit-c6e95722.jpg",
"link": "/activities/arts-crafts",
"program": "arts-crafts",
"rating": 4
},
{
"name": "Climbing",
"price": 515,
"priceText": "from 515 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["philippines"],
"image": "/uploads/booking/00-Kletterkurs_Sommercamp_Bayern-40f1bd8d.jpg",
"link": "/activities/climbing",
"program": "climbing",
"rating": 5
},
{
"name": "Dancing",
"price": 520,
"priceText": "from 520 USD",
"season": ["summer", "autumn"],
"age": [12, 18],
"locations": ["malaysia"],
"image": "/uploads/booking/00-Tanzen-im-Feriencamp-c1834fc7.jpg",
"link": "/activities/dancing",
"program": "dancing",
"rating": 4
},
{
"name": "Diving",
"price": 1190,
"priceText": "from 1190 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["philippines"],
"image": "/uploads/booking/01-Tauchkurs-im-Sommercamp-3309e219.jpg",
"link": "/activities/diving",
"program": "diving",
"rating": 5
},
{
"name": "Englisch TOEFL®",
"price": 1290,
"priceText": "from 1290 USD",
"season": ["spring", "summer"],
"age": [12, 18],
"locations": ["malaysia"],
"image": "/uploads/booking/07-Language-Camps-by-Camp-Adventure-b9f01b6a.jpg",
"link": "/activities/englisch-toefl",
"program": "englisch-toefl",
"rating": 5
},
{
"name": "Englischcamps",
"price": 530,
"priceText": "from 530 USD",
"season": ["spring", "summer", "autumn"],
"age": [12, 18],
"locations": ["philippines", "thailand"],
"image": "/uploads/booking/00-Language-Camps-by-Camp-Adventure-add7aa60.jpg",
"link": "/activities/englischcamps",
"program": "englisch-camps",
"rating": 4
},
{
"name": "Fishing",
"price": 580,
"priceText": "from 580 USD",
"season": ["spring", "summer", "autumn"],
"age": [12, 18],
"locations": ["vietnam"],
"image": "/uploads/booking/01-Angeln-im-Ferienlager-02243939.jpg",
"link": "/activities/fishing",
"program": "fishing",
"rating": 4
},
{
"name": "German Camps",
"price": 610,
"priceText": "from 610 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["thailand", "vietnam"],
"image": "/uploads/booking/Deutschcamps-in-Deutschland-0ed3ea07.jpg",
"link": "/activities/german-camps",
"program": "german-camps",
"rating": 4
},
{
"name": "Horseback Riding",
"price": 620,
"priceText": "from 620 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["portugal"],
"image": "/uploads/booking/00-Reiten-Sommercamp-Ausritt-6930f841.jpg",
"link": "/activities/horseback-riding",
"program": "horseback",
"rating": 5
},
{
"name": "Husky Camp",
"price": 525,
"priceText": "from 525 USD",
"season": ["spring", "summer", "autumn"],
"age": [12, 18],
"locations": ["china"],
"image": "/uploads/booking/00-Husky20Camp_sommercamp20mit20Hunden-9c098a17.jpg",
"link": "/activities/husky-camp",
"program": "husky",
"rating": 5
},
{
"name": "International Counsellor in Training (ICIT)",
"price": 995,
"priceText": "from 995 USD",
"season": ["summer"],
"age": [16, 18],
"locations": ["thailand", "malaysia"],
"image": "/uploads/booking/00-INTERNATIONAL20COUNSELOR20IN20TRAINING_teambuilding-3b91547c.jpg",
"link": "/activities/international-counsellor-in-training-icit",
"program": "icit",
"rating": 5
},
{
"name": "Leadership",
"price": 1185,
"priceText": "from 1185 USD",
"season": ["summer"],
"age": [16, 18],
"locations": ["philippines"],
"image": "/uploads/booking/00-Leadership-Camp-0d21c60a.jpg",
"link": "/activities/senior-plus-leadership",
"program": "leadership",
"rating": 5
},
{
"name": "Lifeguarding",
"price": 580,
"priceText": "from 580 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["malaysia"],
"image": "/uploads/booking/00-Rettungsschwimmen-Feriencamp-6a364891.jpg",
"link": "/activities/lifeguarding",
"program": "lifeguarding",
"rating": 4
},
{
"name": "Multi Water Adventure",
"price": 990,
"priceText": "from 990 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["philippines"],
"image": "/uploads/booking/00-Multi-Water-Adventure-im-Sommercamp-a47c08a3.jpg",
"link": "/activities/multi-water-adventure",
"program": "multi-water",
"rating": 1
},
{
"name": "Sailing",
"price": 990,
"priceText": "from 990 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["thailand"],
"image": "/uploads/booking/01-Segeln-im-Sommercamp-in-Spanien-e9d06b28.jpg",
"link": "/activities/sailing",
"program": "sailing",
"rating": 2
},
{
"name": "Skating",
"price": 420,
"priceText": "from 420 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["vietnam"],
"image": "/uploads/booking/00-Skaten im Sommercamp-8240a4c7.jpg",
"link": "/activities/skating",
"program": "skating",
"rating": 3
},
{
"name": "Soccer",
"price": 495,
"priceText": "from 495 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["malaysia"],
"image": "/uploads/booking/00-Soccer-Camps-543a1625.jpg",
"link": "/activities/soccer",
"program": "soccer",
"rating": 3
},
{
"name": "Space Exploration",
"price": 595,
"priceText": "from 595 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["china"],
"image": "/uploads/booking/00-Space-Exploration-Sommer-Camp-599962e5.jpg",
"link": "/activities/space-exploration",
"program": "space",
"rating": 4
},
{
"name": "Spanish Camps",
"price": 595,
"priceText": "from 595 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["portugal"],
"image": "/uploads/booking/Spanischcamp-in-Spanien-d118b0e9.jpg",
"link": "/activities/spanish-camps",
"program": "spanish",
"rating": 4
},
{
"name": "Survival",
"price": 495,
"priceText": "from 495 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["vietnam"],
"image": "/uploads/booking/03-Walsrode-Survival-e00c16d7.jpg",
"link": "/activities/survival",
"program": "survival",
"rating": 4
},
{
"name": "Swimming",
"price": 495,
"priceText": "from 495 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["philippines"],
"image": "/uploads/booking/Schwimmen_camp-98f48b76.jpg",
"link": "/activities/swimming",
"program": "swimming",
"rating": 4
},
{
"name": "Tennis",
"price": 495,
"priceText": "from 495 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["malaysia"],
"image": "/uploads/booking/00-Tenniscamp-57cd2c79.jpg",
"link": "/activities/tennis",
"program": "tennis",
"rating": 4
},
{
"name": "Windsurfing",
"price": 990,
"priceText": "from 990 USD",
"season": ["summer"],
"age": [12, 18],
"locations": ["thailand"],
"image": "/uploads/booking/00-Windsurfen-im-Sommercamp-ac31b126.jpg",
"link": "/activities/windsurfing",
"program": "windsurf",
"rating": 5
}
],
"formSteps": [
{
"step": 1,
"title": "Participant Information",
"sections": [
{
"id": "logistics",
"fields": [
{
"name": "accommodation",
"label": "Accommodation",
"type": "select",
"required": true,
"options": [
{
"value": "a1",
"label": "Accommodation in tiny houses/huts in the Adventure Camp",
"price": 10
}
]
},
{
"name": "transferTo",
"label": "Getting there",
"type": "select",
"required": true,
"options": [
{
"value": "3",
"label": "Self-organized Arrival (4-6 pm)",
"price": 0
},
{
"value": "351",
"label": "Shuttle Plattling - Meeting Point: Train Station platform 5 (at 3:30 pm)",
"price": 45
}
]
},
{
"name": "transferFrom",
"label": "Departure",
"type": "select",
"required": true,
"options": [
{
"value": "3",
"label": "Self-organized Pick-up",
"price": 0
},
{
"value": "351",
"label": "Shuttle Plattling - Train Station",
"price": 45
}
]
},
{
"name": "activities",
"label": "Activity Profile",
"type": "select",
"required": true,
"options": [
{
"value": "195",
"label": "Adventure, Sports and Creative (Basic profile)",
"price": 0
}
]
},
{
"name": "addons",
"label": "Additional addons",
"type": "checkbox-group",
"required": false,
"options": [
{
"value": "8",
"label": "Travel Cancellation Guarantee (one week)",
"price": 45
}
]
}
]
},
{
"id": "personal_details",
"fields": [
{
"name": "firstName",
"label": "First name",
"type": "text",
"required": true
},
{
"name": "lastName",
"label": "Last name",
"type": "text",
"required": true
},
{
"name": "birthday",
"label": "Birthday",
"type": "date",
"required": true
},
{
"name": "gender",
"label": "Gender",
"type": "select",
"required": true,
"options": [
{
"value": "female",
"label": "Female"
},
{
"value": "male",
"label": "Male"
},
{
"value": "divers",
"label": "Non binary"
}
]
},
{
"name": "nationality",
"label": "Nationality",
"type": "select",
"required": true,
"options": [
{
"value": "Germany",
"label": "Germany"
},
{
"value": "United States",
"label": "United States"
},
{
"value": "United Kingdom",
"label": "United Kingdom"
},
{
"value": "France",
"label": "France"
},
{
"value": "Spain",
"label": "Spain"
}
]
},
{
"name": "lodgingPartner",
"label": "Lodging partner",
"type": "text",
"required": false
}
]
}
]
},
{
"step": 2,
"title": "Guardian Information",
"sections": [
{
"id": "guardian_details",
"fields": [
{
"name": "customerGender",
"label": "Salutation",
"type": "select",
"required": false,
"options": [
{
"value": "female",
"label": "Mrs"
},
{
"value": "male",
"label": "Mr"
},
{
"value": "divers",
"label": "Non binary"
}
]
},
{
"name": "customerFirstName",
"label": "First name",
"type": "text",
"required": true
},
{
"name": "customerLastName",
"label": "Last name",
"type": "text",
"required": true
},
{
"name": "customerEmail",
"label": "E-Mail",
"type": "email",
"required": true
},
{
"name": "customerPhone",
"label": "Phone",
"type": "tel",
"required": true
},
{
"name": "customerStreet",
"label": "Street & Number",
"type": "text",
"required": true
},
{
"name": "customerZip",
"label": "Zip",
"type": "text",
"required": true
},
{
"name": "customerCity",
"label": "City",
"type": "text",
"required": true
},
{
"name": "customerCountry",
"label": "Country",
"type": "select",
"required": true,
"options": [
{
"value": "Germany",
"label": "Germany"
},
{
"value": "United States",
"label": "United States"
},
{
"value": "United Kingdom",
"label": "United Kingdom"
},
{
"value": "France",
"label": "France"
},
{
"value": "Spain",
"label": "Spain"
}
]
}
]
}
]
}
],
"validation": {
"step1Required": [
"accommodation",
"transferTo",
"transferFrom",
"activities",
"firstName",
"lastName",
"birthday",
"gender",
"nationality"
],
"step2Required": [
"customerFirstName",
"customerLastName",
"customerEmail",
"customerPhone",
"customerStreet",
"customerZip",
"customerCity",
"customerCountry"
]
},
"configuration": {
"currency": "USD",
"discounts": [
{
"id": "915",
"name": "Sibling or Returning Camper Discount",
"type": "percentage",
"value": 0.05,
"description": "This discount is granted if your child has attended a Camp Adventure program before or if you register siblings."
},
{
"id": "9152",
"name": "Sibling or Returning Camper Discount",
"type": "percentage",
"value": 0.05,
"description": "This discount is granted if your child has attended a Camp Adventure program before or if you register siblings."
}
],
"vouchers": [
{
"validCodes": "SUMMER2026",
"type": "percentage",
"value": 0.1
},
{
"validCodes": "SUMMER2027",
"type": "percentage",
"value": 0.05
},
{
"validCodes": "CAMP50",
"type": "fixed",
"value": 50
}
]
}
}
-61
View File
@@ -1,61 +0,0 @@
[
{
"title": "Academics",
"url": "/academics/",
"children": [
{
"title": "Foundations",
"url": "/academics/foundations/",
"children": [],
"programmes": [
{
"title": "Pre-A",
"url": "/academics/foundations/PAF1000/"
},
{
"title": "Pre-U",
"url": "/academics/foundations/PUF1000/"
}
]
},
{
"title": "Undergraduate",
"url": "/academics/undergraduate/",
"children": [],
"programmes": [
]
},
{
"title": "Postgraduate",
"url": "/academics/postgraduate/",
"children": [],
"programmes": [
]
},
{
"title": "Global Education",
"url": "/academics/global-education/",
"children": [
{
"title": "Postgraduate Online",
"url": "/academics/postgraduate-online/",
"children": [],
"programmes": [
{
"title": "Accounting and Finance",
"url": "/academics/postgraduate-online/GE7002/"
},
{
"title": "International Business Law",
"url": "/academics/postgraduate-online/GE7008/"
},
]
}
]
}
]
}
]
-234
View File
@@ -1,234 +0,0 @@
{
"hero": {
"title": "Go and Grow Camp",
"backgroundImage": "/uploads/home/b2.jpg",
"overlayColor": "rgba(0, 0, 0, 0)",
"sectionClass": "uk-section-secondary uk-section-overlap uk-preserve-color uk-light",
"titleClass": "uk-heading-large uk-text-center !text-[5vw]",
"enableScrollspy": true,
"backgroundPosition": "top-center"
},
"sidebarNav": [
{
"id": "general-information",
"label": "General Information"
},
{
"id": "camps",
"label": "Camps"
},
{
"id": "camp-routine",
"label": "Camp Routine"
},
{
"id": "camp-counselors",
"label": "Camp Counselors"
},
{
"id": "camp-rules",
"label": "Camp Rules"
},
{
"id": "safety",
"label": "Safety"
},
{
"id": "accommodation-catering",
"label": "Accommodation & Catering"
},
{
"id": "transfers-shuttles",
"label": "Transfers & Shuttles"
}
],
"contactBox": {
"title": "Let's plan your perfect nature escape",
"phone": {
"icon": "phone",
"text": "+(123)-456-789"
},
"email": {
"icon": "email",
"text": "hello@ggcamp.org"
}
},
"faqSections": [
{
"id": "general-information",
"title": "General Information",
"faqs": [
{
"title": "What are FAQ?",
"description": "FAQ are the initials for \"Frequently Asked Questions\".\n\nThe FAQ have been compiled by us over a long period of time and are intended to help give a general overview of our camps and clarify questions that arise before booking a camp."
},
{
"title": "General booking process",
"description": "Once the booking has been confirmed by us, you will receive an e-mail requesting a deposit. As soon as we have received this, you will receive an e-mail with a payment confirmation.\nPlease have a look at the welcome package, which will reach you by e-mail with the Last Travel Information. This contains information that applies to the camp you have booked.\n\nStep 1: Registration\nStep 2: Receipt of registration confirmation, total invoice and deposit request (e-mail)\nStep 3: Deposit of USD 50 (due within 7 days after booking)\nStep 4: Receiving an email with the latest important travel information, a packing list, addresses and important emergency phone numbers plus remaining payment request about 3-4 weeks before the camp starts."
},
{
"title": "Terms & Conditions",
"description": "Our Terms & Conditions can be found in our official documents section."
},
{
"title": "Where can I find a packing guide for Camps?",
"description": "Just click here to download our packing list."
},
{
"title": "Where can I find contact information from Camps and addresses?",
"description": "Here you can find all the necessary information if you want to drive to our camps or send something. If you want to send something please ALWAYS include the full name of your child on the letter/package and please only send it at the time when your kids are staying in camp as we cannot store it for a longer period of time.\n\nWalsrode/Lüneburger Heide - Germany:\nCamp Adventure, Vethem 58, 29664 Walsrode, Germany\nwalsrode@campadventure.de\n\nRegen/Bavarian Forest - Germany:\nCamp Adventure, Badstrasse 18, 94209 Regen\nregen@campadventure.de\n\nBarcelona - Spain:\nBISC International Sailing Center, c/o Camp Adventure, Parc del Fòrum Sota plaça fotovoltàica, 08930 Sant Adrià de Besòs, Barcelona, Spain\nbarcelona@campadventure.de\n\nBath - England:\nUniversity of Bath, c/o Camp Adventure, Claverton Down, Bath BA2 7AY, England\nengland@campadventure.de\n\nRossall - England:\nRossall School, Broadway, Fleetwood, Lancashire FY7 8JW, England\nengland@campadventure.de"
}
]
},
{
"id": "camps",
"title": "Camps",
"faqs": [
{
"title": "Where do kids and camp counselors come from?",
"description": "Camp Adventure attaches great importance to internationality. The participants and supervisors in our camps come from many different countries. Last year, for example, we had participants from over 60 different countries and counselors from 25 different nations. Of course, we don't know where they will come from this year. So we are at least as excited as you are.\n\nThrough our office in Hamburg and our branch office in Canada, we reach motivated and committed counselors from all over the world. Canadian and Australian teamers can therefore be found as well as German or Spanish teamers.\n\nDue to the different experiences and cultural backgrounds an indescribably fantastic, international atmosphere is created."
},
{
"title": "Which languages are spoken in camp?",
"description": "The main language in all our camps is English. In addition, there is the language of the country in which the camp takes place. As we have our headquarters in Germany, German teamers are always present in all camps in Germany. All announcements and explanations are here therefore always in German and English. Of course, all our teamers with their different nationalities are also available for individual translations."
},
{
"title": "Are there problems if children have low language skills?",
"description": "No, because there are usually more participants and team members who speak the same language. We know from experience that children are excellent at communicating nonverbally. They often need a few days to warm up to it, but are then very open to other children as well."
},
{
"title": "Are girls and boys separated?",
"description": "Girls and boys are accommodated separately in the dormitories/tents. The program is completely mixed."
},
{
"title": "How big are the camps? How high is the caregiver ratio?",
"description": "Capacities range from around 30 participants in smaller language camps to a maximum of about 400 children in our camp Lueneburger Heide. However, the maximum capacity is not reached every week. However, a minimum number of participants must be guaranteed in order to run the camp.\n\nIt is important to us that all children are always grouped in small groups of 5-8, with a counselor as a contact person. This way homesickness doesn't stand a chance and despite the size of the camp in their group family, they experience a strong bond on which they can count on!"
},
{
"title": "Should 12-year-olds go to Junior Camp or Senior Camp?",
"description": "This question is not easy to answer and depends on the individual stage of development of your child. Therefore, as parents, we leave you the opportunity to decide for yourself. In the Junior Camp they belong to the older ones and can explore a lot in a playful way. In the Senior Camp they are the younger ones, who have role models through the older ones, whom they can emulate."
}
]
},
{
"id": "camp-routine",
"title": "Camp Routine",
"faqs": [
{
"title": "How is the choice of activities/courses in the camps made?",
"description": "If your child would like to participate in a paid additional course (e.g. horse riding, language course, Survival etc.), this must be booked in advance when registering. In principle, no extra additional courses have to be booked. A program with a variety of activities is of course available to the participants in all camps. The various activities can be chosen by the participants on site in the respective camps. We present the offers to the participants, so that everyone gets an insight into the different courses. The children can then register in the lists of the respective courses."
},
{
"title": "What is a hike?",
"description": "The hike is a 1-3 day walking tour, in which all participants of the Adventure Camp who stay 2 weeks in the camp take part. On this hike the participants will not spend the night in a tent, but either in the open air or under a self-made shelter e.g. from tarpaulins. They will of course be accompanied by their teamers. The hike is a very special experience and a highlight for all participants. For this hike the participants need sturdy shoes and a big backpack."
},
{
"title": "Can I wash my clothes during the camp?",
"description": "In principle, participants should bring sufficient clothing and change of clothes for the entire camp period.\n\nOnly in the camps in Lüneburger Heide and Bayerischer Wald a laundry service will be offered for kids staying three weeks or more, which means that a laundry bag (approx. 3 kg) will be washed in the laundry centre of the next village at a price of USD 45. This service can be booked upon registration for three-week camps. Please note that the laundry will be done either after one week or after two weeks."
},
{
"title": "Anti Homesick Adviser",
"description": "Dear parents\n\nNow it's almost time: In summer your child travels for the first time with Camp Adventure. Maybe it will be the first time that he travels alone without parents or relatives. As we are getting more and more questions, we have decided to put together a small package for you parents with little tips from experts to make everything as easy as possible for you and your child. Follow our tips and your child will have a fantastic holiday, have many new experiences and make friends from all over the world! All these tips have been developed together with the International Camping Fellowship. And the more you think your child will be a \"homesick candidate\" - or your child even claims to be one - the more you consider the following tips."
}
]
},
{
"id": "camp-counselors",
"title": "Camp Counselors - Our Teamers",
"faqs": [
{
"title": "Who are the camp counselors?",
"description": "Every year our team is made up of an international mix. The non-profit association Camp Europe e.V. with headquarters in Hamburg and a branch office in Canada takes care of the acquisition of national and international applicants. Since we have about 50% German-speaking children, there are also German carers in every location. But many also come from other countries, such as England, Spain, Canada and Australia, to name just a few."
},
{
"title": "How are the teamers trained?",
"description": "All counselors go through an extensive application process. For a successful application, not only an interesting curriculum vitae and a minimum age of 19 years are sufficient! We conduct a personal interview with each individual in which our employees get a first impression of the applicant.\n\nBefore the camp season, everyone, both the first supervisors (teamers) as well as many recomers, complete a one-week training in which they are prepared for their assignment by trained coaches. They must have a first aid certificate, which may not be older than two years, as well as an internationally flawless police clearance certificate. We know how important the teamers are for a great camp and therefore select them very conscientiously."
}
]
},
{
"id": "camp-rules",
"title": "Camp Rules",
"faqs": [
{
"title": "Drugs, Alcohol & Camp?",
"description": "From our point of view an absolutely unacceptable and indiscutable combination! Due to our cooperation with the association \"Keine Macht den Drogen\" (No power to drugs) and our common opinion that all kinds of drugs do not belong in the hands of children & teenagers, any possession or consumption of drugs is forbidden for teenagers and children in the camp and also outside the camp.\n\nViolations can lead to exclusion or even to criminal charges. The term \"drugs\" also includes cigarettes and alcohol! Through our varied activities, we offer a much better alternative! We would like to make it clear from the outset that we are also against any form of discrimination or \"putting down\". This is - just like violence - immediately prevented by us, in order to offer each young person a relaxed and joyful time in the camp."
},
{
"title": "Should I call my kid or write an old-fashioned letter?",
"description": "We ask all parents to write to their child at least once. This is especially useful at the beginning, as it is a particularly upsetting experience for every child and every teenager when most of the participants receive a letter, but they do not.\n\nPlease note that there is NO public \"camp phone\" available for incoming or outgoing calls. If your child doesn't bring her/his own phone, she/he won't be able to call you. In case of any problems, we will of course contact you immediately.\n\nIf your child brings a mobile phone, we will collect it on arrival and store it with the valuables. Your child's Teamer may hand it over during the phone time after lunch. Please keep in mind: no news is good news (the location manager will contact you if it is necessary due to homesickness or illness). We kindly ask you not to call the office in Hamburg to ask about your kid's health and wellbeing, nor if you would like to know why your child hasn't called you yet. Please use our camp email service for such enquiries.\n\nOur recommendation is the following:\nWe recommend not to call your child (even if he or she has a mobile phone with him or her) and not to tell him or her to call you. Telephoning can in our experience promote homesickness very strongly and your child will be cured thereby if completely immersed in camp life! At noon after lunch, if absolutely necessary, your child can pick up his or her mobile phone from the counselors until the start of next program and make phone calls. Instead, you are welcome to bring a pre-stamped and addressed envelope with you. We will then make sure that your child has enough time to write letters. Since letters and postcards often arrive late at the camps, we also offer the e-mail service. You can send your child max. ONE email per day directly to the camp, which we then print out and give to your child. There is no way for them to reply, but your child will be happy to receive a small message from home. You can find the postal and email address in the info package of the booked camp."
},
{
"title": "Are there any prohibited items?",
"description": "Yes, there are. Not allowed are pocket knives with lockable blades, all weapons, lighters and matches (danger of fire in the forest!). Drugs of any kind, including alcohol and cigarettes, are also included."
}
]
},
{
"id": "safety",
"title": "Safety",
"faqs": [
{
"title": "Electronic equipment and valuables",
"description": "We recommend that you do not take an MP3 player, e-book, tablet, etc. or any valuables with you. On the one hand we do not assume any liability and on the other hand there are no possibilities to charge the devices. We are of the opinion that the camp time is a special experience for the participants if they do not have the headphones in their ears all the time or are busy with their mobile phones. Instead they have the chance to deal with other topics and they find time to dedicate themselves to the new people in the camp."
},
{
"title": "How do you provide safety for the kids?",
"description": "Before our camp counselors start working with us, we check their police clearance certificates. You must be at least 19 years old to work for us as a teamer. They must also have a \"First Aid Certificate\", which must not be older than two years. In the camps we try to make sure that only adults from our camp or familiar faces are on the campground and that all our carers look after strangers.\n\nWe have many different camp sites. Some of them are fenced in, others are not. There are no armed guards or the like in our camps, as we believe that these conditions create a very insecure feeling. We do not have a high security zone in Germany, Northern Ireland or England, but we keep our eyes open and do everything we can to ensure that all participants have a great time."
},
{
"title": "Insurance in case of illness?",
"description": "If your child should fall ill during the camp and medical help is required, he or she will of course be taken to the doctor by our carers and cared for there as well. It is therefore necessary for each participant to take their insurance card with them to the camp. We offer all participants the possibility of taking out liability, casualty & health insurance for travel abroad with us. This covers all costs in case of illness and prevents international children in particular from having to \"advance\" their own cash. You can find more detailed information on insurance in our documents section."
}
]
},
{
"id": "accommodation-catering",
"title": "Accommodation & Catering",
"faqs": [
{
"title": "How's the food at the camps?",
"description": "Full board for the entire duration of the camp is of course already included in the camp price. In addition, water and fruit are available for the participants around the clock. For us it is a matter of course to provide one variant for vegetarians and one pork-free with each meal. In case of special allergies or intolerances of your children let us know in advance and we will try to find a solution."
},
{
"title": "How is my child accommodated in the camp?",
"description": "In our Adventure Camp Bayerischer Wald and our Camp Lueneburger Heide, the Juniors (7-12) and the Seniors (12-16) can choose between tents and huts.\n\nThe tents are equipped with a floor and a wooden platform, up to 7 children can share one tent. The participants can make themselves comfortable with sleeping bag and sleeping mat. The wooden huts are equipped with bunk beds and can accommodate 4-8 children. At the other locations, participants will be accommodated in shared rooms in youth hostels, sports centres or boarding schools of private schools. You will find detailed information about the accommodation on the individual camp pages."
}
]
},
{
"id": "transfers-shuttles",
"title": "Transfers & Shuttles",
"faqs": [
{
"title": "Entry regulations/Travel Consent for group flights",
"description": "All parents need to fill this out and bring it to camp:\n\nBelow is a summary of the travel requirements for minors from various EU countries traveling with Camp Adventure on group flights. Please note that regulations can change, so it's essential to consult the official resources provided for the most up-to-date information."
},
{
"title": "Which transfers are offered?",
"description": "The respective transfer possibilities depend on the period and venue of the camp. Check directly on the respective camp page under \"Arrival & Departure Services\"."
},
{
"title": "Where can I find the exact arrival and departure times?",
"description": "Information about the different arrival and departure times can be found on the respective camp page under \"Arrival & Departure Services\"."
},
{
"title": "How do the transfer costs come about?",
"description": "When booking a train or air trip, the indicated price includes the arrival and departure as well as the accompaniment by a supervisor."
},
{
"title": "Where can I find the address/driving directions from the camp?",
"description": "You will receive the exact address and directions of the camp with the Last Travel Information about 3-4 weeks before the camp starts."
}
]
}
],
"video": {
"url": "https://www.youtube.com/embed/3NtE5wSwYTo?list=PLSOedrxa1c-bxvH6uuz_oZdIfJkov66wB&disablekb=1",
"title": "Anti Homesickness Adviser"
}
}
-159
View File
@@ -1,159 +0,0 @@
[
{
"label": "Home",
"slug": "home",
"href": "/",
"type": "internal",
"order": 1,
"isActive": true,
"children": []
},
{
"label": "About Us",
"slug": "about-us",
"href": "/about",
"type": "internal",
"order": 2,
"isActive": true,
"children": []
},
{
"label": "Pages",
"slug": "pages",
"href": "#",
"type": "internal",
"order": 3,
"isActive": true,
"children": [
{
"label": "Services",
"slug": "services",
"href": "/services",
"type": "internal",
"order": 1,
"isActive": true,
"children": [
{
"label": "Service List",
"slug": "service-list",
"href": "/service",
"type": "internal",
"order": 1,
"isActive": true
},
{
"label": "Service Details",
"slug": "service-details",
"href": "/service-details",
"type": "internal",
"order": 2,
"isActive": true
}
]
},
{
"label": "Country List",
"slug": "country-list",
"href": "/country-list",
"type": "internal",
"order": 2,
"isActive": true,
"children": [
{
"label": "Country List",
"slug": "country-list-all",
"href": "/country-list",
"type": "internal",
"order": 1,
"isActive": true
},
{
"label": "Country Details",
"slug": "country-details",
"href": "/country-details",
"type": "internal",
"order": 2,
"isActive": true
}
]
},
{
"label": "Our Pricing",
"slug": "pricing",
"href": "/pricing",
"type": "internal",
"order": 3,
"isActive": true
},
{
"label": "Appointment",
"slug": "appointment",
"href": "/appointment",
"type": "internal",
"order": 4,
"isActive": true
},
{
"label": "FAQ",
"slug": "faq",
"href": "/faq",
"type": "internal",
"order": 5,
"isActive": true
}
]
},
{
"label": "VISA",
"slug": "visa",
"href": "#",
"type": "internal",
"order": 4,
"isActive": true,
"children": [
{
"label": "Visa List",
"slug": "visa-list",
"href": "/visa-list",
"type": "internal",
"order": 1,
"isActive": true
},
{
"label": "Visa Details",
"slug": "visa-details",
"href": "/visa-details",
"type": "internal",
"order": 2,
"isActive": true
}
]
},
{
"label": "Blog",
"slug": "blog",
"href": "/blog",
"type": "internal",
"order": 5,
"isActive": true,
"children": []
},
{
"label": "Contact Us",
"slug": "contact-us",
"href": "/contact",
"type": "internal",
"order": 6,
"isActive": true,
"children": []
},
{
"label": "External Portal",
"slug": "external-portal",
"href": "https://partner.hailearning.edu.vn",
"type": "external",
"order": 7,
"isActive": false,
"children": []
}
]
-75
View File
@@ -1,75 +0,0 @@
{
"hero": {
"title": "Insurance & Travel Cancellation Guarantee",
"subtitle": "Comprehensive coverage for your peace of mind",
"backgroundImage": "/uploads/banner/b13.jpg",
"sectionClass": "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
"backgroundClasses": "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
"overlayStyle": {
"backgroundColor": "rgba(0, 0, 0, 0)"
},
"titleClass": "text-white text-[5vw] uk-text-center",
"subtitleClass": "uk-panel font-[Raleway] italic text-[1.5vw] uk-margin uk-text-center",
"enableScrollspy": true
},
"page": {
"title": "Insurance & Travel Information",
"divider": true,
"sectionClass": "uk-section-default uk-section-overlap uk-section",
"titleClass": "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
"dividerClass": "uk-divider-small uk-text-left@m uk-text-center"
},
"content": {
"sectionClass": "uk-section-muted uk-section-overlap uk-section",
"textClass": "uk-panel uk-margin text-[1vw]",
"content": [
{
"type": "header",
"level": 2,
"text": "Our Go and Grow Camp Insurance Package"
},
{
"type": "paragraph",
"text": "Liability, casualty and health insurance"
},
{
"type": "paragraph",
"text": "<strong>Price:</strong> USD 45 per person/trip"
},
{
"type": "paragraph",
"text": "It only takes one mouse-click to book our comprehensive holiday insurance package for travels abroad, which includes a liability, casualty and health insurance for the entire duration of your journey. This ensures that your child is well insured in the unlikely event of an accident, a doctor's visit, a stay at the hospital or a misfortune causing damage to external property."
},
{
"type": "paragraph",
"text": "The insurance covers the whole duration of the trip, including the days of arrival and departure."
},
{
"type": "paragraph",
"text": "Please note that all participants without an EU insurance card/private health insurance or without a travel insurance package have to be prepared to cover the costs for medical treatment themselves. Go and Grow Camp does not provide any advance payment for doctor's bills. Non EU residents who do not book our insurance package have to submit a confirmation of their travel insurance."
},
{
"type": "header",
"level": 2,
"text": "Go and Grow Camp Travel Cancellation Guarantee"
},
{
"type": "paragraph",
"text": "It only takes one mouse-click to book our comprehensive holiday insurance package for travels abroad, which includes a liability, casualty and health insurance for the entire duration of your journey. This ensures that your child is well insured in the unlikely event of an accident, a doctor's visit, a stay at the hospital or a misfortune causing damage to external property."
},
{
"type": "paragraph",
"text": "The insurance covers the whole duration of the trip, including the days of arrival and departure."
},
{
"type": "paragraph",
"text": "Please note that all participants without an EU insurance card/private health insurance or without a travel insurance package have to be prepared to cover the costs for medical treatment themselves. Go and Grow Camp does not provide any advance payment for doctor's bills. Non EU residents who do not book our insurance package have to submit a confirmation of their travel insurance."
},
{
"type": "header",
"level": 2,
"text": "Go and Grow Camp - Cooperations & Memberships"
}
]
}
}
-100
View File
@@ -1,100 +0,0 @@
{
"menus": [
{
"menuid": "info",
"parent": null,
"title": "Info",
"url": "#",
"order": 0,
"type": "static"
},
{
"menuid": "info-about-us",
"parent": "info",
"title": "About us",
"url": "/info/about-us",
"order": 0,
"type": "page"
},
{
"menuid": "info-safety",
"parent": "info",
"title": "Safety",
"url": "/info/safety",
"order": 1,
"type": "page"
},
{
"menuid": "info-faq",
"parent": "info",
"title": "FAQ",
"url": "/info/faq",
"order": 2,
"type": "page"
},
{
"menuid": "info-terms-conditions",
"parent": "info",
"title": "Terms & Conditions",
"url": "/info/terms-conditions",
"order": 3,
"type": "page"
},
{
"menuid": "info-insurance",
"parent": "info",
"title": "Insurance",
"url": "/info/insurance",
"order": 4,
"type": "page"
},
{
"menuid": "info-travel-documents",
"parent": "info",
"title": "Travel Documents",
"url": "/info/travel-documents",
"order": 5,
"type": "page"
},
{
"menuid": "camp-locations",
"parent": null,
"title": "Camp Locations",
"url": "/destinations",
"order": 1,
"type": "static"
},
{
"menuid": "activities",
"parent": null,
"title": "Activities",
"url": "/activities",
"order": 2,
"type": "static"
},
{
"menuid": "blog",
"parent": null,
"title": "Blog",
"url": "/blog",
"order": 3,
"type": "static"
},
{
"menuid": "contact-us",
"parent": null,
"title": "Contact US",
"url": "/contact-us",
"order": 4,
"type": "static"
},
{
"menuid": "booking",
"parent": null,
"title": "Booking",
"url": "/booking",
"order": 5,
"type": "static"
}
]
}
-118
View File
@@ -1,118 +0,0 @@
{
"hero": {
"title": "Pricing Plan",
"backgroundImage": "/assets/img/inner-page/breadcrumb.jpg",
"shapeImage": "/assets/img/inner-page/shape.png",
"breadcrumb": [
{
"text": "Home",
"link": "/"
},
{
"text": "Pricing Plan",
"link": ""
}
]
},
"pricingSection": {
"subtitle": "pricing plan",
"heading": "Flexible Plans to Suit Every Traveler",
"description": "Choose the plan that fits your visa needs and enjoy expert guidance every step of the way."
},
"plans": {
"monthly": [
{
"name": "Basic Plan",
"price": "32",
"period": "mo",
"currency": "$",
"buttonText": "Get Started Today",
"buttonLink": "/pricing",
"buttonIcon": "fa-solid fa-arrow-right",
"style": "default",
"features": [
"Everything in Basic Plan",
"Visa Interview Preparation",
"Priority Processing Support",
"Phone & Email Assistance",
"Step-by-Step Application Support"
]
},
{
"name": "Premium Plan",
"price": "32",
"period": "mo",
"currency": "$",
"buttonText": "Get Started Today",
"buttonLink": "/pricing",
"buttonIcon": "fa-solid fa-arrow-right",
"style": "style-2",
"features": [
"Everything in Basic Plan",
"Visa Interview Preparation",
"Priority Processing Support",
"Phone & Email Assistance",
"Step-by-Step Application Support"
]
}
],
"yearly": [
{
"name": "Basic Plan",
"price": "32",
"period": "mo",
"currency": "$",
"buttonText": "Get Started Today",
"buttonLink": "/pricing",
"buttonIcon": "fa-solid fa-arrow-right",
"style": "default",
"features": [
"Everything in Basic Plan",
"Visa Interview Preparation",
"Priority Processing Support",
"Phone & Email Assistance",
"Step-by-Step Application Support"
]
},
{
"name": "Premium Plan",
"price": "32",
"period": "mo",
"currency": "$",
"buttonText": "Get Started Today",
"buttonLink": "/pricing",
"buttonIcon": "fa-solid fa-arrow-right",
"style": "style-2",
"features": [
"Everything in Basic Plan",
"Visa Interview Preparation",
"Priority Processing Support",
"Phone & Email Assistance",
"Step-by-Step Application Support"
]
}
]
},
"testimonials": {
"subtitle": "What Our Clients Say",
"heading": "Immigration Success Stories",
"buttonText": "View All Review",
"buttonLink": "/contact",
"buttonIcon": "fa-solid fa-arrow-right",
"image": "/assets/img/home-3/test-thumb.jpg",
"items": [
{
"name": "Mohammed Ali",
"role": "Family Visa",
"rating": 5,
"content": "The team provided exceptional guidance throughout my immigration process. Their expertise, personalized support, and attention to detail ensured a smooth, stress-free experience and successful visa approval."
},
{
"name": "Mohammed Ali",
"role": "Family Visa",
"rating": 5,
"content": "The team provided exceptional guidance throughout my immigration process. Their expertise, personalized support, and attention to detail ensured a smooth, stress-free experience and successful visa approval."
}
]
}
}
-212
View File
@@ -1,212 +0,0 @@
{
"hero": {
"title": "Safety",
"banner": "/uploads/banner/b13.jpg"
},
"approach":{
"badge": "OUR APPROACH",
"title": "Learning, Comfort, and Confidence in Every Step",
"description": "Our camp philosophy ensures that every experience is exciting, engaging, and safe. We combine the thrill of outdoor exploration with a secure, well-managed environment where campers can grow, connect, and enjoy every moment.",
"imgs":
{
"img1": "/uploads/safety/pic1.jpg",
"img2": "/uploads/safety/pic2.jpg"
},
"stats":{
"count": "1,200+",
"label": "Happy Glampers Hosted",
"avatars": [
"https://i.pravatar.cc/100?img=1",
"https://i.pravatar.cc/100?img=5",
"https://i.pravatar.cc/100?img=8"
]
},
"features":[
{
"text":"Community built on trust and respect"
},
{
"text":"Shared responsibility for a safe environment"
},
{
"text":"Zero tolerance for discrimination or abuse"
},
{
"text":"Staff trained and supervised around the clock"
}
],
"cards":[
{
"title":"Camp Protection",
"content":"Comprehensive measures ensure every camper is safe, including trained staff, strict supervision, and clear emergency protocols throughout their stay."
},
{
"title":"Peace of Mind",
"content":"Parents and campers can feel confident knowing that safety, well-being, and support are prioritized at all times."
}
]
},
"philosophy":{
"title":"Go and Grow Camp",
"subtitle":"Our Philosophy",
"cards":[
{
"title":"Community",
"content":"What is most important for us at camp is the community. We want everyone participants, teamers and camp directors, no matter from which country or what culture to have an unforgettable time and every single one of us helps to reach this goal.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Responsibility",
"content":"We want everyone to help shape the daily life at camp. Besides playing this of course also includes social coexistence. Together with us your children keep the camp clean. This means cleaning the dishes and wiping the tables after a meals, as well as keeping the camp and sanitary facilities clean and tidying up the tents and huts together. All this of course, in a manner appropriate to the age of your children. This is how we, in shared responsibility, make everybody feel comfortable.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Internationality",
"content":"At camp new friendships arise even though some campers live thousands of kilometers apart. Our experienced campers immediately include newcomers because this is what they love camp for they come to make new friends and meet their fellow camp mates again. After our camp season many parents tell us about mutual visits some went to France, Spain or Canada. They also tell us about the increased motivation of their children to pay a little more attention to the language lessons at school so conversations at camp next summer become easier.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Log off, get outside",
"content":"We want all campers to have a relaxed holiday. Mobile phones are especially counterproductive to reach this goal. Therefore, our camps are mobile-free zones and we would like your children to hand over their phones and all other electronic devices to our teamers on the day of arrival so they can really relax. This also means that your children cannot be reached by phone outside the daily telephone hour which is after lunch.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"No power to drugs",
"content":"For legal reasons, as a result of our cooperation with the organization 'No power to drugs' and by our conviction that drugs don't belong into the hands of children and young adults, it is strictly forbidden for all campers to possess or consume any kind of drugs including cigarettes and alcoholic drinks. Non-compliance with this rule will lead to the suspension from camp or even criminal charges. It is our belief that with all our activities and the great atmosphere at camp, we offer much better alternatives anyway!",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Dealing with discrimination",
"content":"We would like to point out that we do not accept any form of discrimination, bullying or violence so that all campers can enjoy a happy, relaxed and safe holiday at camp.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
}
]
},
"security":{
"title":"Go and Grow Camp",
"subtitle":"Security Concept",
"cards":[
{
"title":"Background Check",
"content":"Every counselor, chef, teamer or helper that enters our camps has to be registrated, complete a background check, as well as have references. That's why parents are only allowed on the camp site on the day of arrival and departure and not during the week. We want to make sure that we have checked and know every adult who is with us at camp.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Education",
"content":"Each counselor must complete an almost two-week training course with us, from early in the morning until late in the evening includes so many lessons that the number of hours even corresponds to the basic study in educational sciences. Here we focus on the areas of safety, accident prevention, child psychology and needs as well as the various safety aspects in the field of experiential education.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Crisis Intervention",
"content":"If something should happen, it is not only important to provide first aid for the affected person, but also to care for the other children and adolescents. We have a specially trained team for crisis intervention, which then provides immediate care and can thus prevent possible traumatisation due to the experience.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Nightwatch",
"content":"All our camps are also supervised at night by the counselors/teamers. On the one hand we want to prevent visitors from coming to the site - which has not happened until today - and on the other hand we want to be there for the children if they wake up at night and get homesick or have to go to the toilet. The nightwatch patrols the area and is otherwise reachable at a central place for the children. Some of our locations - e.g. the headquarters in Walsrode - are also video-monitored and fenced in.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Caregiver Key",
"content":"No safety without sufficient staff! We are the leaders in Germany with our great caregiver key. There are no camps that have a key worse than 1:6-1:8, which means that one caregiver is responsible for a maximum of 6-8 children. In the junior camps we also use our CIT (Counselor in Training), so that we often reach a key of only 1:4. We know that this key can seem exaggerated, but we want to guarantee the highest possible safety and we firmly believe that this is exactly what our high level of caregiver commitment leads to.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Cooperation",
"content":"Cooperation with the independent representative for questions of sexual child abuse via our umbrella organisation Reisenetz e.V.: Go and Grow Camp was one of the first tour operators for children and young people to develop a protection concept that prevents sexual abuse among children and young people. Today, this concept is considered important by many other tour operators, also due to our personal commitment in various associations and professional circles. Of course, the background check and the '6-eyes principle', which states that a child must never be alone with a caregiver, is also an essential part of our protection concept. The most important thing, however, is to create an 'open system' in which everyone knows that sexual abuse should not be a taboo subject, but that simple instruments such as a grievance box and feedback system can immediately address grievances and that they do not have to be denied.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Quality",
"content":"As a member of the quality committee of the professional association for children and youth travel 'Reisenetz', our managing director Jan Vieth is responsible for further developing and checking the quality guidelines of the entire industry. As Germany's ambassador to the ICF, he is also kept up to date on improvements in camp and training quality worldwide and adapts these as quickly as possible to our own camps.",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"Accessibility",
"content":"Of course, all parents receive a number from us, which allows them to reach us 24 hours a day in an emergency. If an emergency occurs at your home, you can inform us immediately and we can decide together how, when and whether to inform your child",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
},
{
"title":"In case of emergency",
"content":"Every caregiver has a valid first aid certificate and can help if necessary",
"author":{
"avt":"https://i.pravatar.cc/150?img=12",
"name":"abc",
"role":"customer",
"rating":"5"
}
}
]
}
}
-363
View File
@@ -1,363 +0,0 @@
{
"pageTitle": "Visaway Immigration & Visa Consulting HTML Template",
"services": {
"title": {
"subTitle": "What We Offer",
"mainTitle": "Our Immigration Services"
},
"items": [
{
"slug": "immigration-appeal",
"name": "Immigration Appeal & Legal Support",
"description": "Our experts provide professional guidance for immigration appeals and legal matters, helping clients overcome visa rejections with personalized strategies and strong case representation.",
"image": "/img/home-3/service/01.jpg",
"layout": "left",
"details": {
"title": "Immigration Appeal & Legal Support",
"description": "Our experts provide professional guidance for immigration appeals and legal matters, helping clients overcome visa rejections with personalized strategies and strong case representation. We analyze your case thoroughly and develop custom strategies to maximize your chances of success.",
"mainImage": "/img/inner-page/service-details/details-1.jpg",
"overviewTitle": "Service Overview",
"overviewDescription": "Our Immigration Appeal & Legal Support service is designed to help clients navigate complex immigration challenges. We provide expert legal guidance, case analysis, and strategic representation to maximize your chances of success. With our expert consultants, personalized approach, and global network, we ensure a smooth transition for every client.",
"additionalDescription": "From start to finish, we are committed to turning your immigration challenges into success stories through professional legal representation and strategic planning.",
"keyFeaturesTitle": "Key Features",
"keyFeaturesImage": "/img/inner-page/service-details/details-2.jpg",
"features": [
{
"title": "Personalized Guidance",
"description": "Tailored support for each client's specific legal situation and requirements."
},
{
"title": "Expert Legal Team",
"description": "Experienced immigration lawyers with proven track records in appeals."
},
{
"title": "Case Analysis & Strategy",
"description": "Thorough case review and development of winning appeal strategies."
},
{
"title": "Document Preparation",
"description": "Professional preparation of all legal documents and supporting evidence."
},
{
"title": "Court Representation",
"description": "Expert representation in immigration courts and tribunals."
},
{
"title": "Success Monitoring",
"description": "Regular updates and monitoring throughout the appeal process."
}
],
"faqTitle": "Frequently Asked Question",
"faqImage": "/img/inner-page/service-details/details-3.jpg",
"faq": [
{
"id": "faq-appeal-1",
"question": "01. What are the chances of a successful appeal?",
"answer": "Success rates vary by case type and circumstances, but our experienced legal team significantly improves your chances through thorough case analysis and strategic representation tailored to your specific situation.",
"isExpanded": false
},
{
"id": "faq-appeal-2",
"question": "02. How long does the appeal process take?",
"answer": "Appeal timelines vary by jurisdiction and case complexity, typically ranging from 6-18 months. We keep you informed throughout the process and work to expedite where possible.",
"isExpanded": false
},
{
"id": "faq-appeal-3",
"question": "03. What documents do I need for an appeal?",
"answer": "Required documents vary by case but typically include the original decision, supporting evidence, and legal submissions. We provide a comprehensive checklist and assist with document preparation.",
"isExpanded": false
},
{
"id": "faq-appeal-4",
"question": "04. Do you handle all types of immigration appeals?",
"answer": "Yes, we handle various types of immigration appeals including visa refusals, deportation orders, and residency rejections. Our team has expertise across all immigration categories.",
"isExpanded": false
}
]
}
},
{
"slug": "scholarship-guidance",
"name": "Scholarship & Study Grant Guidance",
"description": "We help students unlock opportunities to study abroad with the right financial support. Our expert advisors guide you in finding scholarships, grants, and funding options that match your academic background, chosen destination, and career goals.",
"image": "/img/home-3/service/02.jpg",
"layout": "right",
"details": {
"title": "Scholarship & Study Grant Guidance",
"description": "We help students unlock opportunities to study abroad with the right financial support. Our expert advisors guide you in finding scholarships, grants, and funding options that match your academic background, chosen destination, and career goals. From preparing strong applications to meeting eligibility criteria, we ensure you maximize your chances of securing financial aid.",
"mainImage": "/img/inner-page/service-details/details-1.jpg",
"overviewTitle": "Service Overview",
"overviewDescription": "Our Education Visa Consultancy is dedicated to guiding students in achieving their study abroad dreams. We provide complete support including university selection, application assistance, scholarship guidance, visa documentation, and interview preparation. With our expert consultants, personalized approach, and global network, we ensure a smooth transition for every student.",
"additionalDescription": "From start to finish, we are committed to turning your education journey into a successful international experience.",
"keyFeaturesTitle": "Key Features",
"keyFeaturesImage": "/img/inner-page/service-details/details-2.jpg",
"features": [
{
"title": "Personalized Guidance",
"description": "Tailored support for each student's goals and requirements."
},
{
"title": "Target Audience & Persona Development",
"description": "Experienced team with global education and visa knowledge."
},
{
"title": "Scholarship & Grant Assistance",
"description": "Helping students secure financial aid opportunities."
},
{
"title": "Visa Application Support",
"description": "Step-by-step guidance for smooth visa processing."
},
{
"title": "Interview Preparation",
"description": "Coaching for successful student visa interviews."
},
{
"title": "Documentation Assistance",
"description": "Accurate and complete paperwork for faster approvals."
}
],
"faqTitle": "Frequently Asked Question",
"faqImage": "/img/inner-page/service-details/details-3.jpg",
"faq": [
{
"id": "faq-scholarship-1",
"question": "01. Do you assist with university selection?",
"answer": "Absolutely! We identify suitable scholarships, guide application processes, and maximize your chances of receiving financial aid.",
"isExpanded": false
},
{
"id": "faq-scholarship-2",
"question": "02. Can you help with scholarship applications?",
"answer": "Absolutely! We identify suitable scholarships, guide application processes, and maximize your chances of receiving financial aid.",
"isExpanded": true
},
{
"id": "faq-scholarship-3",
"question": "03. How long does the visa process take?",
"answer": "Absolutely! We identify suitable scholarships, guide application processes, and maximize your chances of receiving financial aid.",
"isExpanded": false
},
{
"id": "faq-scholarship-4",
"question": "04. Is post-arrival support available?",
"answer": "Absolutely! We identify suitable scholarships, guide application processes, and maximize your chances of receiving financial aid.",
"isExpanded": false
}
]
}
},
{
"slug": "permanent-residency",
"name": "Permanent Residency (PR) Services",
"description": "Our PR services guide clients through every step of the residency process, including documentation, eligibility assessment, and application support, ensuring a smooth and successful approval.",
"image": "/img/home-3/service/03.jpg",
"layout": "left",
"details": {
"title": "Permanent Residency (PR) Services",
"description": "Our PR services guide clients through every step of the residency process, including documentation, eligibility assessment, and application support, ensuring a smooth and successful approval.",
"mainImage": "/img/inner-page/service-details/details-1.jpg",
"overviewTitle": "Service Overview",
"overviewDescription": "Our Permanent Residency services provide comprehensive support for individuals seeking to establish permanent residence in their chosen country. We handle all aspects of the PR application process with expertise and care.",
"additionalDescription": "Our experienced team ensures that your PR application is handled professionally and efficiently, maximizing your chances of approval.",
"keyFeaturesTitle": "Key Features",
"keyFeaturesImage": "/img/inner-page/service-details/details-2.jpg",
"features": [
{
"title": "Eligibility Assessment",
"description": "Comprehensive evaluation of your PR eligibility and options."
},
{
"title": "Points Calculation",
"description": "Accurate calculation and optimization of your points score."
},
{
"title": "Document Verification",
"description": "Thorough verification and preparation of all required documents."
},
{
"title": "Application Tracking",
"description": "Regular updates and tracking of your PR application status."
},
{
"title": "Interview Preparation",
"description": "Coaching and preparation for PR interviews if required."
},
{
"title": "Post-Approval Support",
"description": "Guidance on next steps after PR approval and settlement."
}
],
"faqTitle": "Frequently Asked Question",
"faqImage": "/img/inner-page/service-details/details-3.jpg",
"faq": [
{
"id": "faq-pr-1",
"question": "01. How long does the PR process take?",
"answer": "Processing times vary by country and program, typically ranging from 12-24 months. We provide realistic timelines based on current processing standards.",
"isExpanded": false
},
{
"id": "faq-pr-2",
"question": "02. What documents are required for PR application?",
"answer": "Document requirements vary by country but typically include educational credentials, work experience, language test results, and medical examinations. We provide a complete checklist.",
"isExpanded": true
},
{
"id": "faq-pr-3",
"question": "03. Can I include my family in the PR application?",
"answer": "Yes, most PR programs allow you to include your spouse and dependent children. We help you understand family inclusion requirements and processes.",
"isExpanded": false
},
{
"id": "faq-pr-4",
"question": "04. What happens if my PR application is rejected?",
"answer": "If rejected, we analyze the reasons and explore options including appeals, reapplication, or alternative immigration pathways to achieve your goals.",
"isExpanded": false
}
]
}
},
{
"slug": "citizenship-naturalization",
"name": "Citizenship & Naturalization Guidance",
"description": "We provide expert guidance for citizenship and naturalization processes, assisting clients with documentation, eligibility, and legal procedures to achieve a smooth and successful application.",
"image": "/img/home-3/service/04.jpg",
"layout": "right",
"details": {
"title": "Citizenship & Naturalization Guidance",
"description": "We provide expert guidance for citizenship and naturalization processes, assisting clients with documentation, eligibility, and legal procedures to achieve a smooth and successful application.",
"mainImage": "/img/inner-page/service-details/details-1.jpg",
"overviewTitle": "Service Overview",
"overviewDescription": "Our Citizenship & Naturalization service helps individuals navigate the complex process of becoming a citizen. We provide step-by-step guidance, documentation support, and legal expertise throughout the entire process.",
"additionalDescription": "With our comprehensive approach, we make the path to citizenship clear, manageable, and successful for every client.",
"keyFeaturesTitle": "Key Features",
"keyFeaturesImage": "/img/inner-page/service-details/details-2.jpg",
"features": [
{
"title": "Citizenship Test Preparation",
"description": "Comprehensive preparation for citizenship knowledge tests."
},
{
"title": "Language Requirements",
"description": "Guidance on meeting language proficiency requirements."
},
{
"title": "Residency Verification",
"description": "Assistance with proving residency and physical presence requirements."
},
{
"title": "Application Processing",
"description": "Complete support throughout the citizenship application process."
},
{
"title": "Interview Coaching",
"description": "Preparation and coaching for citizenship interviews."
},
{
"title": "Ceremony Preparation",
"description": "Support and guidance for the citizenship ceremony process."
}
],
"faqTitle": "Frequently Asked Question",
"faqImage": "/img/inner-page/service-details/details-3.jpg",
"faq": [
{
"id": "faq-citizenship-1",
"question": "What are the basic requirements for citizenship?",
"answer": "Requirements typically include permanent residency, physical presence, language proficiency, and knowledge of the country's history and government. Specific requirements vary by country.",
"isExpanded": false
},
{
"id": "faq-citizenship-2",
"question": "How do I prepare for the citizenship test?",
"answer": "We provide comprehensive study materials, practice tests, and coaching sessions to help you prepare for both the knowledge test and language requirements.",
"isExpanded": false
},
{
"id": "faq-citizenship-3",
"question": "How long does the citizenship process take?",
"answer": "Processing times vary by country but typically range from 12-24 months from application to ceremony. We help you understand specific timelines for your situation.",
"isExpanded": false
},
{
"id": "faq-citizenship-4",
"question": "Can I maintain dual citizenship?",
"answer": "Dual citizenship policies vary by country. We help you understand the implications and requirements for maintaining multiple citizenships if applicable.",
"isExpanded": false
}
]
}
}
]
},
"destinations": {
"backgroundImage": "/img/home-3/choose-us/bg.png",
"title": {
"subTitle": "Countries we offer",
"mainTitle": "Choose Your Immigration Destination"
}
},
"visas": {
"items": [
{
"id": "family-visa",
"number": "01",
"name": "Family Visa",
"description": "Our Family Visa services help reunite loved ones by providing expert guidance.",
"buttonText": "service _ 02",
"buttonLink": "service-details.html"
},
{
"id": "student-visa",
"number": "02",
"name": "Student Visa",
"description": "We provide expert guidance for student visa applications.",
"buttonText": "service _ 02",
"buttonLink": "service-details.html"
},
{
"id": "work-visa",
"number": "03",
"name": "Work Visa",
"description": "Collaboratively disintermediate one to one functionalities and long term.",
"buttonText": "service _ 02",
"buttonLink": "service-details.html"
}
]
},
"reviews": {
"title": {
"subTitle": "What Our Clients Say",
"mainTitle": "Immigration Success Stories"
},
"thumb": "/img/home-3/test-thumb.jpg",
"items": [
{
"id": "client-review-1",
"rating": 5,
"content": "The team provided exceptional guidance throughout my immigration process.",
"author": {
"name": "Mohammed Ali,",
"type": "Family Visa"
},
"icon": "fa-solid fa-quote-right"
},
{
"id": "client-review-2",
"rating": 5,
"content": "Their expertise and personalized support ensured a smooth visa approval.",
"author": {
"name": "Sarah Johnson,",
"type": "Student Visa"
},
"icon": "fa-solid fa-quote-right"
}
]
}
}
-152
View File
@@ -1,152 +0,0 @@
{
"hero": {
"title": "Frequently Asked Questions",
"backgroundImage": "/uploads/terms/faqimage.jpg",
"sectionClass": "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
"backgroundClasses": "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
"overlayStyle": {
"backgroundColor": "rgba(0, 0, 0, 0)"
},
"titleClass": "text-white text-[5vw] uk-text-center",
"enableScrollspy": true
},
"page": {
"title": "Terms & Conditions Go and Grow Camp e.K.",
"divider": true,
"sectionClass": "uk-section-default uk-section-overlap uk-section",
"titleClass": "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
"dividerClass": "uk-divider-small uk-text-left@m uk-text-center"
},
"content": {
"sectionClass": "uk-section-muted uk-section-overlap uk-section",
"textClass": "uk-panel uk-margin text-[1vw]",
"content": [
{
"type": "paragraph",
"text": "This is an English translation of the original and legally binding German document \"Allgemeine Geschäftsbedingungen Go and Grow Camp e.K.\", which can be viewed at <a href=\"https://www.campadventure.de/de/infos/agb\" target=\"_self\">https://www.campadventure.de/de/infos/agb</a>. This translation is for your information only and is not legally binding."
},
{
"type": "paragraph",
"text": "<strong>Go and Grow Camp e.K. is the tour operator for individuals, for camps in Germany, England and Northern Ireland.</strong>"
},
{
"type": "paragraph",
"text": "GUARANTEE: All participants are protected in accordance with the legal regulations governing tour operators in Germany. As per §651, any payments made towards the travel price are insured against insolvency by tourVers."
},
{
"type": "paragraph",
"text": "The following terms and conditions of travel apply to package travel contracts, to which the §§ 651a ff BGB regulations relating to travel contracts apply. The provisions, in so far as these have been effectively agreed, become part of the contract formed between the traveler and tour operator. They supplement and complete the legal regulations of §§ 651 a to y BGB and Articles 250 und 252 EGBGB."
},
{
"type": "section",
"title": "1. Conclusion of the travel contract",
"content": "By registering for travel, the traveler submits a binding offer to conclude the travel agreement. Registrations can be made verbally, by telephone, in writing, by email or by electronic means, such as the internet booking system \"Book a Camp\". The contract comes into effect once a declaration of acceptance has been received. The tour operator will provide the traveler with a booking confirmation in line with legal requirements in a durable medium, unless the traveler is entitled to a travel confirmation in paper form under Article 250 § 6 Paragraph 1 Clause 2 EGBG. If the registration is made electronically, the contract is concluded once the traveler has received confirmation from the tour operator in a durable medium. If the corresponding travel confirmation is displayed directly after using the \"place a binding order\" button, the contract comes into effect upon display of this confirmation. The traveler will receive travel documents 2-3 weeks before the start of the trip. Any additional agreements, arrangements and wishes must be confirmed by us in writing, otherwise the services laid out in the contract apply. The traveler is liable for all contractual obligations of travelers that he registers, just as he is for his own, provided that he has assumed this obligation through an explicit and separate declaration. Should the contents of the booking confirmation deviate from the content of the booking, this constitutes a new offer, to which the tour operator is bound for a period of 10 days. The contract takes effect on the basis of this new offer, provided that the tour operator has indicated the changes relating to this new offer and has fulfilled his precontractual information duties and that the traveler gives the tour operator express consent, either through explicit declaration or deposit, within the commitment period. Pursuant to the legal regulation § 312 g Para. 2, Clause 1 Nr. 9 BGB and relating to all of the above-mentioned booking types, no right of withdrawal exists for distance contracts after contract conclusion. However, withdrawal from the contract on the basis of § 651 h BGB is possible at any time."
},
{
"type": "section",
"title": "2. Terms of payment",
"content": "Go and Grow Camp e.K. shall only request or accept payments towards the travel price before the completion of the trip if the traveler has been provided with a guarantee certificate, stating the name and contact details of the credit institution, in accordance with § 651 r Abs. 4 BGB. A deposit of USD 50 per participant is due within one week of registration and after the issue of a guarantee certificate. The outstanding balance must be transferred, without specific request, no later than four weeks before the start of the trip, provided that the guarantee certificate has been issued and that the tour operator has not exercised its right of withdrawal on the grounds stated in Point 7. If, even after notification, the specified deposit sum is not payed, or the travel price has not been paid in full, prior to the commencement of the trip, although the tour operator is ready to provide the contractual services, has fulfilled all legal obligations and the client has no legal or contractual right of retention, the tour operator is entitled to withdraw from the travel contract after issuing a reminder with a deadline and to charge cancellation fees to the traveler."
},
{
"type": "section",
"title": "3. Services and service modifications",
"content": "a) Our services are defined in our service descriptions and general program information found on the website <a href=\"/\" target=\"_self\">https://www.campadventure.de/en/</a> and in the information given in the travel confirmation. Any additional agreements affecting the scope of the contractual services must be confirmed by us in written form.<br/>b) Luggage will be transported without any additional fee, as long as it does not exceed the norms, here defined as a maximum of 1 suitcase and 1 piece of hand luggage per person.<br/>c) External services arranged by us as part of the journey are not part of the initial travel contract, as long as these services are clearly marked as such with the identity and address of the contractual partner in the travel information and travel confirmation, such that the traveler can recognize that these are not part of the travel services offered by the tour operator.<br/>d) Any modifications to and deviations from the essential travel services agreed upon in the travel contract that become necessary after conclusion of the contract and are made in good faith, are permissible as long as the modifications and deviations are not substantial and do not impact the overall arrangement of the booked trip.<br/>e) The tour operator is obliged to inform the traveler of the reasons for a permissible modification to the essential travel service immediately, clearly, understandably and in a durable medium.<br/>f) In the event of a substantial change to an essential travel service or a deviation from special provisions stipulated in the contract for a traveler, the traveler is entitled to withdraw from the contract or demand another journey of at least equivalent value by the deadline specified at the same time as the contract change. This only applies if the tour operator is in a position to offer such a trip without any extra cost to the traveler. The traveler is free to decide whether to respond to the communication or not. The traveler is obliged to exercise these rights after being notified of the change. If the traveler does not respond by the specified deadline or at all, the communicated changes will be understood to be accepted. Any warranty claims remain unaffected, in so far as the modified services are deficient."
},
{
"type": "section",
"title": "4. Customer cancellation",
"content": "The traveler is advised to communicate cancellation in a durable medium. Should the traveler withdraw from the travel contract before the start of the trip, or should he not begin the trip, the tour operator may claim fair compensation, provided it is not responsible for the withdrawal and that no exceptional circumstances have arisen at the destination or in the immediate vicinity, which have a significant effect on the execution of the trip or the transportation of persons to the destination. The compensation value is based on the travel price less the value of the costs saved by the tour operator and the sum that the tour operator is able to earn through alternative use of its services. The standard rates are based on the time period between the notice of cancellation and the start of the trip, as well as the expected saved expenses and the possible sum resulting from any other use of travel services. Upon receipt of notice of cancellation, compensation is calculated according to a sliding percentage scale, as follows (cancellation costs per person):",
"subsections": [
{
"type": "cancellation_table",
"title": "Standard Cancellation Fees",
"items": [
"cancellation up to 60 days before the beginning of the trip USD 50/100",
"cancellation up to 31 days before the beginning of the trip 30% of travel costs, USD 50 minimum",
"cancellation up to 14 days before the beginning of the trip 50% of travel costs, USD 50 minimum",
"cancellation up to 1 day before the beginning of the trip 80% of travel costs, USD 50 minimum",
"cancellation on the day of arrival or later 90% of travel costs"
]
},
{
"type": "cancellation_section",
"title": "Cancellation policy for school groups:",
"items": [
"A correction of student numbers up to 10% students is free of charge. Any higher alteration of numbers will lead to an extra cost.",
"Cancellation till 60 days before start of the trip: the fee will be 20% of the total price.",
"Cancellation till 30 days before start of the trip: the fee will be 40% of the total price.",
"Cancellation till 14 days before start of the trip: the fee will be 60% of the total price.",
"Cancellation till 1 day before start of the trip: the fee will be 90% of the total price.",
"Any later cancellations till the day before the trip: the fee will be 100% of the total price."
]
},
{
"type": "note",
"text": "In any event, it is up to the customer to demonstrate that compensation owed to the tour operator is significantly lower that the cancellation fee claimed. The tour operator reserves the right, by way of deviation from the above charges, to claim a higher, individually calculated compensation sum, insofar as it can prove that significantly greater expenses than the relevant flat rate were incurred. In this case, the tour operator is required to calculate and prove these extra costs, taking into account the costs saved by the tour operator and the sum that the tour operator is able to earn through alternative use of the services. Following cancellation, the tour operator is obliged to issue a refund immediately, but in any case within 14 days of receipt of the notice of cancellation. § 651 e BGB remains unaffected by the above conditions. It is recommended that travelers take out cancellation insurance."
}
]
},
{
"type": "section",
"title": "5. Modifications at the traveler's request",
"content": "After conclusion of the contract the traveler may not change travel dates, the destination, starting location, accommodation or mode of transport. This does not apply if the change to the booking is necessary because the tour operator provided the traveler due to inadequate or false precontractual information provided by the tour operator, as per Art. 250 § 3 EGBGB. In this case, travel may be rebooked at no extra cost. Should the traveler demand changes or rebooking after conclusion of the contract, up to 32 days before departure, the tour operator is entitled to charge a processing fee of USD 20, unless the tour operator demonstrates that higher compensation is due, the sum of which is based on the travel price minus the costs saved by the tour operator and the sum that the tour operator is able to earn through alternative use of its services. Requests to change bookings after this period can only be honored, if at all, by withdrawing from the travel contract and simultaneously reregistering, as per Section 4. This does not apply to requests only resulting in minor additional costs."
},
{
"type": "section",
"title": "6. Disruption by the traveler",
"content": "If the traveler continuously disrupts the travel program, despite warnings from the tour operator, or behaves contrary to the contract, such that immediate termination of the contract is justified, the tour operator may cancel the travel contract without notification. This also applies when the traveler does not consider reasonable and well-founded instructions. In such cases, the tour operator is entitled to retain the full travel price, minus the costs saved by the tour operator and the sum that the tour operator is able to earn through alternative use of the unused service, including any sums credited to it by service providers, so the daily rate can be reduced by 20% as a result of savings made by services not provided. Compensation claims remain unaffected. This shall not apply if such behavior contrary to the terms of the contract is a result of a breach of information duties on the part of the tour operator."
},
{
"type": "section",
"title": "7. Minimum number of participants",
"content": "If the number of participants registered for our holiday camps our transfer services is less than 10-60 participants (depending on the trip), the tour operator may withdraw from the travel contract up to 6 weeks before the start of the trip. The tour operator must have stated the minimum number of participants for the relevant trip and the latest date by which the traveler must be informed of cancellation in the travel information and must also have clearly stated the minimum number of participants and the latest possible date of withdrawal in the travel confirmation. If it is evident at an earlier stage that the minimum number of participants will not be reached, the tour operator is obliged to inform the traveler immediately. If the trip does not take place for this reason, the tour operator is obliged to issue a refund of any payments made on the travel price immediately and in any case within 14 days of notice of withdrawal."
},
{
"type": "section",
"title": "8. Warranty and remedy",
"content": "Should services not be rendered according to the contract, the traveler is entitled to claim legal warranty rights for a reduction in the trip price, according to § 651 m BGB, provided that the traveler has not failed in his contractual duties to report any faults to the tour operator which may have occurred during the provision of services. In the event of a defect during the tour, the traveler can only remedy the defect himself or, in the case of a considerable defect, as described in § 651 i Abs. 2 BGB, cancel the trip, according to § 651 l BGB, as long as the tour operator has been given an adequate time to remedy the defect. A deadline need not be defined if remedial action is impossible or rejected by the tour operator or if immediate remedial action or termination is justified due to particular interests of the client. The traveler is obliged to inform the tour operator of any defect immediately and on the spot. Defects should be reported to the tour manager of the tour operator, to the contact person at the contact address or the tour operator directly. Should a representative of the tour operator not be available or contractually obliged, the tour operator must be informed of any defects relating to the trip at the following address: Go and Grow Camp e.K., Museumstr. 39, 22765 Hamburg. It is recommended that such notifications are made in a durable medium. In accordance with § 651 j BGB, claims shall lapse two years after the final day of the trip, as defined by the contract. We refer to the mutual assistance clause under § 651 q BGB, according to which the traveler is entitled to adequate assistance, notably through the provision of appropriate information concerning healthcare services, local authorities and consular assistance, as well as support in establishing communication links and in the search for other travel options, without delay in the event of § 651 k Para. 4 BGB or if the traveler faces difficulties for other reasons. § 651 k Para. 3 BGB remains unaffected."
},
{
"type": "section",
"title": "9. Traveler's duty of cooperation",
"content": "The passenger is obliged to cooperate within the framework of legal regulations and to avoid or minimize potential damages. In the case of travel involving minors, it is the person with the supervisory role and not the tour operator, who is liable for any damages that arise. A violation of regulations may result in exclusion from the trip, as stipulated in Point 6 \"Disruption by the traveler\". Destruction, loss, damage or delay of baggage must be communicated to the transport company immediately. The transport company is required to issue written confirmation. In the case of no notification, there is a danger of losing the right to claims. The tour operator recommends that damage or delay in delivery when travelling by air is urgently and immediately reported to the relevant airline on the spot by means of a property irregularity report (P.I.R.). As a rule, airlines refuse to provide compensation if a property irregularity report has not been completed. The property irregularity report must be submitted within 7 days for lost luggage and within 21 days of delivery of delayed luggage. Otherwise, loss, damage or misdirection of baggage must be reported to the tour operator or to the local representative of the operator. This does not release the traveler from providing the airline with a property irregularity report within the above-mentioned periods."
},
{
"type": "section",
"title": "10. Limitation of liability",
"content": "The tour operator's contractual liability for damages, not including damage to the body, nor damage caused by the negligence of the tour operator, is limited to three times the tour price. Any claims under international agreements or on legal regulations based on these remain unaffected by this limitation. We are not liable for service disruptions, personal injury or property damage in connection with third party services that are explicitly designated as such in the travel description and travel confirmation, where the name and address of the contract partner are given, in such a way that the traveler can clearly recognize that these are not an integral part of the travel services offered by the tour operator and that these are chosen separately. This applies in particular to additional programs over the course of the trip. §§ 651 b, 651 c, 651 w und 651 y remain unaffected. The tour operator is however liable if and insofar as the traveler suffers damages as a result of the failure of the tour operator to fulfill its information, clarification and organization obligations."
},
{
"type": "section",
"title": "11. Passport, visa and health requirements",
"content": "The tour operator will inform the customer of any important changes to the general regulations contained in the travel announcement before the start of the trip. Before conclusion of the contract, the tour operator will inform the traveler of visa requirements and health formalities applicable to the destination country, including approximate periods for obtaining the necessary visa and will inform the traveler of any changes to these before the start of the trip. The tour operator shall not be liable for the timely issue and acquisition of necessary visas from the relevant diplomatic representation, if the traveler has charged the tour operator with the procurement of visas, unless the tour operator neglected its duties or is responsible for the delay. The traveler is responsible for compliance with all regulations important for the operation of the tour. The traveler is responsible for obtaining and carrying the necessary travel documents, any necessary vaccinations and for adhering to customs and foreign exchange regulations. Any disadvantages arising from failure to comply with these regulations, including but not limited to the payment of cancellation fees, shall be at the traveler's cost. This does not apply if the tour operator has not provided information, or if the information provided proves to be insufficient or false."
},
{
"type": "section",
"title": "12. Data protection",
"content": "The protection of clients' privacy and personal data is very important to Go and Grow Camp. Go and Grow Camp collects and processes data according to legal regulations. Personal data is only stored when necessary for the performance of booked services or to comply with legal regulations."
},
{
"type": "section",
"title": "13. Place of jurisdiction",
"content": "The entire legal and contractual relationship between the travel operator and travelers with no general place of residence or registered office in Germany shall be governed exclusively by German law, on the proviso that, should the traveler have a general place of residence in another country in accordance with Art. 6 Para. 2 of the Rome I Regulation, they are also protected by any mandatory rules of law in that country, which would not otherwise apply. The traveler can take legal action against the tour operator only at its registered office. Should the travel operator take legal action against the traveler, the domicile of the traveler is decisive, unless action is directed against registered traders or persons who have changed their residence or customary place of abode to a foreign country or whose residence or customary place of abode is not known at the time when legal action is brought. In such cases, the registered office of the tour operator is decisive. With respect to the law concerning consumer dispute resolution, the tour operator advises that it will not take part in any voluntary dispute settlement. Should the tour operator be obliged to take part in a dispute settlement after the printing of these travel conditions, the tour operator will inform the traveler of this in appropriate form. In relation to all travel contracts concluded electronically, the tour operator refers to the European online dispute resolution platform <a href=\"http://ec.europa.eu/consumers/odr/\">http://ec.europa.eu/consumers/odr/</a>."
},
{
"type": "section",
"title": "14. Identity of the operating airline",
"content": "Should the travel contract include transport by plane, the traveler will be informed of the identity and name(s) of the operating airline(s) providing all air transport services as part of the booked trip. Should the identity of the airline(s) be undetermined at the time of booking, the tour operator will inform the traveler of the airline or airlines that are most likely to operate the flight or flights and will inform the traveler immediately, as soon as this is determined. The tour operator must inform the traveler immediately if the airline is changed. The tour operator must take all appropriate steps to ensure that the customer is informed of the change as quickly as possible. The list of airlines on the EU blacklist can be found here: <a href=\"https://ec.europa.eu/transport/modes/air/safety/air-ban/search_en\" target=\"_blank\" rel=\"noopener noreferrer\">https://ec.europa.eu/transport/modes/air/safety/air-ban/search_en</a>"
},
{
"type": "section",
"title": "15. Invalidity of individual terms",
"content": "The invalidity of individual terms does not render other conditions or the contract as a whole invalid. 16. VAT Exemption in accordance with § 4 Nr. 23 UstG, Go and Grow Camp e.K. is exempt from sales tax for all child and youth travel."
},
{
"type": "paragraph",
"text": "Last updated: August 2018"
}
]
}
}
-34
View File
@@ -1,34 +0,0 @@
{
"hero": {
"title": "Go and Grow Camp\nLast travel informations",
"backgroundImage": "/uploads/banner/b18.jpg"
},
"page": {
"type": "blog",
"title": "Go and Grow Camp - Travel",
"year": "2026"
},
"posts": [
{
"id": "travel-info-2026",
"title": "Travel Information — Go and Grow Camp 2026",
"slug": "travel-information-2026",
"date": "2026-01-01",
"author": "Go and Grow Camp",
"excerpt": "Summary of important travel details, arrival/departure times and contact points.",
"coverImage": "/uploads/banner/b18.jpg",
"categories": ["Travel", "Info"],
"tags": ["travel", "camp", "2026"],
"content": {
"blocks": [
{
"type": "paragraph",
"data": {
"text": "Our entire team is looking forward to an exciting and adventurous holiday camp with you. Below you will find a summary of all the important information about our adventure, sports and language camps. If you have any further questions, please contact us at office@campadventure.de"
}
}
]
}
}
]
}
-300
View File
@@ -1,300 +0,0 @@
{
"hero": {
"title": "Visa Service",
"summaryList": [
{
"id": 1,
"name": "France",
"slug": "france",
"icon": "/img/home-2/visa/03.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
],
"detailedView": {
"activeCountry": {
"id": 1,
"name": "United States of America ",
"title": "COUNTRY USA",
"mainImage": "/img/inner-page/country-details/details-1.jpg",
"description": "The United States is one of the most popular destinations for international students and immigrants, offering world-class universities, diverse cultural experiences, and countless career opportunities...",
"additionalInfo": "Our consultancy provides complete guidance for study visas, work permits, and permanent residency pathways tailored to your goals.",
"tagline": "Over the last 35 Years we made an impact that is strong & we have long way to go.",
"visaTypes": [
{
"category": "Tourist & Work",
"items": [
{
"title": "Tourist Visa",
"description": "Broad term that can refer to various aspects of interconnectedness"
},
{
"title": "Work Permit",
"description": "Broad term that can refer to various aspects of interconnectedness"
}
]
},
{
"category": "Student & Family",
"items": [
{
"title": "Student",
"description": "Broad term that can refer to various aspects of interconnectedness"
},
{
"title": "Tourist Visa",
"description": "Broad term that can refer to various aspects of interconnectedness"
}
]
}
],
"visaProcess": {
"title": "USA Visa Process",
"steps": [
{
"number": "01",
"title": "Consultation & Eligibility Check",
"description": "Our experts review your profile and visa requirements."
},
{
"number": "02",
"title": "Application Preparation",
"description": "We help with document collection, form filling, and statement drafting."
},
{
"number": "03",
"title": "Submission",
"description": "Visa application is submitted online with required fees."
},
{
"number": "04",
"title": "Interview Guidance",
"description": "Get training and mock sessions for embassy interview."
},
{
"number": "05",
"title": "Approval & Travel",
"description": "Once approved, we provide travel and pre-departure guidance."
}
]
},
"gallery": [
"/img/inner-page/country-details/details-2.jpg",
"/img/inner-page/country-details/details-3.png"
],
"visaCategories": {
"title": "Types of USA Visas",
"steps": [
[
"Student Visa (F1, M1, J1)",
"Work Visa (H1B, L1)",
"Tourist Visa (B1/B2)"
],
[
"Family/Spouse Visa (K1, IR1, F2A)",
"Green Card / Immigrant Visa"
]
]
},
"visaService": {
"title": "Our USA Visa Service Options",
"steps": [
{
"number": "01",
"title": "Consultation & Eligibility Check",
"description": "Our experts review your profile and visa requirements."
},
{
"number": "02",
"title": "Application Preparation",
"description": "We help with document collection, form filling, and statement drafting."
},
{
"number": "03",
"title": "Submission",
"description": "Visa application is submitted online with required fees."
},
{
"number": "04",
"title": "Interview Guidance",
"description": "Get training and mock sessions for embassy interview."
},
{
"number": "05",
"title": "Approval & Travel",
"description": "Once approved, we provide travel and pre-departure guidance."
}
]
}
},
"relatedCountries": [
{
"id": 1,
"name": "Canada",
"icon": "/img/inner-page/country-details/01.png"
},
{
"id": 2,
"name": "USA",
"icon": "/img/inner-page/country-details/02.png"
},
{
"id": 3,
"name": "USA",
"icon": "/img/inner-page/country-details/03.png"
},
{
"id": 4,
"name": "Saint Helena",
"icon": "/img/inner-page/country-details/05.png"
},
{
"id": 5,
"name": "Iran",
"icon": "/img/inner-page/country-details/06.png"
},
{
"id": 6,
"name": "Spain",
"icon": "/img/inner-page/country-details/07.png"
},
{
"id": 7,
"name": "Japan",
"icon": "/img/inner-page/country-details/08.png"
}
],
"contactInfo": {
"img": "/img/inner-page/country-details/bg.jpg",
"sectionTitle": "Visa & Immigration",
"helpText": "Need Help? Book Lab Visit",
"phone": {
"label": "Call Us",
"value": "+009 438 222 9540",
"link": "tel:+0094382229540"
},
"email": {
"label": "Mail Us",
"value": "infor@xridergamil.com",
"link": "mailto:infor@xridergamil.com"
},
"location": {
"label": "Location",
"address": "Toronto, Montreal, City 2026"
}
}
}
},
{
"id": 2,
"name": "UK",
"slug": "uk",
"icon": "/img/home-2/visa/11.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 3,
"name": "Canada",
"slug": "canada",
"icon": "/img/home-2/visa/02.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 4,
"name": "Germany",
"slug": "germany",
"icon": "/img/home-2/visa/12.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 5,
"name": "Spain",
"slug": "spain",
"icon": "/img/home-2/visa/13.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 6,
"name": "South Korea",
"slug": "south-korea",
"icon": "/img/home-2/visa/14.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 7,
"name": "Japan",
"slug": "japan",
"icon": "/img/home-2/visa/15.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 8,
"name": "Croatia",
"slug": "croatia",
"icon": "/img/home-2/visa/16.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 9,
"name": "England",
"slug": "england",
"icon": "/img/home-2/visa/17.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
},
{
"id": 10,
"name": "Indonesia",
"slug": "indonesia",
"icon": "/img/home-2/visa/18.png",
"services": [
"Student Visa & Admission",
"Work Visa H1B",
"Work permit for Canada",
"Student Visa for Canada"
]
}
]
}
}
-194
View File
@@ -1,194 +0,0 @@
const mongoose = require("mongoose");
const activitySchema = new mongoose.Schema(
{
// Hero section for activity page header (supports Activities and Booking variants)
hero: {
titleActivities: {
type: String,
trim: true,
default: ''
},
titleBooking: {
type: String,
trim: true,
default: ''
},
bannerImageActivities: {
type: String,
trim: true,
default: ''
},
bannerImageBooking: {
type: String,
trim: true,
default: ''
},
},
name: {
type: String,
required: true,
trim: true,
},
price: {
type: Number,
required: true,
min: 0,
},
priceText: {
type: String,
trim: true,
},
season: [
{
type: String,
enum: ["spring", "summer", "autumn", "winter"],
},
],
age: {
type: [Number],
validate: {
validator: function (v) {
return v.length === 2 && v[0] <= v[1];
},
message: "Age must be an array of [minAge, maxAge]",
},
},
locations: [
{
type: String,
trim: true,
},
],
image: {
type: String,
trim: true,
},
link: {
type: String,
trim: true,
},
// Global filters document (single document in Activity collection)
filters: [
{
label: { type: String, required: true, trim: true },
value: { type: String, required: true, trim: true },
items: [
{
value: { type: String, required: true },
label: { type: String, required: true },
},
],
order: { type: Number, default: 0 },
},
],
program: {
type: String,
trim: true,
},
rating: {
type: Number,
min: 1,
max: 5,
default: 4,
},
isActive: {
type: Boolean,
default: true,
},
order: {
type: Number,
default: 0,
},
// marker for the single document that stores global filters
isFiltersDoc: {
type: Boolean,
default: false,
},
// Rich camp details from camp-detail field in activities.json
campDetail: {
type: mongoose.Schema.Types.Mixed,
default: {},
},
// Booking sessions - các đợt booking với thông số riêng
bookingSessions: [
{
sessionId: { type: String, required: true },
startDate: { type: Date, required: true },
endDate: { type: Date, required: true },
overnightStays: { type: Number, required: true, default: 14 },
// Spots theo giới tính
totalMaleSpots: { type: Number, default: 25 },
totalFemaleSpots: { type: Number, default: 25 },
bookedMaleSpots: { type: Number, default: 0 },
bookedFemaleSpots: { type: Number, default: 0 },
price: { type: Number },
isActive: { type: Boolean, default: true },
// Danh sách booking cho session này
bookingList: [
{
address: { type: String, required: true },
agreeNewsletter: { type: Boolean, default: false },
agreeTerms: { type: Boolean, required: true },
city: { type: String, required: true },
country: { type: String, required: true },
dietaryRestrictions: {
type: String,
enum: ['none', 'vegetarian', 'vegan', 'halal', 'kosher', 'gluten-free', 'other'],
default: 'none'
},
email: {
type: String,
required: true,
lowercase: true,
trim: true
},
emergencyContact: { type: String, required: true },
emergencyPhone: { type: String, required: true },
medicalConditions: { type: String, default: '' },
numberOfParticipants: { type: Number, required: true, min: 1 },
parentFirstName: { type: String, required: true, trim: true },
parentLastName: { type: String, required: true, trim: true },
participantBirthDate: { type: Date, required: true },
participantFirstName: { type: String, required: true, trim: true },
participantGender: {
type: String,
enum: ['male', 'female', 'other'],
required: true
},
participantLastName: { type: String, required: true, trim: true },
phone: { type: String, required: true },
postalCode: { type: String, required: true },
sessionDate: { type: String, required: true }, // sessionId reference
specialRequests: { type: String, default: '' },
// Thêm các trường quản lý
bookingStatus: {
type: String,
enum: ['pending', 'confirmed', 'cancelled', 'completed'],
default: 'pending'
},
paymentStatus: {
type: String,
enum: ['pending', 'partial', 'paid', 'refunded'],
default: 'pending'
},
totalAmount: { type: Number, default: 0 },
paidAmount: { type: Number, default: 0 },
bookingDate: { type: Date, default: Date.now },
confirmationCode: { type: String, unique: true },
adminNotes: { type: String, default: '' }
}
]
}
],
},
{timestamps: true}
);
// Add index for better query performance
activitySchema.index({name: 1});
activitySchema.index({isActive: 1, order: 1});
activitySchema.index({season: 1});
activitySchema.index({locations: 1});
module.exports = mongoose.model("Activity", activitySchema);
-302
View File
@@ -1,302 +0,0 @@
const mongoose = require("mongoose");
// Schema cho content items
const contentItemSchema = new mongoose.Schema(
{
type: {
type: String,
enum: ["paragraph", "section", "list", "note", "embed", "header"],
required: true,
},
text: {
type: String,
trim: true,
default: "",
},
title: {
type: String,
trim: true,
default: "",
},
content: {
type: String,
trim: true,
default: "",
},
items: {
type: [String],
default: [],
},
level: {
type: Number,
default: 2,
},
// Embed/video fields
embed: {
type: String,
trim: true,
default: ''
},
url: {
type: String,
trim: true,
default: ''
},
source: {
type: String,
trim: true,
default: ''
},
videoId: {
type: String,
trim: true,
default: ''
},
caption: {
type: String,
trim: true,
default: ''
},
width: {
type: Number,
default: 0
},
height: {
type: Number,
default: 0
},
},
{ _id: false }
);
// Schema cho overlay style
const overlayStyleSchema = new mongoose.Schema(
{
backgroundColor: {
type: String,
trim: true,
default: "rgba(0, 0, 0, 0)",
},
},
{ _id: false }
);
// Schema cho hero section
const heroSchema = new mongoose.Schema(
{
title: {
type: String,
required: true,
trim: true,
default: "Insurance & Travel Cancellation Guarantee",
},
subtitle: {
type: String,
trim: true,
default: "Comprehensive coverage for your peace of mind",
},
backgroundImage: {
type: String,
trim: true,
default: "/uploads/banner/b13.jpg",
},
sectionClass: {
type: String,
trim: true,
default: "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
},
backgroundClasses: {
type: String,
trim: true,
default: "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
},
overlayStyle: {
type: overlayStyleSchema,
default: () => ({ backgroundColor: "rgba(0, 0, 0, 0)" }),
},
titleClass: {
type: String,
trim: true,
default: "text-white text-[5vw] uk-text-center",
},
subtitleClass: {
type: String,
trim: true,
default: "uk-panel font-[Raleway] italic text-[1.5vw] uk-margin uk-text-center",
},
enableScrollspy: {
type: Boolean,
default: true,
},
},
{ _id: false }
);
// Schema cho page section
const pageSchema = new mongoose.Schema(
{
title: {
type: String,
required: true,
trim: true,
default: "Insurance & Travel Information",
},
divider: {
type: Boolean,
default: true,
},
sectionClass: {
type: String,
trim: true,
default: "uk-section-default uk-section-overlap uk-section",
},
titleClass: {
type: String,
trim: true,
default: "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
},
dividerClass: {
type: String,
trim: true,
default: "uk-divider-small uk-text-left@m uk-text-center",
},
},
{ _id: false }
);
// Schema cho content section
const contentSchema = new mongoose.Schema(
{
sectionClass: {
type: String,
trim: true,
default: "uk-section-muted uk-section-overlap uk-section",
},
textClass: {
type: String,
trim: true,
default: "uk-panel uk-margin text-[1vw]",
},
content: {
type: [contentItemSchema],
default: [],
},
},
{ _id: false }
);
// Main Insurance Schema - CẤU TRÚC MỚI
const insuranceSchema = new mongoose.Schema(
{
name: {
type: String,
default: "default",
unique: true,
},
// 3 PHẦN CHÍNH
hero: {
type: heroSchema,
required: true,
},
page: {
type: pageSchema,
required: true,
},
content: {
type: contentSchema,
required: true,
},
language: {
type: String,
default: "en",
},
version: {
type: String,
default: "2.0.0",
},
isActive: {
type: Boolean,
default: true,
},
migratedFromOldStructure: {
type: Boolean,
default: false,
},
},
{
timestamps: true,
}
);
// Static method: Lấy insurance default
insuranceSchema.statics.getDefault = async function(language = "en") {
try {
let insurance = await this.findOne({ name: "default", language: language });
if (!insurance) {
// Tạo default data nếu chưa có
insurance = await this.create({
name: "default",
language: language,
hero: {
title: "Insurance & Travel Cancellation Guarantee",
subtitle: "Comprehensive coverage for your peace of mind",
backgroundImage: "/uploads/banner/b13.jpg",
},
page: {
title: "Insurance & Travel Information",
divider: true,
},
content: {
content: []
}
});
}
return insurance;
} catch (error) {
console.error("Error in getDefault:", error);
throw error;
}
};
// Method để get insurance data
insuranceSchema.methods.getInsuranceData = function() {
return this.toObject();
};
// Migration method - chỉ hỗ trợ cấu trúc mới
insuranceSchema.statics.migrateFromJson = async function(jsonData, language = "en") {
try {
console.log('Migrating insurance from JSON...');
// Xóa document cũ nếu có
await this.deleteOne({ name: "default", language: language });
// Sử dụng dữ liệu từ JSON trực tiếp
const processedData = {
name: "default",
language: language,
version: "2.0.0",
isActive: true,
hero: jsonData.hero,
page: jsonData.page,
content: jsonData.content
};
// Tạo document mới
const newInsurance = await this.create(processedData);
const contentItems = jsonData.content?.content || [];
console.log(`Insurance data migrated successfully for language: ${language}`);
console.log(`Total content items: ${contentItems.length}`);
return newInsurance;
} catch (error) {
console.error("Error migrating insurance data to new structure:", error);
throw error;
}
};
const Insurance = mongoose.model("Insurance", insuranceSchema);
module.exports = Insurance;
-76
View File
@@ -1,76 +0,0 @@
const mongoose = require("mongoose");
// Schema cho hero section
const safetySchema = new mongoose.Schema(
{
//hero section
hero: {
banner: String,
title: String,
},
//approach section
approach: {
badge: String,
title:String,
description:String,
imgs:{
img1:String,
img2:String
},
stats:{
count:String,
label:String,
avatars:[String]
},
features:[
{text:String}
],
cards: [
{
title: String,
content: String,
},
],
},
//philosophy section
philosophy: {
title: String,
subtitle: String,
cards: [
{
title: String,
content: String,
author: {
avt: String,
name: String,
role: String,
rating: String,
},
},
],
},
//security section
security: {
title: String,
subtitle: String,
cards: [
{
title: String,
content: String,
author: {
avt: String,
name: String,
role: String,
rating: String,
},
},
],
},
},
{ timestamps: true }
);
module.exports = mongoose.model("Safety", safetySchema);
-519
View File
@@ -1,519 +0,0 @@
// models/terms.js
const mongoose = require("mongoose");
// Schema cho content items
const contentItemSchema = new mongoose.Schema(
{
type: {
type: String,
enum: ["paragraph", "section", "header", "list", "cancellation_table", "cancellation_section", "note", "embed", "image"],
required: true,
},
text: {
type: String,
trim: true,
default: "",
},
// Header level (h2, h3, h4, h5, h6)
level: {
type: Number,
min: 1,
max: 6,
default: 2,
},
title: {
type: String,
trim: true,
default: "",
},
content: {
type: String,
trim: true,
default: "",
},
subsections: {
type: [mongoose.Schema.Types.Mixed], // Recursive reference
default: [],
},
items: {
type: [String],
default: [],
},
// List style (for list type)
style: {
type: String,
enum: ["ordered", "unordered"],
default: "unordered",
},
// Embed/video fields (optional)
embed: {
type: String,
trim: true,
default: ''
},
url: {
type: String,
trim: true,
default: ''
},
source: {
type: String,
trim: true,
default: ''
},
videoId: {
type: String,
trim: true,
default: ''
},
caption: {
type: String,
trim: true,
default: ''
},
width: {
type: Number,
default: 0
},
height: {
type: Number,
default: 0
},
},
{ _id: false }
);
// Schema cho overlay style
const overlayStyleSchema = new mongoose.Schema(
{
backgroundColor: {
type: String,
trim: true,
default: "rgba(0, 0, 0, 0)",
},
},
{ _id: false }
);
// Schema cho hero section - CẤU TRÚC MỚI
const heroSchema = new mongoose.Schema(
{
title: {
type: String,
required: true,
trim: true,
default: "Frequently Asked Questions",
},
backgroundImage: {
type: String,
trim: true,
default: "/uploads/terms/faqimage.jpg",
},
sectionClass: {
type: String,
trim: true,
default: "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
},
backgroundClasses: {
type: String,
trim: true,
default: "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
},
overlayStyle: {
type: overlayStyleSchema,
default: () => ({ backgroundColor: "rgba(0, 0, 0, 0)" }),
},
titleClass: {
type: String,
trim: true,
default: "text-white text-[5vw] uk-text-center",
},
enableScrollspy: {
type: Boolean,
default: true,
},
},
{ _id: false }
);
// Schema cho page section - CẤU TRÚC MỚI
const pageSchema = new mongoose.Schema(
{
title: {
type: String,
required: true,
trim: true,
default: "Terms & Conditions Go and Grow Camp e.K.",
},
divider: {
type: Boolean,
default: true,
},
sectionClass: {
type: String,
trim: true,
default: "uk-section-default uk-section-overlap uk-section",
},
titleClass: {
type: String,
trim: true,
default: "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
},
dividerClass: {
type: String,
trim: true,
default: "uk-divider-small uk-text-left@m uk-text-center",
},
},
{ _id: false }
);
// Schema cho content section - CẤU TRÚC MỚI
const contentSchema = new mongoose.Schema(
{
sectionClass: {
type: String,
trim: true,
default: "uk-section-muted uk-section-overlap uk-section",
},
textClass: {
type: String,
trim: true,
default: "uk-panel uk-margin text-[1vw]",
},
content: {
type: [contentItemSchema],
default: [],
},
},
{ _id: false }
);
// Main Terms Schema - CẤU TRÚC MỚI
const termsSchema = new mongoose.Schema(
{
name: {
type: String,
default: "default",
unique: true,
},
// CHỈ CÒN 3 PHẦN CHÍNH
hero: {
type: heroSchema,
required: true,
},
page: {
type: pageSchema,
required: true,
},
content: {
type: contentSchema,
required: true,
},
language: {
type: String,
default: "en",
},
version: {
type: String,
default: "2.0.0", // Tăng version vì cấu trúc thay đổi
},
isActive: {
type: Boolean,
default: true,
},
migratedFromOldStructure: {
type: Boolean,
default: false,
},
},
{
timestamps: true,
}
);
// Static method: Lấy terms default - CẬP NHẬT THEO CẤU TRÚC MỚI
termsSchema.statics.getDefault = async function(language = "en") {
try {
let terms = await this.findOne({ name: "default", language: language });
if (!terms) {
// Tạo terms mặc định theo cấu trúc mới
terms = new this({
name: "default",
language: language,
hero: {
title: "Frequently Asked Questions",
subtitle: "Our Terms & Conditions",
backgroundImage: "/uploads/terms/faqimage.jpg",
sectionClass: "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
backgroundClasses: "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
overlayStyle: {
backgroundColor: "rgba(0, 0, 0, 0)"
},
titleClass: "text-white text-[5vw] uk-text-center",
subtitleClass: "uk-panel font-[Raleway] italic text-[1.5vw] uk-margin uk-text-center",
enableScrollspy: true
},
page: {
title: "Terms & Conditions Go and Grow Camp e.K.",
divider: true,
sectionClass: "uk-section-default uk-section-overlap uk-section",
titleClass: "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
dividerClass: "uk-divider-small uk-text-left@m uk-text-center"
},
content: {
sectionClass: "uk-section-muted uk-section-overlap uk-section",
textClass: "uk-panel uk-margin text-[1vw]",
content: [
{
type: "paragraph",
text: "This is an English translation of the original and legally binding German document \"Allgemeine Geschäftsbedingungen Go and Grow Camp e.K.\", which can be viewed at <a href=\"https://www.campadventure.de/de/infos/agb\" target=\"_self\">https://www.campadventure.de/de/infos/agb</a>. This translation is for your information only and is not legally binding."
},
{
type: "paragraph",
text: "<strong>Go and Grow Camp e.K. is the tour operator for individuals, for camps in Germany, England and Northern Ireland.</strong>"
},
{
type: "paragraph",
text: "GUARANTEE: All participants are protected in accordance with the legal regulations governing tour operators in Germany. As per §651, any payments made towards the travel price are insured against insolvency by tourVers."
}
]
},
version: "2.0.0",
isActive: true,
migratedFromOldStructure: false
});
await terms.save();
console.log(`Created default terms for language: ${language} (new structure)`);
}
return terms;
} catch (error) {
console.error("Error in getDefault:", error);
throw error;
}
};
// Method để get terms data
termsSchema.methods.getTermsData = function() {
return this.toObject();
};
// Migration method từ JSON CŨ sang cấu trúc MỚI
termsSchema.statics.migrateFromJson = async function(jsonData, language = "en") {
try {
console.log('Migrating from JSON to new structure...');
// Xóa document cũ nếu có
await this.deleteOne({ name: "default", language: language });
// Chuyển đổi từ cấu trúc cũ sang mới
const processedData = {
name: "default",
language: language,
version: "2.0.0",
isActive: true,
migratedFromOldStructure: true,
hero: {
title: jsonData.hero?.title || "Go and Grow Camp",
subtitle: jsonData.hero?.subtitle || "Our Terms & Conditions",
backgroundImage: jsonData.hero?.backgroundImage || "/uploads/terms/faqimage.jpg",
sectionClass: "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
backgroundClasses: "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
overlayStyle: {
backgroundColor: jsonData.hero?.overlayColor || "rgba(0, 0, 0, 0)"
},
titleClass: "text-white text-[5vw] uk-text-center",
subtitleClass: "uk-panel font-[Raleway] italic text-[1.5vw] uk-margin uk-text-center",
enableScrollspy: jsonData.hero?.enableScrollspy || true
},
page: {
title: jsonData.termsHeader?.title || "Terms & Conditions Go and Grow Camp e.K.",
divider: jsonData.termsHeader?.divider !== false,
sectionClass: jsonData.termsHeader?.sectionClass || "uk-section-default uk-section-overlap uk-section",
titleClass: jsonData.termsHeader?.titleClass || "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
dividerClass: jsonData.termsHeader?.dividerClass || "uk-divider-small uk-text-left@m uk-text-center"
},
content: {
sectionClass: jsonData.layout?.termsSectionClass || "uk-section-muted uk-section-overlap uk-section",
textClass: jsonData.layout?.textContentClass || "uk-panel uk-margin text-[1vw]",
content: []
}
};
// Chuyển đổi sections cũ sang content mới
const contentItems = [];
// Thêm disclaimer đầu tiên nếu có
if (jsonData.disclaimer?.text) {
contentItems.push({
type: "paragraph",
text: jsonData.disclaimer.text
});
}
if (jsonData.disclaimer?.importantNote) {
contentItems.push({
type: "paragraph",
text: `<strong>${jsonData.disclaimer.importantNote}</strong>`
});
}
if (jsonData.disclaimer?.legalNote) {
contentItems.push({
type: "paragraph",
text: jsonData.disclaimer.legalNote
});
}
// Thêm disclaimer note
if (jsonData.disclaimer?.note) {
contentItems.push({
type: "paragraph",
text: jsonData.disclaimer.note
});
}
// Thêm các sections
if (jsonData.sections && Array.isArray(jsonData.sections)) {
jsonData.sections.forEach(section => {
if (section.title && section.content) {
const contentItem = {
type: "section",
title: section.title,
content: section.content
};
// Thêm subsections nếu có
if (section.subsections && section.subsections.length > 0) {
contentItem.subsections = section.subsections.map(sub => ({
type: "note",
text: sub.content || sub
}));
}
// Thêm cancellation fees nếu có
if (section.fees) {
contentItem.subsections = contentItem.subsections || [];
// Individual fees
if (section.fees.individual && section.fees.individual.length > 0) {
contentItem.subsections.push({
type: "cancellation_table",
title: "Standard Cancellation Fees",
items: section.fees.individual.map(fee => `${fee.period} ${fee.fee}`)
});
}
// School group fees
if (section.fees.schoolGroups && section.fees.schoolGroups.fees) {
contentItem.subsections.push({
type: "cancellation_section",
title: "Cancellation policy for school groups:",
items: [
section.fees.schoolGroups.freeCorrection,
...section.fees.schoolGroups.fees.map(fee => `${fee.period}: ${fee.fee}`)
]
});
}
// Fee note
if (section.fees.note) {
contentItem.subsections.push({
type: "note",
text: section.fees.note
});
}
}
contentItems.push(contentItem);
}
});
}
// Thêm footer note nếu có
if (jsonData.footerNote?.text) {
contentItems.push({
type: "paragraph",
text: jsonData.footerNote.text
});
}
// Gán content items đã chuyển đổi
processedData.content.content = contentItems;
// Tạo document mới
const newTerms = await this.create(processedData);
console.log(`Terms data migrated to new structure for language: ${language}`);
console.log(`Total content items: ${contentItems.length}`);
return newTerms;
} catch (error) {
console.error("Error migrating terms data to new structure:", error);
throw error;
}
};
// Migration method từ cấu trúc MỚI sang cấu trúc MỚI (dành cho JSON mới)
termsSchema.statics.migrateFromNewJson = async function(jsonData, language = "en") {
try {
console.log('Migrating from new JSON structure...');
// Xóa document cũ nếu có
await this.deleteOne({ name: "default", language: language });
// Tạo document mới với cấu trúc mới
const newTerms = await this.create({
name: "default",
language: language,
version: "2.0.0",
isActive: true,
migratedFromOldStructure: false,
hero: {
title: jsonData.hero?.title || "Go and Grow Camp",
subtitle: jsonData.hero?.subtitle || "Our Terms & Conditions",
backgroundImage: jsonData.hero?.backgroundImage || "/uploads/terms/faqimage.jpg",
sectionClass: jsonData.hero?.sectionClass || "uk-section-default uk-section-overlap uk-preserve-color uk-light uk-position-relative",
backgroundClasses: jsonData.hero?.backgroundClasses || "uk-background-norepeat uk-background-cover uk-background-top-center uk-section uk-section-xlarge",
overlayStyle: jsonData.hero?.overlayStyle || { backgroundColor: "rgba(0, 0, 0, 0)" },
titleClass: jsonData.hero?.titleClass || "text-white text-[5vw] uk-text-center",
subtitleClass: jsonData.hero?.subtitleClass || "uk-panel font-[Raleway] italic text-[1.5vw] uk-margin uk-text-center",
enableScrollspy: jsonData.hero?.enableScrollspy !== undefined ? jsonData.hero.enableScrollspy : true
},
page: {
title: jsonData.page?.title || "Terms & Conditions Go and Grow Camp e.K.",
divider: jsonData.page?.divider !== undefined ? jsonData.page.divider : true,
sectionClass: jsonData.page?.sectionClass || "uk-section-default uk-section-overlap uk-section",
titleClass: jsonData.page?.titleClass || "text-[2.5vw] text-[#292c3d] uk-text-left@m uk-text-center",
dividerClass: jsonData.page?.dividerClass || "uk-divider-small uk-text-left@m uk-text-center"
},
content: {
sectionClass: jsonData.content?.sectionClass || "uk-section-muted uk-section-overlap uk-section",
textClass: jsonData.content?.textClass || "uk-panel uk-margin text-[1vw]",
content: jsonData.content?.content || []
}
});
console.log(`Terms data created with new structure for language: ${language}`);
console.log(`Hero title: ${newTerms.hero.title}`);
console.log(`Page title: ${newTerms.page.title}`);
console.log(`Content items: ${newTerms.content.content.length}`);
return newTerms;
} catch (error) {
console.error("Error creating terms data from new structure:", error);
throw error;
}
};
const Terms = mongoose.model("Terms", termsSchema);
module.exports = Terms;
-45
View File
@@ -1,45 +0,0 @@
const mongoose = require("mongoose");
const travelSchema = new mongoose.Schema(
{
page: {
title: {
type: String,
default: "Travel Information",
},
description: {
type: String,
default: "",
},
year: {
type: String,
default: "",
},
metadata: {
title: String,
description: String,
},
},
hero: {
title: {
type: String,
default: "Travel Information",
},
backgroundImage: {
type: String,
default: "",
},
},
content: {
type: mongoose.Schema.Types.Mixed,
default: { blocks: [] },
},
enableScrollspy: {
type: Boolean,
default: false,
},
},
{ timestamps: true }
);
module.exports = mongoose.model("Travel", travelSchema);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

+21 -2
View File
@@ -112,7 +112,13 @@
_renderGrid(ALL_ICONS);
}
new bootstrap.Modal(document.getElementById('iconPickerModal')).show();
const modal = new bootstrap.Modal(document.getElementById('iconPickerModal'));
modal.show();
document.getElementById('iconPickerModal').addEventListener('shown.bs.modal', function handler() {
document.getElementById('iconSearchInput').focus();
this.removeEventListener('shown.bs.modal', handler);
});
}
function _renderGrid(icons) {
@@ -137,10 +143,22 @@
`).join('');
document.fonts.ready.then(() => {
grid.style.visibility = 'visible';
grid.style.visibility = 'visible';
});
}
function iconPickerInput(cssClass, currentValue) {
return (
'<div class="input-group">' +
'<span class="input-group-text icon-preview-cell" style="min-width:38px">' +
(currentValue ? '<i class="' + escHtml(currentValue) + '"></i>' : '') +
'</span>' +
'<input type="text" class="form-control ' + cssClass + '" value="' + escHtml(currentValue) + '" ' +
'placeholder="Click to pick..." readonly style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">' +
'</div>'
);
}
function pick(value) {
if (!_targetInput) return;
_targetInput.value = value;
@@ -164,6 +182,7 @@
// ── Expose global ─────────────────────────────────────────────────────────
window.IconPicker = { init, open, pick };
window.IconPicker = { init, open, pick, inputHtml: iconPickerInput };
window.IconPicker.pick = pick;
window.IconPickerPick = pick;
})();
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+5 -211
View File
@@ -8,11 +8,13 @@ const homeController = require("../controllers/homeController");
const headerController = require("../controllers/headerController");
const footerController = require("../controllers/footerController");
const aboutController = require("../controllers/aboutController");
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 studentSupportController = require("../controllers/studentSupportController");
@@ -20,14 +22,10 @@ const requestInfoController = require("../controllers/requestInfoController");
const pageController = require("../controllers/pageController");
const settingController = require("../controllers/settingController");
const faqController = require("../controllers/faqController"); // Thêm import này
const termsController = require("../controllers/termsController");
const { upload, uploadVideo, convertToWebp } = require("../middleware/upload");
const safetyController = require("../controllers/safetyController");
const insuranceController = require("../controllers/insuranceController");
const auditLogController = require("../controllers/auditLogController");
const activityController = require("../controllers/activityController");
const { upload, uploadVideo, convertToWebp } = require("../middleware/upload");
const auditLogController = require("../controllers/auditLogController");
const headerMenuController = require("../controllers/headerMenuController");
const programmeController = require("../controllers/programmeController");
@@ -36,9 +34,6 @@ const programmeController = require("../controllers/programmeController");
const blogController = require("../controllers/blogController");
const blogCategoryController = require("../controllers/blogCategoryController");
const blogTagController = require("../controllers/blogTagController");
const socialLinkController = require("../controllers/socialLinkController");
const testimonialController = require("../controllers/testimonialController");
const videoGalleryController = require("../controllers/videoGalleryController");
// Dashboard
router.get("/dashboard", ensureAuthenticated, dashboardController.getDashboard);
@@ -179,25 +174,6 @@ router.post(
headerMenuController.reorder,
);
// Social Links routes
router.get("/social-links", ensureAuthenticated, socialLinkController.index);
router.post("/social-links", ensureAuthenticated, socialLinkController.store);
router.put(
"/social-links/:platform",
ensureAuthenticated,
socialLinkController.update,
);
router.delete(
"/social-links/:platform",
ensureAuthenticated,
socialLinkController.destroy,
);
router.post(
"/social-links/reorder",
ensureAuthenticated,
socialLinkController.reorder,
);
// Footer routes
router.get("/footer", ensureAuthenticated, footerController.index);
router.post("/footer/update", ensureAuthenticated, footerController.update);
@@ -247,164 +223,6 @@ router.post(
requestInfoController.update,
);
// Activity CRUD routes
router.get("/activity", ensureAuthenticated, activityController.index);
router.get(
"/activity/create",
ensureAuthenticated,
activityController.createForm,
);
router.post("/activity/create", ensureAuthenticated, activityController.create);
// Update filters (place before any parameterized /activity/:id routes to avoid route collision)
router.post(
"/activity/filters/update",
ensureAuthenticated,
activityController.updateFilters,
);
// Update hero (global hero section for activities)
router.post(
"/activity/hero/update",
ensureAuthenticated,
activityController.updateHero,
);
router.get(
"/activity/:id/edit",
ensureAuthenticated,
activityController.editForm,
);
router.post(
"/activity/:id/update",
ensureAuthenticated,
activityController.update,
);
router.post(
"/activity/:id/delete",
ensureAuthenticated,
activityController.delete,
);
router.post(
"/activity/:id/toggle-status",
ensureAuthenticated,
activityController.toggleStatus,
);
// Update display order
router.post(
"/activity/update-order",
ensureAuthenticated,
activityController.updateOrder,
);
// Booking submissions routes
router.get(
"/activity/:id/bookings/count",
ensureAuthenticated,
activityController.getBookingCount,
);
router.get(
"/activity/:id/bookings",
ensureAuthenticated,
activityController.getBookingSubmissions,
);
router.get(
"/activity/:id/bookings/export",
ensureAuthenticated,
activityController.exportBookingData,
);
// Export all bookings (across all activities)
router.get(
"/bookings/export-all",
ensureAuthenticated,
activityController.exportAllBookingsData,
);
// Update filters
// Preview activity
router.get(
"/activity/:id/preview",
ensureAuthenticated,
activityController.preview,
);
// FAQ routes
router.get("/home/faq", ensureAuthenticated, faqController.index);
router.post("/home/faq/update", ensureAuthenticated, faqController.update);
router.get("/home/faq/data", ensureAuthenticated, faqController.getFAQData);
router.get("/home/faq/api", faqController.api);
// Deprecated FAQ API routes removed
// API routes cho quản lý FAQ items (AJAX calls)
router.post("/faq/api/add-faq", ensureAuthenticated, faqController.addFAQ);
router.put(
"/faq/api/update-faq-item/:sectionId/:faqId",
ensureAuthenticated,
faqController.updateFAQItem,
);
router.delete(
"/faq/api/delete-faq-item/:sectionId/:faqId",
ensureAuthenticated,
faqController.deleteFAQItem,
);
router.get("/terms-conditions", ensureAuthenticated, termsController.index);
router.post("/terms/update", ensureAuthenticated, termsController.update);
router.get("/terms/data", ensureAuthenticated, termsController.getTermsData);
router.get("/terms/api", termsController.api);
router.get("/terms/seed", ensureAuthenticated, termsController.seed);
// Travel routes
// router.get("/travel", ensureAuthenticated, travelController.index);
// router.post("/travel/update", ensureAuthenticated, travelController.update);
// router.post("/travel/preview", ensureAuthenticated, travelController.preview);
// router.get("/travel/data", ensureAuthenticated, travelController.getTravelData);
// router.get("/travel/api", travelController.api);
// router.get("/travel/seed", ensureAuthenticated, travelController.seed);
// Deprecated FAQ API routes removed
// API routes cho quản lý FAQ sections (AJAX calls)
router.post(
"/faq/api/add-section",
ensureAuthenticated,
faqController.addFAQSection,
);
router.put(
"/faq/api/update-section/:sectionId",
ensureAuthenticated,
faqController.updateFAQSection,
);
router.delete(
"/faq/api/delete-section/:sectionId",
ensureAuthenticated,
faqController.deleteFAQSection,
);
router.post(
"/faq/api/reorder-sections",
ensureAuthenticated,
faqController.reorderFAQSection,
);
// API routes cho sidebar navigation (AJAX calls)
router.put(
"/faq/api/update-sidebar",
ensureAuthenticated,
faqController.updateSidebarNav,
);
// Safety routes
router.get("/safety", ensureAuthenticated, safetyController.index);
router.post("/safety/update", ensureAuthenticated, safetyController.update);
//Insurance routes
router.get("/insurance", ensureAuthenticated, insuranceController.index);
router.post(
"/insurance/update",
ensureAuthenticated,
insuranceController.update,
);
// Test Image Paths route
router.get("/test-images", ensureAuthenticated, (req, res) => {
const fs = require("fs");
@@ -559,30 +377,6 @@ router.post(
blogTagController.quickCreate,
);
// Testimonials management
router.get(
"/home/testimonials",
ensureAuthenticated,
testimonialController.index,
);
router.post(
"/home/testimonials/update",
ensureAuthenticated,
testimonialController.update,
);
// Video Gallery management
router.get(
"/home/video-gallery",
ensureAuthenticated,
videoGalleryController.index,
);
router.post(
"/home/video-gallery/update",
ensureAuthenticated,
videoGalleryController.update,
);
// Audit Log routes
router.get("/audit-logs", ensureAuthenticated, auditLogController.index);
router.get("/audit-logs/:id", ensureAuthenticated, auditLogController.show);
-42
View File
@@ -10,21 +10,13 @@ const admissionsController = require("../controllers/admissionsController");
const policiesController = require("../controllers/policiesController");
const headerController = require("../controllers/headerController");
const socialLinkController = require("../controllers/socialLinkController");
const footerController = require("../controllers/footerController");
const contactController = require("../controllers/contactController");
const studentSupportController = require("../controllers/studentSupportController");
const requestInfoController = require("../controllers/requestInfoController");
const faqController = require("../controllers/faqController");
const headerMenuController = require("../controllers/headerMenuController");
const safetyController = require("../controllers/safetyController");
const programmeController = require("../controllers/programmeController");
const insuranceController = require("../controllers/insuranceController");
const termsController = require("../controllers/termsController"); // <-- IMPORT ĐÃ CÓ
const activityController = require("../controllers/activityController");
// Blog controllers
const blogController = require("../controllers/blogController");
@@ -57,10 +49,6 @@ router.get("/api/header", headerController.api);
// Header Menu New Module API
router.get("/api/header-menu", headerMenuController.api);
// Social Links API routes
router.get("/api/social-links", socialLinkController.index);
router.get("/api/social-links/:platform", socialLinkController.show);
// Footer API routes
router.get("/api/footer", footerController.getFooter);
router.put("/api/admin/footer", footerController.updateFooter);
@@ -77,20 +65,6 @@ router.get("/api/request-info", requestInfoController.api);
// Contact form submission (public)
router.post("/api/contact/submit", contactController.submitForm);
router.get("/api/faq", faqController.api);
// Safety API route
router.get("/api/safety", safetyController.api);
// Activity API routes
router.get("/api/activities", activityController.api);
router.get("/api/activities/:id", activityController.apiDetail);
// Insurance APi route
router.get("/api/insurance", insuranceController.api);
router.get("/api/terms", termsController.api);
// Blog API Routes
router.get("/api/blog", blogController.api);
router.get("/api/blog/featured", blogController.apiFeatured);
@@ -115,28 +89,12 @@ router.post("/api/blog/:slug/comments", blogController.apiCreateComment);
// Blog detail by slug (must come last among blog routes)
router.get("/api/blog/:slug", blogController.apiShow);
// // API route cho blog detail
// router.get('/api/blog-detail', blogDetailController.api);
// Programmes API
router.get("/api/programmes", programmeController.api);
router.get("/api/programmes/:id", programmeController.apiDetail);
// Testimonials API
const testimonialController = require("../controllers/testimonialController");
router.get("/api/testimonials", testimonialController.api);
// Video Gallery API
const videoGalleryController = require("../controllers/videoGalleryController");
router.get("/api/video-gallery", videoGalleryController.api);
// Test route for footer
router.get("/test-footer", (req, res) => {
res.render("test-footer", {
title: "Footer Test",
layout: "layouts/main",
});
});
module.exports = router;
+37 -11
View File
@@ -1,16 +1,23 @@
<div class="container">
<div class="d-flex justify-content-between align-items-center mt-4 mb-4">
<div class="d-flex justify-content-between align-items-center mt-4 mb-4 flex-wrap gap-2">
<div>
<h1 class="h3 mb-0" style="color: var(--primary-dark);">
<%= title %>
</h1>
<p class="text-muted mb-0">Edit content displayed on the About page</p>
</div>
<div class="d-flex gap-2">
<% if (frontendUrl) { %>
<a href="<%= frontendUrl %>/about" class="btn btn-outline-primary" target="_blank" rel="noopener">
<i class="fas fa-external-link-alt me-2"></i>View About Page
</a>
<% } %>
</div>
</div>
<div class="row">
<div class="col-12">
<form method="POST" id="aboutForm" action="/admin/about-us/update">
<form method="POST" id="aboutForm" action="/admin/about/update">
<!-- Hidden JSON inputs -->
<input type="hidden" name="hero" id="heroJson">
<input type="hidden" name="leadership" id="leadershipJson">
@@ -366,7 +373,7 @@
let originalFormData = null;
document.addEventListener('DOMContentLoaded', function () {
originalFormData = <%- JSON.stringify(data) %>;
originalFormData = <% - JSON.stringify(data) %>;
populateAll(originalFormData);
document.getElementById('aboutForm').addEventListener('submit', function (e) {
@@ -595,22 +602,31 @@
c.insertAdjacentHTML('beforeend', `
<div class="card mb-2 lf-feature-item" data-mode="${mode}">
<div class="card-body p-2">
<div class="row g-2">
<div class="row g-2 align-items-center">
<div class="col-md-3">
<input type="text" class="form-control form-control-sm" data-field="icon" value="${esc(item.icon)}" placeholder="fa-play">
<div class="input-group input-group-sm">
<span class="input-group-text icon-preview-cell" style="min-width:32px">
${item.icon ? `<i class="${esc(item.icon)}"></i>` : ''}
</span>
<input type="text" class="form-control form-control-sm" data-field="icon"
value="${esc(item.icon)}" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" data-field="title" value="${esc(item.title)}" placeholder="Title">
</div>
<div class="col-md-5">
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" data-field="desc" value="${esc(item.desc)}" placeholder="Description">
</div>
<div class="col-md-1 d-flex justify-content-center">
<button type="button" class="btn btn-link text-danger btn-sm p-0" onclick="this.closest('.lf-feature-item').remove()"><i class="fas fa-trash"></i></button>
</div>
</div>
<button type="button" class="btn btn-link text-danger btn-sm p-0 mt-1" onclick="this.closest('.lf-feature-item').remove()"><i class="fas fa-trash me-1"></i>Remove</button>
</div>
</div>`);
}
function populateLearningFeatures(mode, features) {
document.getElementById(mode + 'FeaturesContainer').innerHTML = '';
features.forEach(f => addLearningFeature(mode, f));
@@ -632,16 +648,26 @@
<div class="card-body p-2">
<div class="row g-2">
<div class="col-md-3">
<input type="text" class="form-control form-control-sm" data-field="icon" value="${esc(item.icon)}" placeholder="fa-award">
<div class="input-group input-group-sm">
<span class="input-group-text icon-preview-cell" style="min-width:32px">
${item.icon ? `<i class="${esc(item.icon)}"></i>` : ''}
</span>
<input type="text" class="form-control form-control-sm" data-field="icon"
value="${esc(item.icon)}" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" data-field="title" value="${esc(item.title)}" placeholder="Title">
</div>
<div class="col-md-5">
<div class="col-md-4">
<input type="text" class="form-control form-control-sm" data-field="desc" value="${esc(item.desc)}" placeholder="Description">
</div>
<div class="col-md-1 d-flex justify-content-center">
<button type="button" class="btn btn-link text-danger btn-sm p-0 mt-1" onclick="this.closest('.acc-badge-item').remove()"><i class="fas fa-trash me-1"></i></button>
</div>
</div>
<button type="button" class="btn btn-link text-danger btn-sm p-0 mt-1" onclick="this.closest('.acc-badge-item').remove()"><i class="fas fa-trash me-1"></i>Remove</button>
</div>
</div>`);
}
+19 -16
View File
@@ -114,11 +114,14 @@
<div class="row g-2 align-items-end">
<div class="col-md-3">
<label class="form-label small">Icon</label>
<select class="form-select ch-icon">
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (ch.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (ch.icon) { %><i class="<%= ch.icon %>"></i><% } %>
</span>
<input type="text" class="form-control ch-icon"
value="<%= ch.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-3">
<label class="form-label small">Title</label>
@@ -367,7 +370,7 @@
<script>
let statusModal = null;
window.CONTACT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
// window.CONTACT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
function resetContactForm() {
if (confirm('Reset all unsaved changes?')) location.reload();
@@ -405,20 +408,20 @@
// ── Dynamic rows ──────────────────────────────
function iconSelectHtml(selected) {
var opts = window.CONTACT_ICON_OPTIONS || [];
var html = '';
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
html += '<option value="' + escHtml(o.value) + '"' + (o.value === selected ? ' selected' : '') + '>' + escHtml(o.label) + '</option>';
}
return html;
}
// function iconSelectHtml(selected) {
// var opts = window.CONTACT_ICON_OPTIONS || [];
// var html = '';
// for (var i = 0; i < opts.length; i++) {
// var o = opts[i];
// html += '<option value="' + escHtml(o.value) + '"' + (o.value === selected ? ' selected' : '') + '>' + escHtml(o.label) + '</option>';
// }
// return html;
// }
function buildChannelRow(ch) {
ch = ch || {};
return '<div class="card channel-row border"><div class="card-body"><div class="row g-2 align-items-end">' +
'<div class="col-md-3"><label class="form-label small">Icon</label><select class="form-select ch-icon">' + iconSelectHtml(ch.icon) + '</select></div>' +
'<div class="col-md-3"><label class="form-label small">Icon</label>' + iconPickerInput('ch-icon', ch.icon) + '</div>' +
'<div class="col-md-3"><label class="form-label small">Title</label><input type="text" class="form-control ch-title" value="' + escHtml(ch.title) + '"></div>' +
'<div class="col-md-4"><label class="form-label small">Detail</label><input type="text" class="form-control ch-detail" value="' + escHtml(ch.detail) + '"></div>' +
'<div class="col-md-2 d-flex align-items-end"><button type="button" class="btn btn-outline-danger btn-sm w-100 remove-channel"><i class="fas fa-trash"></i></button></div>' +
+142 -5
View File
@@ -87,10 +87,9 @@
<div class="row g-3">
<% const aboutPages=[ { label: 'About Us' , href: '/admin/about' , icon: 'fa-users' }, {
label: 'Partnerships' , href: '/admin/partnerships' , icon: 'fa-handshake' }, { label: 'History' ,
href: '/admin/history' , icon: 'fa-history' }, { label: 'Accreditation' ,
href: '/admin/accreditation' , icon: 'fa-certificate' }, { label: 'Admissions' ,
href: '/admin/admissions' , icon: 'fa-door-open' }, { label: 'Policies' ,
href: '/admin/policies' , icon: 'fa-file-contract' }, ]; %>
href: '/admin/history' , icon: 'fa-history' }, { label: 'Accreditation' , href: '/admin/accreditation' ,
icon: 'fa-certificate' }, { label: 'Admissions' , href: '/admin/admissions' , icon: 'fa-door-open' }, {
label: 'Policies' , href: '/admin/policies' , icon: 'fa-file-contract' }, ]; %>
<% aboutPages.forEach(page=> { %>
<div class="col-md-4">
<div class="border rounded p-3" style="background-color: var(--bs-light);">
@@ -215,7 +214,7 @@
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">API Endpoints</h5>
<span class="badge bg-primary">9 APIs</span>
<span class="badge bg-primary">15 APIs</span>
</div>
<div class="card-body p-0">
<div class="table-responsive">
@@ -436,6 +435,144 @@
</a>
</td>
</tr>
<!--Partnerships API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-handshake" style="color: var(--primary-color);"></i>
</div>
<span>Partnerships API</span>
</div>
</td>
<td><code>/api/partnerships</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get partnerships page data</td>
<td>
<a href="/api/partnerships" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
<!--History API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-history" style="color: var(--primary-color);"></i>
</div>
<span>History API</span>
</div>
</td>
<td><code>/api/history</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get history page data</td>
<td>
<a href="/api/history" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
<!--Accreditation API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-certificate" style="color: var(--primary-color);"></i>
</div>
<span>Accreditation API</span>
</div>
</td>
<td><code>/api/accreditation</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get accreditation page data</td>
<td>
<a href="/api/accreditation" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
<!--Admissions API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-door-open" style="color: var(--primary-color);"></i>
</div>
<span>Admissions API</span>
</div>
</td>
<td><code>/api/admissions</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get admissions page data</td>
<td>
<a href="/api/admissions" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
<!--Policies API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-file-contract" style="color: var(--primary-color);"></i>
</div>
<span>Policies API</span>
</div>
</td>
<td><code>/api/policies</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get policies page data</td>
<td>
<a href="/api/policies" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
<!--Header API-->
<tr>
<td>
<div class="d-flex align-items-center">
<div class="rounded-circle d-flex align-items-center justify-content-center me-2"
style="width: 32px; height: 32px; background-color: rgba(184, 183, 106, 0.1);">
<i class="fas fa-heading" style="color: var(--primary-color);"></i>
</div>
<span>Header API</span>
</div>
</td>
<td><code>/api/header</code></td>
<td>
<span class="badge" style="background-color: var(--primary-color)">GET</span>
</td>
<td>API to get header data</td>
<td>
<a href="/api/header" class="btn btn-sm btn-outline-primary" target="_blank">
<i class="fas fa-external-link-alt me-1"></i>View
</a>
</td>
</tr>
</tbody>
</table>
</div>
+1 -1
View File
@@ -350,7 +350,7 @@
<div class="card-body p-3">
<div class="row g-2 align-items-center">
<div class="col-md-4">
<label class="form-label small">Icon (FA class)</label>
<label class="form-label small">Icon</label>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
${item.icon ? `<i class="${esc(item.icon)}"></i>` : ''}
+45 -71
View File
@@ -1,11 +1,18 @@
<div class="container">
<div class="d-flex justify-content-between align-items-center mt-4 mb-4">
<div class="d-flex justify-content-between align-items-center mt-4 mb-4 flex-wrap gap-2">
<div>
<h1 class="h3 mb-0" style="color: var(--primary-dark);">
<%= title %>
</h1>
<p class="text-muted mb-0">Edit content displayed on the Home page</p>
</div>
<div class="d-flex gap-2">
<% if (frontendUrl) { %>
<a href="<%= frontendUrl %>" class="btn btn-outline-primary" target="_blank" rel="noopener">
<i class="fas fa-external-link-alt me-2"></i>View Home Page
</a>
<% } %>
</div>
</div>
<div class="row">
@@ -103,8 +110,16 @@
<div class="row g-3">
<div class="col-md-4">
<label class="form-label">Icon (FA class)</label>
<input type="text" class="form-control" id="floatingBadgeIcon"
value="<%= data.hero?.floatingBadge?.icon || '' %>" placeholder="e.g. fa-users">
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (data.hero?.floatingBadge?.icon) { %><i
class="<%= data.hero.floatingBadge.icon %>"></i>
<% } %>
</span>
<input type="text" class="form-control" id="floatingBadgeIcon"
value="<%= data.hero?.floatingBadge?.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-4">
<label class="form-label">Value</label>
@@ -200,13 +215,12 @@
rows="2"><%= data.programs?.description || '' %></textarea>
</div>
</div>
<div class="mt-4">
<div class="d-flex justify-content-between align-items-center mb-2">
<h6 class="mb-0">Program Items</h6>
<button type="button" class="btn btn-outline-primary btn-sm" onclick="addProgramItem()"><i
class="fas fa-plus me-1"></i>Add Program</button>
</div>
<div id="programItemsContainer"></div>
<div class="alert alert-info mt-4 mb-0">
<i class="fas fa-info-circle me-2"></i>
Programs items will automatically display from the Programs table.
<a href="/admin/programme" target="_blank" class="fw-bold ms-1">
<i class="fas fa-external-link-alt me-1"></i>Manage programs
</a>
</div>
</div>
</div>
@@ -272,7 +286,7 @@
let originalFormData = null;
document.addEventListener('DOMContentLoaded', function () {
originalFormData = <%- JSON.stringify(data) %>;
originalFormData = <% - JSON.stringify(data) %>;
populateAll(originalFormData);
document.getElementById('homeForm').addEventListener('submit', function (e) {
@@ -320,7 +334,6 @@
const pr = data.programs || {};
setVal('programsHeading', pr.heading);
setVal('programsDescription', pr.description);
populateProgramItems(pr.items || []);
// Request Info
const ri = data.requestInfo || {};
@@ -423,8 +436,16 @@
<div class="card-body p-3">
<div class="row g-2">
<div class="col-md-2">
<label class="form-label small">Icon (FA class)</label>
<input type="text" class="form-control form-control-sm" data-field="icon" value="${esc(item.icon)}" placeholder="fa-trophy">
<label class="form-label small">Icon</label>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
${item.icon ? `<i class="${esc(item.icon)}"></i>` : ''}
</span>
<input type="text" class="form-control form-control-sm" data-field="icon"
value="${esc(item.icon)}" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-2">
<label class="form-label small">Title</label>
@@ -462,8 +483,16 @@
<div class="card-body p-3">
<div class="row g-2">
<div class="col-md-3">
<label class="form-label small">Icon (FA class)</label>
<input type="text" class="form-control form-control-sm" data-field="icon" value="${esc(item.icon)}" placeholder="fa-laptop-code">
<label class="form-label small">Icon</label>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
${item.icon ? `<i class="${esc(item.icon)}"></i>` : ''}
</span>
<input type="text" class="form-control form-control-sm" data-field="icon"
value="${esc(item.icon)}" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-3">
<label class="form-label small">Title</label>
@@ -524,61 +553,6 @@
items.forEach(item => addValuePropStat(item));
}
// ── Program Items ────────────────────────────────────────────────────────
function addProgramItem(item = {}) {
const idx = Date.now();
const c = document.getElementById('programItemsContainer');
const html = `
<div class="card mb-3 program-item">
<div class="card-body p-3">
<div class="row g-2">
<div class="col-md-3">
<label class="form-label small">Title</label>
<input type="text" class="form-control form-control-sm" data-field="title" value="${esc(item.title)}">
</div>
<div class="col-md-2">
<label class="form-label small">Category</label>
<input type="text" class="form-control form-control-sm" data-field="category" value="${esc(item.category)}">
</div>
<div class="col-md-2">
<label class="form-label small">Duration</label>
<input type="text" class="form-control form-control-sm" data-field="duration" value="${esc(item.duration)}">
</div>
<div class="col-md-1">
<label class="form-label small">Rating</label>
<input type="text" class="form-control form-control-sm" data-field="rating" value="${esc(item.rating)}">
</div>
<div class="col-md-2">
<label class="form-label small">Student Count</label>
<input type="text" class="form-control form-control-sm" data-field="studentCount" value="${esc(item.studentCount)}">
</div>
<div class="col-md-2">
<label class="form-label small">Href</label>
<input type="text" class="form-control form-control-sm" data-field="href" value="${esc(item.href)}">
</div>
<div class="col-md-8">
<label class="form-label small">Description</label>
<input type="text" class="form-control form-control-sm" data-field="description" value="${esc(item.description)}">
</div>
<div class="col-md-4">
<label class="form-label small">Image URL</label>
<div class="input-group input-group-sm">
<input type="text" class="form-control" data-field="image" id="progImg_${idx}" value="${esc(item.image)}">
<button class="btn btn-outline-primary btn-upload-image" type="button" data-target-input="progImg_${idx}" data-image-type="home"><i class="fas fa-upload"></i></button>
</div>
</div>
</div>
<button type="button" class="btn btn-link text-danger btn-sm p-0 mt-2" onclick="this.closest('.program-item').remove()"><i class="fas fa-trash me-1"></i>Remove</button>
</div>
</div>`;
c.insertAdjacentHTML('beforeend', html);
}
function populateProgramItems(items) {
document.getElementById('programItemsContainer').innerHTML = '';
items.forEach(item => addProgramItem(item));
}
// ── Request Info Programs ────────────────────────────────────────────────
function addRequestInfoProgram(val = '') {
const c = document.getElementById('requestInfoProgramsContainer');
+43 -25
View File
@@ -201,12 +201,15 @@
</div>
<div class="col-md-4">
<label class="form-label small">Icon</label>
<select class="form-select course-icon-select">
<option value="">— No icon —</option>
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (course.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (course.icon) { %><i class="<%= course.icon %>"></i><% } %>
</span>
<input type="text" class="form-control course-icon-select"
value="<%= course.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-2 d-flex align-items-end justify-content-end">
<button type="button" class="btn btn-outline-danger btn-sm remove-course">
@@ -269,12 +272,15 @@
</div>
<div class="col-md-5">
<label class="form-label small">Icon</label>
<select class="form-select outcome-icon-select">
<option value="">— No icon —</option>
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (outcome.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (outcome.icon) { %><i class="<%= outcome.icon %>"></i><% } %>
</span>
<input type="text" class="form-control outcome-icon-select"
value="<%= outcome.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff"
onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-1 d-flex align-items-end justify-content-end">
<button type="button" class="btn btn-outline-danger btn-sm remove-outcome"><i class="fas fa-trash"></i></button>
@@ -358,23 +364,23 @@
</div>
<script>
window.PROGRAMME_ICON_OPTIONS = <%- JSON.stringify(iconOptions || []) %>;
// window.PROGRAMME_ICON_OPTIONS = <%- JSON.stringify(iconOptions || []) %>;
function escHtml(s) {
return String(s || '')
.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
}
function iconOptionsHtml(selected) {
var opts = window.PROGRAMME_ICON_OPTIONS;
var html = '<option value="">— No icon —</option>';
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
var sel = (o.value === selected) ? ' selected' : '';
html += '<option value="' + escHtml(o.value) + '"' + sel + '>' + escHtml(o.label) + '</option>';
}
return html;
}
// function iconOptionsHtml(selected) {
// var opts = window.PROGRAMME_ICON_OPTIONS;
// var html = '<option value="">— No icon —</option>';
// for (var i = 0; i < opts.length; i++) {
// var o = opts[i];
// var sel = (o.value === selected) ? ' selected' : '';
// html += '<option value="' + escHtml(o.value) + '"' + sel + '>' + escHtml(o.label) + '</option>';
// }
// return html;
// }
function buildCourseRow(c) {
c = c || {};
@@ -387,7 +393,13 @@
'<div class="col-md-4"><label class="form-label small">Title</label>' +
'<input type="text" class="form-control course-title" value="' + escHtml(c.title) + '"></div>' +
'<div class="col-md-4"><label class="form-label small">Icon</label>' +
'<select class="form-select course-icon-select"><' + 'option value="">— No icon —</' + 'option>' + iconOptionsHtml(c.icon) + '</select></div>' +
'<div class="input-group">' +
'<span class="input-group-text icon-preview-cell" style="min-width:38px">' +
(c.icon ? '<i class="' + escHtml(c.icon) + '"></i>' : '') +
'</span>' +
'<input type="text" class="form-control course-icon-select" value="' + escHtml(c.icon) + '" placeholder="Click to pick..." readonly ' +
'style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">' +
'</div></div>' +
'<div class="col-md-2 d-flex align-items-end justify-content-end">' +
'<button type="button" class="btn btn-outline-danger btn-sm remove-course"><i class="fas fa-trash"></i></button></div>' +
'<div class="col-md-12"><label class="form-label small">Description</label>' +
@@ -407,7 +419,13 @@
'<div class="col-md-6"><label class="form-label small">Title</label>' +
'<input type="text" class="form-control outcome-title" value="' + escHtml(o.title) + '"></div>' +
'<div class="col-md-5"><label class="form-label small">Icon</label>' +
'<select class="form-select outcome-icon-select"><option value="">— No icon —</option>' + iconOptionsHtml(o.icon) + '</select></div>' +
'<div class="input-group">' +
'<span class="input-group-text icon-preview-cell" style="min-width:38px">' +
(o.icon ? '<i class="' + escHtml(o.icon) + '"></i>' : '') +
'</span>' +
'<input type="text" class="form-control outcome-icon-select" value="' + escHtml(o.icon) + '" placeholder="Click to pick..." readonly ' +
'style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">' +
'</div></div>' +
'<div class="col-md-1 d-flex align-items-end justify-content-end">' +
'<button type="button" class="btn btn-outline-danger btn-sm remove-outcome"><i class="fas fa-trash"></i></button></div>' +
'<div class="col-md-12"><label class="form-label small">Description</label>' +
+20 -18
View File
@@ -101,11 +101,14 @@
<div class="row g-2 align-items-end">
<div class="col-md-4">
<label class="form-label small">Icon</label>
<select class="form-select vp-icon-select">
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (vp.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (vp.icon) { %><i class="<%= vp.icon %>"></i><% } %>
</span>
<input type="text" class="form-control vp-icon-select"
value="<%= vp.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-7">
<label class="form-label small">Title</label>
@@ -273,7 +276,7 @@
}
}
window.REQUEST_INFO_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
// window.REQUEST_INFO_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
function escapeHtml(s) {
return String(s || '')
@@ -283,24 +286,23 @@
.replace(/"/g, '&quot;');
}
function iconOptionsHtml(selected) {
var opts = window.REQUEST_INFO_ICON_OPTIONS || [];
var html = '';
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
var sel = (o.value === selected) ? ' selected' : '';
html += '<option value="' + escapeHtml(o.value) + '"' + sel + '>' + escapeHtml(o.label) + '</option>';
}
return html;
}
// function iconOptionsHtml(selected) {
// var opts = window.REQUEST_INFO_ICON_OPTIONS || [];
// var html = '';
// for (var i = 0; i < opts.length; i++) {
// var o = opts[i];
// var sel = (o.value === selected) ? ' selected' : '';
// html += '<option value="' + escapeHtml(o.value) + '"' + sel + '>' + escapeHtml(o.label) + '</option>';
// }
// return html;
// }
function buildValuePropRow(vp) {
vp = vp || {};
var iconSel = '<select class="form-select vp-icon-select">' + iconOptionsHtml(vp.icon) + '</select>';
return (
'<div class="card vp-row border"><div class="card-body">' +
'<div class="row g-2 align-items-end">' +
'<div class="col-md-4"><label class="form-label small">Icon</label>' + iconSel + '</div>' +
'<div class="col-md-4"><label class="form-label small">Icon</label>' + iconPickerInput('vp-icon-select', vp.icon) + '</div>' +
'<div class="col-md-7"><label class="form-label small">Title</label>' +
'<input type="text" class="form-control vp-title" value="' + escapeHtml(vp.title) + '"></div>' +
'<div class="col-md-1 d-flex align-items-end justify-content-end">' +
+38 -30
View File
@@ -137,19 +137,25 @@
<div class="row g-2">
<div class="col-md-4">
<label class="form-label small">Icon</label>
<select class="form-select svc-icon-select">
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (svc.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (svc.icon) { %><i class="<%= svc.icon %>"></i><% } %>
</span>
<input type="text" class="form-control ch-icon"
value="<%= svc.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-4">
<label class="form-label small">Hours icon</label>
<select class="form-select svc-hours-icon-select">
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (svc.hoursIcon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (svc.hoursIcon) { %><i class="<%= svc.hoursIcon %>"></i><% } %>
</span>
<input type="text" class="form-control ch-icon"
value="<%= svc.hoursIcon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-4 d-flex align-items-end justify-content-end">
<button type="button" class="btn btn-outline-danger btn-sm remove-service"><i class="fas fa-trash"></i></button>
@@ -205,11 +211,14 @@
<div class="row g-2 align-items-end">
<div class="col-md-3">
<label class="form-label small">Icon</label>
<select class="form-select ch-icon-select">
<% iconOptions.forEach(function(opt) { %>
<option value="<%= opt.value %>" <%= (ch.icon === opt.value) ? 'selected' : '' %>><%= opt.label %></option>
<% }); %>
</select>
<div class="input-group">
<span class="input-group-text icon-preview-cell" style="min-width:38px">
<% if (ch.icon) { %><i class="<%= ch.icon %>"></i><% } %>
</span>
<input type="text" class="form-control ch-icon"
value="<%= ch.icon || '' %>" placeholder="Click to pick..." readonly
style="cursor:pointer;background:#fff" onclick="IconPicker.open(this)">
</div>
</div>
<div class="col-md-3">
<label class="form-label small">Title</label>
@@ -314,7 +323,7 @@
}
}
window.STUDENT_SUPPORT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
// window.STUDENT_SUPPORT_ICON_OPTIONS = <%- JSON.stringify(iconOptions) %>;
function escapeHtml(s) {
return String(s || '')
@@ -324,16 +333,16 @@
.replace(/"/g, '&quot;');
}
function iconOptionsHtml(selected) {
var opts = window.STUDENT_SUPPORT_ICON_OPTIONS || [];
var html = '';
for (var i = 0; i < opts.length; i++) {
var o = opts[i];
var sel = (o.value === selected) ? ' selected' : '';
html += '<option value="' + escapeHtml(o.value) + '"' + sel + '>' + escapeHtml(o.label) + '</option>';
}
return html;
}
// function iconOptionsHtml(selected) {
// var opts = window.STUDENT_SUPPORT_ICON_OPTIONS || [];
// var html = '';
// for (var i = 0; i < opts.length; i++) {
// var o = opts[i];
// var sel = (o.value === selected) ? ' selected' : '';
// html += '<option value="' + escapeHtml(o.value) + '"' + sel + '>' + escapeHtml(o.label) + '</option>';
// }
// return html;
// }
function buildServiceRow(svc) {
svc = svc || {};
@@ -343,8 +352,8 @@
'<div class="card service-row border">' +
'<div class="card-body">' +
'<div class="row g-2">' +
'<div class="col-md-4"><label class="form-label small">Icon</label>' + iconSel + '</div>' +
'<div class="col-md-4"><label class="form-label small">Hours icon</label>' + hoursIconSel + '</div>' +
'<div class="col-md-4"><label class="form-label small">Icon</label>' + iconPickerInput('svc-icon-select', svc.icon) + '</div>' +
'<div class="col-md-4"><label class="form-label small">Hours icon</label>' + iconPickerInput('svc-hours-icon-select', svc.hoursIcon) + '</div>' +
'<div class="col-md-4 d-flex align-items-end justify-content-end">' +
'<button type="button" class="btn btn-outline-danger btn-sm remove-service"><i class="fas fa-trash"></i></button>' +
'</div>' +
@@ -364,11 +373,10 @@
function buildChannelRow(ch) {
ch = ch || {};
var iconSel = '<select class="form-select ch-icon-select">' + iconOptionsHtml(ch.icon) + '</select>';
return (
'<div class="card channel-row border"><div class="card-body py-2">' +
'<div class="row g-2 align-items-end">' +
'<div class="col-md-3"><label class="form-label small">Icon</label>' + iconSel + '</div>' +
'<div class="col-md-3"><label class="form-label small">Icon</label>' + iconPickerInput('ch-icon-select', ch.icon) + '</div>' +
'<div class="col-md-3"><label class="form-label small">Title</label>' +
'<input type="text" class="form-control ch-title" value="' + escapeHtml(ch.title) + '"></div>' +
'<div class="col-md-5"><label class="form-label small">Detail</label>' +
+2 -2
View File
@@ -5,7 +5,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
<%= title %> | CMS-SIMS
<%= title %> | CMS-LAMS
</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
@@ -157,7 +157,7 @@
</div>
<div style="text-align: center; margin-bottom: 20px;">
<h4 style="color: var(--primary-color); font-weight: 600; margin-bottom: 5px;">CMS Management System</h4>
<h4 style="color: var(--primary-color); font-weight: 600; margin-bottom: 5px;">Content Management System</h4>
<p style="color: var(--text-color); font-size: 13px;">Welcome to Content Management System</p>
</div>
+17
View File
@@ -1,4 +1,21 @@
<!-- Hero Section -->
<style>
.hero {
padding: 3rem 2rem;
}
@media (min-width: 768px) {
.hero {
padding: 4rem 6rem;
}
}
@media (min-width: 992px) {
.hero {
padding: 5rem 10rem;
}
}
</style>
<section class="container">
<div class="hero"
style="background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); color: white; border-radius: 20px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); margin-top: 2rem; overflow: hidden; position: relative;">
+39 -22
View File
@@ -6,7 +6,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= typeof title !=='undefined' ? title + ' | ' : '' %>CMS.HAILearning
<%= typeof title !=='undefined' ? title + ' | ' : '' %>CMS.LAMS
</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" />
@@ -1024,13 +1024,16 @@
<nav class="navbar navbar-expand-lg navbar-light sticky-top">
<div class="container">
<a class="navbar-brand d-flex align-items-center" href="/">
<img src="/img/logo/logo-hai-learning.png" alt="Logo" style="
width: 45px;
height: 45px;
border-radius: 50%;
margin-right: 10px;
" />
CMS.HAILearning
<img src="/img/logo/logo.jpg" alt="Logo" style="
width: 45px;
height: 45px;
border-radius: 50%;
margin-right: 10px;
" />
<div class="d-flex flex-column" style="line-height: 1.1;">
<span style="font-weight: 700; font-size: 1rem; color: var(--primary-color);">LAMS</span>
<span style="font-size: 0.65rem; color: #6c757d; letter-spacing: 0.08em;">CONTENT MANAGEMENT</span>
</div>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
@@ -1069,14 +1072,33 @@
About
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item <%= currentPath === '/admin/about' ? 'active' : '' %>" href="/admin/about">About Us</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/partnerships' ? 'active' : '' %>" href="/admin/partnerships">Partnerships</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/history' ? 'active' : '' %>" href="/admin/history">History</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/accreditation' ? 'active' : '' %>" href="/admin/accreditation">Accreditation</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/admissions' ? 'active' : '' %>" href="/admin/admissions">Admissions</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/policies' ? 'active' : '' %>" href="/admin/policies">Policies</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/about' ? 'active' : '' %>"
href="/admin/about">About Us</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/partnerships' ? 'active' : '' %>"
href="/admin/partnerships">Partnerships</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/history' ? 'active' : '' %>"
href="/admin/history">History</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/accreditation' ? 'active' : '' %>"
href="/admin/accreditation">Accreditation</a></li>
<li><a class="dropdown-item <%= currentPath === '/admin/policies' ? 'active' : '' %>"
href="/admin/policies">Policies</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/programme">Programmes</a>
</li>
<li class="nav-item">
<a class="nav-link <%= currentPath === '/admin/student-support' ? 'active' : '' %>"
href="/admin/student-support">Student Support</a>
</li>
<li class="nav-item">
<a class="nav-link <%= currentPath === '/admin/admissions' ? 'active' : '' %>"
href="/admin/admissions">Admissions</a>
</li>
<li class="nav-item">
<a class="nav-link <%= currentPath === '/admin/blog' ? 'active' : '' %>" href="/admin/blog">Blog</a>
</li>
@@ -1084,13 +1106,8 @@
<a class="nav-link <%= currentPath === '/admin/contact' ? 'active' : '' %>" href="/admin/contact">Contact
Us</a>
</li>
<li class="nav-item">
<a class="nav-link <%= currentPath === '/admin/student-support' ? 'active' : '' %>"
href="/admin/student-support">Student Support</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/admin/programme">Programmes</a>
</li>
<li class="nav-item">
<a class="nav-link <%= currentPath === '/admin/audit-logs' ? 'active' : '' %>"
href="/admin/audit-logs">Audit Log
@@ -1502,4 +1519,4 @@
<%- script %>
</body>
</html>
</html>