feat(cms): enhance content editors and implement automatic ID generation

Improve the CMS administration interface across multiple pages (Accreditation, Admissions, History, Partnerships, and Policies) with a focus on usability and data integrity.
Key changes include:
- Implement `ensureUniqueIds` utility to automatically generate and maintain unique slugs for content items, removing the need for manual ID entry in the UI.
- Refactor the Admissions calculator to support detailed per-option editing via a new dedicated view and routes.
- Replace basic datalists with a custom, searchable icon combobox component for better visual selection.
- Update `_renderSingletonPageView` to handle active tab persistence via query parameters.
- Streamline editor configurations by removing redundant fields and improving help text.
- Enhance the Admissions "Key Dates" editor with a dynamic table interface for managing columns and rows.
- Normalize data payloads in controllers to ensure consistent API responses and internal linking.
This commit is contained in:
Tống Thành Đạt
2026-04-21 12:37:19 +07:00
parent 122df1a46e
commit 5d0fae6d51
30 changed files with 2174 additions and 477 deletions
+1 -17
View File
@@ -1,20 +1,4 @@
{
"trustBanner": {
"icon": "fa-shield-check",
"text": "All our programs are rigorously evaluated and internationally recognized.",
"links": [
{
"label": "Verify Status",
"href": "#accreditations-grid",
"icon": "fa-magnifying-glass"
},
{
"label": "View Legal Disclaimers",
"href": "#accreditations-grid",
"icon": ""
}
]
},
"hero": {
"badge": "Accreditation Save Check",
"title": "ACCREDITATION AND RECOGNITION",
@@ -91,4 +75,4 @@
}
]
}
}
}
+109 -57
View File
@@ -1,29 +1,29 @@
{
"hero": {
"badge": "Your Path Starts Here",
"title": "Admissions & Transparent Tuition",
"description": "We believe high-quality education should be accessible to everyone. Explore our straightforward admissions process and flexible payment models designed to fit your life.",
"badge": "Your Path Starts HereYour Path Starts He",
"title": "Admissions & Transparent TuitionAdmissions & Transparent TuitionAdmissions & Tra",
"description": "We believe high-quality education should be accessible to everyone. Explore our straightforward admissions process and flexible payment models designed to fit your life.We believe high-quality education should be accessible to everyone. Exp",
"primaryCta": {
"label": "Start Application",
"label": "Start ApplicationStart ApplicationStart ApplicationStart App",
"href": "http://localhost:3001/admin/admissions"
},
"secondaryCta": {
"label": "View Tuition",
"label": "View TuitionView TuitionView TuitionView TuitionView Tuition",
"href": "http://localhost:3001/admin/admissions"
},
"image": "/uploads/admissions/hero-students.png",
"imageAlt": "Diverse adult students studying online"
"image": "/uploads/admissions/Colorful_Square_Background.png",
"imageAlt": "View TuitionView TuitionView TuitionView TuitionView TuitionView TuitionView TuitionView TuitionView TuitionView Tuition"
},
"process": {
"id": "admissions-process",
"title": "Admissions Process",
"description": "Our streamlined process gets you from application to enrolled in days, not months. No application fees, no standardized tests.",
"title": "Admissions ProcessAdmissions ProcessAdmissions ProcessAdmiss",
"description": "Our streamlined process gets you from application to enrolled in days, not months. No application fees, no standardized tests.Our streamlined process gets you from application to e",
"steps": [
{
"number": "01",
"title": "Send Transcripts",
"description": "Request official transcripts from previous institutions for credit evaluation.",
"active": false
"active": true
},
{
"number": "02",
@@ -41,52 +41,53 @@
},
"eligibility": {
"id": "eligibility",
"title": "Eligibility & Transfer Credits",
"title": "Eligibility & Transfer CreditsEligibility & Transfer Credits",
"cards": [
{
"title": "Basic Eligibility",
"title": "Basic EligibilityBasic EligibilityBasic Eligibilit",
"icon": "fa-check-circle",
"items": [
"High school diploma or equivalent",
"Minimum 2.0 GPA for transfer students",
"English proficiency if applicable"
"High school diploma or equivalentHigh school diploma or equivalentHigh school diploma or equivalentHigh school diploma o",
"Minimum 2.0 GPA for transfer studentsMinimum 2.0 GPA for transfer studentsMinimum 2.0 GPA for transfer studentsMinimum 2",
"English proficiency if applicableEnglish proficiency if applicableEnglish proficiency if applicableEnglish proficiency i"
]
},
{
"title": "Transfer Policy",
"title": "Transfer PolicyTransfer PolicyTransfer PolicyTrans",
"icon": "fa-exchange-alt",
"items": [
"Up to 90 credits accepted for Bachelor's",
"Free unofficial evaluation within 48 hours",
"Credit for prior learning and certifications"
"Up to 90 credits accepted for Bachelor'sUp to 90 credits accepted for Bachelor'sUp to 90 credits accepted for Bachelor's",
"Free unofficial evaluation within 48 hoursFree unofficial evaluation within 48 hoursFree unofficial evaluation within 48",
"Credit for prior learning and certificationsCredit for prior learning and certificationsCredit for prior learning and ce"
]
}
]
},
"tuition": {
"id": "tuition-breakdown",
"title": "Tuition Breakdown",
"chartTitle": "Savings vs. Traditional University",
"chartDescription": "Estimated total cost for a 4-year degree",
"title": "Tuition BreakdownTuition BreakdownTuition BreakdownTuition B",
"chartTitle": "Savings vs. Traditional UniversitySavings vs. Traditional Un",
"chartDescription": "Estimated total cost for a 4-year degreeEstimated total cost for a 4-year degreeEstimated total cost for a 4-year degreeEstimated total cost",
"series": [
{
"label": "Traditional University",
"color": "#0F172A",
"color": "#850f0f",
"values": [
25000,
50000,
75000,
100000
49998,
30000,
100000,
120000
]
},
{
"label": "LAMS",
"color": "#c49b27",
"color": "#a700b3",
"values": [
3588,
7176,
10764,
14352
10000
]
}
]
@@ -95,61 +96,112 @@
"id": "key-dates",
"title": "Key Dates & Deadlines",
"columns": [
"Term",
"Application Deadline",
"Classes Start"
{
"id": "Term",
"label": "Term"
},
{
"id": "Application-Deadline",
"label": "Application Deadline"
},
{
"id": "Classes-Start",
"label": "Classes Start"
},
{
"id": "column-4",
"label": "Column 4"
}
],
"rows": [
{
"term": "Fall Term 1",
"applicationDeadline": "August 15, 2026",
"classesStart": "September 1, 2026"
"id": "row-1",
"cells": [
"Fall Term 1",
"August 15, 2026August 15, 2026August 15, 2026August 15, 2026",
"September 1, 2026September 1, 2026September 1, 2026September",
"September 1, 2026September 1, 2026September 1, 2026September"
]
},
{
"term": "Fall Term 2",
"applicationDeadline": "October 15, 2026",
"classesStart": "November 1, 2026"
"id": "row-2",
"cells": [
"Fall Term 2",
"October 15, 2026October 15, 2026October 15, 2026October 15, ",
"November 1, 2026November 1, 2026November 1, 2026November 1, ",
"September 1, 2026September 1, 2026September 1, 2026September"
]
},
{
"term": "Spring Term 1",
"applicationDeadline": "December 15, 2026",
"classesStart": "January 5, 2027"
"id": "row-3",
"cells": [
"Spring Term 1",
"December 15, 2026December 15, 2026December 15, 2026December ",
"January 5, 2027",
"September 1, 2026September 1, 2026September 1, 2026September"
]
}
]
},
"calculator": {
"title": "Affordability Calculator",
"description": "Estimate your monthly investment.",
"modelOptions": [
"Subscription",
"Per Course"
],
"paceLabel": "Target Pace",
"minPaceLabel": "Relaxed",
"maxPaceLabel": "Accelerated",
"resultLabel": "Estimated Monthly Payment",
"monthlyAmount": "$299",
"monthlySuffix": "/mo",
"noteIcon": "fa-bolt",
"note": "Flat rate, unlimited courses",
"cta": {
"label": "Apply Now",
"href": "#apply"
}
},
"options": [
{
"id": "subscription",
"label": "Subscription",
"paceLabel": "Target PaceTarget PaceTarget P",
"minPaceLabel": "RelaxedRelaxedRelaxe",
"maxPaceLabel": "AcceleratedAccelerat",
"resultLabel": "Estimated Monthly PaymentEstimated Month",
"monthlyAmount": "5000000",
"monthlySuffix": "/mo",
"noteIcon": "fa-bolt",
"note": "Flat rate, unlimited coursesFlat rate, unlimited coursesFlat"
},
{
"id": "per-course",
"label": "Per Course",
"paceLabel": "Target Pace",
"minPaceLabel": "Relaxed",
"maxPaceLabel": "Accelerated",
"resultLabel": "Estimated Monthly Payment",
"monthlyAmount": "500",
"monthlySuffix": "/mo",
"noteIcon": "fa-bolt",
"note": "Flat rate, unlimited courses"
},
{
"id": "d-course",
"label": "D Course",
"paceLabel": "Target Pace",
"minPaceLabel": "Relaxed",
"maxPaceLabel": "Accelerated",
"resultLabel": "Estimated Monthly Payment",
"monthlyAmount": "500",
"monthlySuffix": "/mo",
"noteIcon": "fa-bolt",
"note": "Flat rate, unlimited courses"
}
]
},
"scholarships": {
"title": "Scholarships & Aid",
"icon": "fa-award",
"items": [
{
"title": "Working Adult Grant",
"amount": "Up to $1,500",
"description": "For students employed full-time while studying."
"title": "Working Adult GrantWorking Adult GrantWorking Adul",
"amount": "Up to $1,500Up to $1,500",
"description": "For students employed full-time while studying.For students employed full-time while studying.For students employed full-time while studying.For students employ"
},
{
"title": "Military Discount",
"amount": "15% Off",
"description": "Active duty, veterans, and spouses."
"description": "For students employed full-time while studying.For students employed full-time while studying.For students employed full-time while studying.For students employ"
}
]
}
+26 -16
View File
@@ -1,24 +1,22 @@
{
"highlight": {
"icon": "fa-trophy",
"text": "History Save Check",
"linkLabel": "Read Full Story",
"href": "#timeline-content"
"icon": "fa-magnifying-glass",
"text": "2025 Milestone Reached: A Rapidly Growing Global Community!2025 Milestone Reached: A Rapidly Growing Global Co",
"linkLabel": "Read Full StoryRead Full Story",
"href": "/admin/history"
},
"hero": {
"badge": "Our Journey",
"title": "Building the Future of Education.",
"description": "From our humble beginnings to becoming a global leader in online education, explore the key moments that define our legacy."
"badge": "Our JourneyOur JourneyOur JourneyOur Jou",
"title": "Building the Future of Education.Building the Future of Education.Building the Future of E",
"description": "From our humble beginnings to becoming a global leader in online education, explore the key moments that define our legacy.From our humble beginnings to becoming a global leader in online education, explore the key momen"
},
"filters": {
"yearLabel": "Decade / Year",
"categoryLabel": "Category",
"buttonLabel": "Apply Filters",
"yearOptions": [
"All Years",
"2020 - Present",
"2010 - 2019",
"2005 - 2009"
"2005 - 2009",
"2015 - 2019"
],
"categoryOptions": [
"All Categories",
@@ -30,7 +28,6 @@
]
},
"timeline": {
"loadMoreLabel": "Load Earlier Milestones",
"items": [
{
"id": "student-experience-innovation",
@@ -40,7 +37,7 @@
"categoryLabel": "Student Experience",
"title": "Innovation in Student Experience",
"description": "Enhanced student support through integrated digital services, academic advising, and career development platforms.",
"image": "/uploads/history/2026.png",
"image": "/uploads/history/Colorful_Square_Background.png",
"imageAlt": "",
"stats": [],
"featured": true
@@ -53,7 +50,7 @@
"categoryLabel": "Global",
"title": "Expansion of International Partnerships",
"description": "Established collaborations with academic institutions and industry partners across regions, enabling dual qualifications and cross-border learning opportunities.",
"image": "/uploads/history/2025.png",
"image": "/uploads/history/7281.jpg",
"imageAlt": "",
"stats": [],
"featured": false
@@ -92,11 +89,24 @@
"categoryLabel": "Academic",
"title": "Strategic Academic Framework Introduced",
"description": "Established a future-focused academic model aligned with international standards, integrating applied learning, digital competencies, and global perspectives.",
"image": "/uploads/history/2023.png",
"image": "/uploads/history/7281.jpg",
"imageAlt": "",
"stats": [],
"featured": false
},
{
"id": "strategic-academic-framework",
"year": "2027",
"yearRange": "2020 - Present",
"category": "All Categories",
"categoryLabel": "Academic",
"title": "Strategic Academic Framework Introduced",
"description": "Established a future-focused academic model aligned with international standards, integrating applied learning, digital competencies, and global perspectives.",
"image": "/uploads/history/kVI17_2B.webp",
"imageAlt": "aaa",
"stats": [],
"featured": true
}
]
}
}
}
+3 -5
View File
@@ -18,7 +18,6 @@
"hehehehehehehehehehehehehehehe",
"hehehehehehehhehehehehehehhehe"
],
"loadMoreLabel": "Load More PartnersLoad More PartnersLoad",
"partners": [
{
"id": "techvanguardtechvanguardtechvanguardtechvanguardte",
@@ -102,7 +101,7 @@
"placeholder": "Partnership InquiryPartnership InquiryPa",
"type": "text",
"width": "half",
"required": true,
"required": false,
"options": []
},
{
@@ -146,7 +145,6 @@
"required": true,
"options": []
}
],
"submitLabel": "Partnership InquiryPartnership InquiryPa"
]
}
}
}
+9 -1
View File
@@ -5,7 +5,7 @@
"titlePrefix": "Our Commitment to",
"titleHighlight": "Transparency",
"description": "Review our policies, terms of service, and commitments to privacy and accessibility. We believe in clear, straightforward communication with our academic community.",
"lastUpdated": "Last updated: April 20, 2026"
"lastUpdated": "Last updated: April 21, 2026"
},
"sidebar": {
"heading": "Policies",
@@ -173,6 +173,14 @@
]
}
]
},
{
"navLabel": "hehehe",
"title": "hehehe",
"effectiveDate": "hehehe",
"intro": "hehehe",
"id": "hehehe",
"sections": []
}
]
}