Merged in feat/LOY-361-add-promo-campaign-page-type (pull request #2826)

Feat/LOY-361 add promo campaign page type

* feat(LOY-361): add Pomo Campaign page type

* chore(SW-361): remove campaign page flag

* fix(LOY-361): cleanup

* fix(LOY-361): add promo code


Approved-by: Erik Tiekstra
Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
Matilda Landström
2025-09-19 07:20:17 +00:00
parent c791fef2c6
commit 0e30a2d218
34 changed files with 613 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
import { generateTag, generateTagsFromSystem } from "../../../utils/generateTag"
import type { Lang } from "@scandic-hotels/common/constants/language"
import type { PromoCampaignPageRefs } from "../../../types/promoCampaignPage"
import type { System } from "../schemas/system"
export function generatePageTags(
validatedData: PromoCampaignPageRefs,
lang: Lang
): string[] {
const connections = getConnections(validatedData)
return [
generateTagsFromSystem(lang, connections),
generateTag(lang, validatedData.promo_campaign_page.system.uid),
].flat()
}
export function getConnections({ promo_campaign_page }: PromoCampaignPageRefs) {
const connections: System["system"][] = [promo_campaign_page.system]
return connections
}