refactor: update btn on/off tab in home page

This commit is contained in:
Đỗ Minh Nhật
2026-04-10 03:29:00 +07:00
parent fb951cb6ce
commit 48a230105c
11 changed files with 228 additions and 95 deletions

View File

@@ -27,6 +27,9 @@ const HeroSlideSchema = new Schema(
const HeroSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
// Background for whole hero section
backgroundImage: { type: String, default: "" },
@@ -56,6 +59,9 @@ const WhyChooseUsItemSchema = new Schema(
const WhyChooseUsSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
description: { type: String, default: "" },
@@ -81,6 +87,9 @@ const VisaSolutionItemSchema = new Schema(
const VisaSolutionsSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
items: { type: [VisaSolutionItemSchema], default: [] },
@@ -101,6 +110,9 @@ const VisaCountrySchema = new Schema(
const VisaCountriesSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
description: { type: String, default: "" },
@@ -124,6 +136,9 @@ const TestimonialSchema = new Schema(
const TestimonialsSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
videoUrl: { type: String, default: "" },
@@ -135,6 +150,9 @@ const TestimonialsSchema = new Schema(
const VideoGallerySchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
videoUrl: { type: String, default: "" },
thumbnail: { type: String, default: "" },
@@ -152,6 +170,9 @@ const FaqItemSchema = new Schema(
const FaqSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
description: { type: String, default: "" },
@@ -173,6 +194,9 @@ const AchievementItemSchema = new Schema(
const AchievementsSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
items: { type: [AchievementItemSchema], default: [] },
@@ -212,6 +236,9 @@ const BrandsSchema = new Schema(
const PartnersSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
visaConsultancy: { type: VisaConsultancySchema, default: () => ({}) },
brands: { type: BrandsSchema, default: () => ({}) },
},
@@ -237,6 +264,9 @@ const BlogPreviewItemSchema = new Schema(
const BlogPreviewSchema = new Schema(
{
// Toggle visibility on frontend
enabled: { type: Boolean, default: true },
heading: { type: String, default: "" },
subheading: { type: String, default: "" },
ctaButton: { type: LinkSchema, default: () => ({}) },