Merged in feat/LOY-361-Promo-Campaign-Hero (pull request #2857)
Feat(LOY-363): Promo Campaign Hero * feat(LOY-361): Add Promo Campaign Hero * feat(LOY-361): auth cta's wip * fix(LOY-361): improve hero card css * fix(LOY-361): correct size for button * fix(LOY-361): Make Promo Hero Required * fix(LOY-361): semantic css classes Approved-by: Matilda Landström
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { transformedImageVaultAssetSchema } from "@scandic-hotels/common/utils/imageVault"
|
||||
import { nullableStringValidator } from "@scandic-hotels/common/utils/zod/stringValidator"
|
||||
|
||||
import { systemSchema } from "../schemas/system"
|
||||
@@ -9,12 +10,22 @@ export const CAMPAIGN_TYPES = {
|
||||
POINT: "POINT",
|
||||
} as const
|
||||
|
||||
export const promoHeroSchema = z.object({
|
||||
image: transformedImageVaultAssetSchema,
|
||||
heading: z.string(),
|
||||
benefits: z
|
||||
.array(z.string())
|
||||
.nullish()
|
||||
.transform((data) => data || []),
|
||||
})
|
||||
|
||||
export const promoCampaignPageSchema = z
|
||||
.object({
|
||||
promo_campaign_page: z.object({
|
||||
title: z.string(),
|
||||
heading: z.string(),
|
||||
subheading: z.string().nullish(),
|
||||
promo_hero: promoHeroSchema,
|
||||
page_settings: z
|
||||
.object({
|
||||
booking_code: z.string().nullish(),
|
||||
|
||||
Reference in New Issue
Block a user