add homepage management

This commit is contained in:
root
2026-05-07 00:34:29 -04:00
parent 750ae56a29
commit c4a45c8b21
33 changed files with 4228 additions and 418 deletions
+4
View File
@@ -25,6 +25,7 @@ export type PublicSiteDictionary = {
heroTitleFallback: string
heroDescription: string
viewOffers: string
viewPricing: string
contactCompany: string
heroImageMissing: string
activeOffers: string
@@ -261,6 +262,7 @@ const dictionaries: Record<PublicSiteLanguage, PublicSiteDictionary> = {
heroTitleFallback: 'Book directly with the rental company.',
heroDescription: 'This branded site handles booking and payment directly. Marketplace discovery routes renters here for checkout.',
viewOffers: 'View offers',
viewPricing: 'View pricing',
contactCompany: 'Contact company',
heroImageMissing: 'Hero image not configured yet.',
activeOffers: 'Active offers',
@@ -507,6 +509,7 @@ const dictionaries: Record<PublicSiteLanguage, PublicSiteDictionary> = {
heroTitleFallback: "Réservez directement auprès de l'entreprise de location.",
heroDescription: 'Ce site de marque gère directement la réservation et le paiement. La découverte sur la marketplace redirige les locataires ici pour finaliser la commande.',
viewOffers: 'Voir les offres',
viewPricing: 'Voir les tarifs',
contactCompany: "Contacter l'entreprise",
heroImageMissing: "L'image principale n'est pas encore configurée.",
activeOffers: 'Offres actives',
@@ -753,6 +756,7 @@ const dictionaries: Record<PublicSiteLanguage, PublicSiteDictionary> = {
heroTitleFallback: 'احجز مباشرة مع شركة التأجير.',
heroDescription: 'هذا الموقع المخصص للعلامة التجارية يدير الحجز والدفع مباشرة. الاكتشاف عبر المنصة يحول المستأجرين إلى هنا لإتمام الحجز.',
viewOffers: 'عرض العروض',
viewPricing: 'عرض الأسعار',
contactCompany: 'التواصل مع الشركة',
heroImageMissing: 'لم يتم إعداد صورة رئيسية بعد.',
activeOffers: 'العروض النشطة',
+29
View File
@@ -0,0 +1,29 @@
import {
clonePublicSitePageSections,
type PublicSitePageSections,
} from '@rentaldrivego/types'
type MaybePageSections = {
pageSections?: Partial<PublicSitePageSections> | null
} | null | undefined
export function resolvePageSectionsConfig(menuConfig: MaybePageSections): PublicSitePageSections {
const defaults = clonePublicSitePageSections()
const custom = menuConfig?.pageSections ?? {}
return {
home: { ...defaults.home, ...(custom.home ?? {}) },
about: { ...defaults.about, ...(custom.about ?? {}) },
offers: { ...defaults.offers, ...(custom.offers ?? {}) },
pricing: { ...defaults.pricing, ...(custom.pricing ?? {}) },
vehicles: { ...defaults.vehicles, ...(custom.vehicles ?? {}) },
vehicleDetail: { ...defaults.vehicleDetail, ...(custom.vehicleDetail ?? {}) },
blog: { ...defaults.blog, ...(custom.blog ?? {}) },
contact: { ...defaults.contact, ...(custom.contact ?? {}) },
booking: { ...defaults.booking, ...(custom.booking ?? {}) },
bookingConfirmation: {
...defaults.bookingConfirmation,
...(custom.bookingConfirmation ?? {}),
},
}
}