diff --git a/models/home.js b/models/home.js index 09d3d52..736b683 100644 --- a/models/home.js +++ b/models/home.js @@ -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: () => ({}) }, diff --git a/views/admin/home/sections/achievements.ejs b/views/admin/home/sections/achievements.ejs index 28f4bd5..95b1942 100644 --- a/views/admin/home/sections/achievements.ejs +++ b/views/admin/home/sections/achievements.ejs @@ -3,8 +3,17 @@