diff --git a/src/api/routes/breadcrumbs/controller.ts b/src/api/routes/breadcrumbs/controller.ts index 6cef11c..f959145 100644 --- a/src/api/routes/breadcrumbs/controller.ts +++ b/src/api/routes/breadcrumbs/controller.ts @@ -57,6 +57,17 @@ const showProgramsPageBreadcrumbs: BreadcrumbsType[] = [ { href: PAGE_LINK.SHOW_PROGRAMS, label: PAGE_LINK_LABEL[PAGE_LINK.SHOW_PROGRAMS] }, ]; +const themedCombosPageBreadcrumbs: BreadcrumbsType[] = [ + { href: PAGE_LINK.HOME, label: PAGE_LINK_LABEL[PAGE_LINK.HOME] }, + { label: PAGE_LINK_LABEL[PAGE_LINK.SERVICES] }, + { href: PAGE_LINK.THEMED_COMBOS, label: PAGE_LINK_LABEL[PAGE_LINK.THEMED_COMBOS] }, +]; + +const pricePageBreadcrumbs: BreadcrumbsType[] = [ + { href: PAGE_LINK.HOME, label: PAGE_LINK_LABEL[PAGE_LINK.HOME] }, + { href: PAGE_LINK.PRICE, label: PAGE_LINK_LABEL[PAGE_LINK.PRICE] }, +]; + export const getBreadcrumbs = (req: Request, res: Response) => { // @ts-ignore const { page } = req.body; @@ -98,6 +109,14 @@ export const getBreadcrumbs = (req: Request, res: Response) => { return res.status(200).json(showProgramsPageBreadcrumbs); } + case PAGE_LINK.PRICE: { + return res.status(200).json(pricePageBreadcrumbs); + } + + case PAGE_LINK.THEMED_COMBOS: { + return res.status(200).json(themedCombosPageBreadcrumbs); + } + default: return res.status(404); } diff --git a/src/api/routes/faq/controller.ts b/src/api/routes/faq/controller.ts index 3605945..c1d47d3 100644 --- a/src/api/routes/faq/controller.ts +++ b/src/api/routes/faq/controller.ts @@ -108,6 +108,25 @@ const showPragramsQuestions: QuestionType[] = [ }, ]; +const themedCombosQuestions: QuestionType[] = [ + { + answer: 'Ответ на вопрос как забронировать зал для проведения выездного праздника?', + id: uuid(), + question: 'Как забронировать зал для проведения Дня рождения?', + }, + { + answer: 'Мы не требуем предоплату. Для бронирования мероприятия достаточно Вашего номера телефона. ' + + 'Мероприятие оплачивается на месте перед его началом.', + id: uuid(), + question: 'Как производится оплата мероприятия?', + }, + { + answer: 'Ответ на вопрос какое максимальное количество детей допустимо на празднике?', + id: uuid(), + question: 'Какое максимальное количество детей допустимо на празднике?', + }, +]; + type QuestionsType = { categories: QuestionCategoryType[]; group: string; @@ -139,6 +158,10 @@ export const getFaq = (req: Request, res: Response) => { return res.status(200).json(showPragramsQuestions); } + case PAGE_LINK.THEMED_COMBOS: { + return res.status(200).json(themedCombosQuestions); + } + case PAGE_LINK.QUESTS: { switch (id) { case 'eger': diff --git a/src/api/routes/halls/controller.ts b/src/api/routes/halls/controller.ts index 172494e..2134eef 100644 --- a/src/api/routes/halls/controller.ts +++ b/src/api/routes/halls/controller.ts @@ -1,6 +1,7 @@ import * as path from 'path'; import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; const imageRootDir = 'static/images/information/halls/'; @@ -10,17 +11,37 @@ const Hall3Image = path.join(imageRootDir, 'hall3.jpg'); export type HallType = { area: number; + id: string; img: { alt: string; src: string; }; name: string; + price: number; }; const halls: HallType[] = [ - { area: 25, img: { alt: 'Средний Зал', src: Hall1Image }, name: 'Средний Зал' }, - { area: 50, img: { alt: 'Большой Зал', src: Hall2Image }, name: 'Большой Зал' }, - { area: 60, img: { alt: 'Зал Лофт', src: Hall3Image }, name: 'Зал Лофт' }, + { + area: 25, + id: uuid(), + img: { alt: 'Средний Зал', src: Hall1Image }, + name: 'Средний Зал', + price: 2000, + }, + { + area: 50, + id: uuid(), + img: { alt: 'Большой Зал', src: Hall2Image }, + name: 'Большой Зал', + price: 2500, + }, + { + area: 60, + id: uuid(), + img: { alt: 'Зал Лофт', src: Hall3Image }, + name: 'Зал Лофт', + price: 3000, + }, ]; export const getHalls = (req: Request, res: Response) => res.status(200).json(halls); diff --git a/src/api/routes/image/controller.ts b/src/api/routes/image/controller.ts index 8a43402..f1e0f68 100644 --- a/src/api/routes/image/controller.ts +++ b/src/api/routes/image/controller.ts @@ -2,7 +2,7 @@ import path from 'path'; import { Request, Response } from 'express'; -import { PAGE_LINK } from '../../../constants'; +import { ImageSection, PAGE_LINK } from '../../../constants'; export type ImagePosition = { bottom?: number | string; @@ -40,10 +40,19 @@ const masterClassesDesktopImage = path.join(imageRootDir, 'master-classes/deskto const showProgramsMobileImage = path.join(imageRootDir, 'show-programs/mobile.png'); const showProgramsDesktopImage = path.join(imageRootDir, 'show-programs/desktop.png'); +const priceMobileImage = path.join(imageRootDir, 'price/mobile.png'); +const priceDesktopImage = path.join(imageRootDir, 'price/desktop.png'); + +const themedCombosMobileImage = path.join(imageRootDir, 'themed-combos/mobile.png'); +const themedCombosDesktopImage = path.join(imageRootDir, 'themed-combos/desktop.png'); + +const themedCombosBannerMobileImage = path.join('static/images/themed-combos/', 'banner/mobile.png'); +const themedCombosBannerDesktopImage = path.join('static/images/themed-combos/', 'banner/desktop.png'); + export const getTitleImage = (req: Request, res: Response) => { // @ts-ignore const { body } = req; - const { page } = body; + const { page, section } = body; switch (page) { case PAGE_LINK.FAQ: { @@ -106,6 +115,26 @@ export const getTitleImage = (req: Request, res: Response) => { }); } + case PAGE_LINK.PRICE: { + return res.status(200).json({ + alt: 'price', + height: 571, + mobileHeight: 694, + mobilePosition: { + left: 0, + top: -175, + }, + mobileSrc: priceMobileImage, + mobileWidth: 390, + position: { + left: 170, + top: -155, + }, + src: priceDesktopImage, + width: 1067, + }); + } + case PAGE_LINK.MASTER_CLASSES: { return res.status(200).json({ alt: 'master-classes', @@ -122,6 +151,39 @@ export const getTitleImage = (req: Request, res: Response) => { }); } + case PAGE_LINK.THEMED_COMBOS: { + switch (section) { + case ImageSection.TITLE: + return res.status(200).json({ + alt: 'themed-combos', + mobileSrc: themedCombosMobileImage, + src: themedCombosDesktopImage, + }); + + case ImageSection.BANNER: + return res.status(200).json({ + alt: 'themed-combos', + height: 326, + mobileHeight: 193, + mobilePosition: { + right: -11, + top: -44, + }, + mobileSrc: themedCombosBannerMobileImage, + mobileWidth: 249, + position: { + right: -20, + top: -70, + }, + src: themedCombosBannerDesktopImage, + width: 642, + }); + + default: + return res.status(404); + } + } + default: return res.status(404); } diff --git a/src/api/routes/quests/controller.ts b/src/api/routes/quests/controller.ts index b46952b..67c0065 100644 --- a/src/api/routes/quests/controller.ts +++ b/src/api/routes/quests/controller.ts @@ -4,6 +4,7 @@ import { Request, Response } from 'express'; import { v4 as uuid } from 'uuid'; import { COLORS, ColorVariant } from '../../../constants'; +import { ImageType } from '../image/controller'; import { StoryType } from '../stories/controller'; const imageRootDir = 'static/images/quests/'; @@ -47,6 +48,10 @@ const multBackgroundMobileImage = path.join(imageRootDir, '/backgrounds/mult/mob const multCardBackgroundDesktopImage = path.join(imageRootDir, '/backgrounds/main/desktop/mult-card.png'); const multCardBackgroundMobileImage = path.join(imageRootDir, '/backgrounds/main/mobile/mult-card.png'); +const egerPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/eger.png'); +const faraonPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/faraon.png'); +const multPriceCardImage = path.join(imageRootDir, 'cards/price/desktop/mult.png'); + export type QuestItemType = { age: { styles?: object; @@ -60,6 +65,9 @@ export type QuestItemType = { mobileSrc: string; src: string; }; + cardImages: { + price?: ImageType; + }; description: string; id: string; labels: { @@ -152,6 +160,13 @@ export const egerQuest: QuestItemType = { mobileSrc: egerCardBackgroundMobileImage, src: egerCardBackgroundDesktopImage, }, + cardImages: { + price: { + height: 180, + src: egerPriceCardImage, + width: 176, + }, + }, description: 'Команда попадает в дом лесника с множеством спецэффектов и скрытых ходов. ' + 'Есть возможность выбрать уровень сложности: от детского до самого страшного', id: 'eger', @@ -254,6 +269,13 @@ export const faraonQuest: QuestItemType = { mobileSrc: faraonCardBackgroundMobileImage, src: faraonCardBackgroundDesktopImage, }, + cardImages: { + price: { + height: 180, + src: faraonPriceCardImage, + width: 193, + }, + }, description: 'Команда попадает в пирамиду: тоннели, лабиринты, спуски и подъёмы, продуманная ' + 'электроника и задания как в настоящем фильме про Египет', id: 'faraon', @@ -367,6 +389,13 @@ export const multQuest: QuestItemType = { mobileSrc: multCardBackgroundMobileImage, src: multCardBackgroundDesktopImage, }, + cardImages: { + price: { + height: 200, + src: multPriceCardImage, + width: 180, + }, + }, description: 'Команда попадает в мультвселенную, где собраны самые популярные сюжеты мультфильмов и детские герои: ' + 'Гравити Фолз, Алиса, Миньоны и Холодное сердце', id: 'mult', diff --git a/src/api/routes/rate/controller.ts b/src/api/routes/rate/controller.ts index ea5c69d..6946994 100644 --- a/src/api/routes/rate/controller.ts +++ b/src/api/routes/rate/controller.ts @@ -1,8 +1,10 @@ import * as path from 'path'; import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; import { PAGE_LINK, SERVICE } from '../../../constants'; +import { ImageType } from '../image/controller'; const imageRootDir = 'static/images/rate/'; @@ -11,6 +13,12 @@ const PremiumImg = path.join(imageRootDir, 'premium.png'); const StandartImg = path.join(imageRootDir, 'standart.png'); const VipImg = path.join(imageRootDir, 'vip.png'); +const ChemistryImg = path.join(imageRootDir, 'themed-combos/chemistry.png'); +const FuraImg = path.join(imageRootDir, 'themed-combos/fura.png'); +const MilitaryPartyImg = path.join(imageRootDir, 'themed-combos/militaryParty.png'); +const PijamasImg = path.join(imageRootDir, 'themed-combos/pijamas.png'); +const StarWarImg = path.join(imageRootDir, 'themed-combos/star-war.png'); + export type SingleItemServiceType = { enable: boolean; price?: number; @@ -36,6 +44,50 @@ export type RateItemType = { title: string; }; +export type ThemedCombo = { + age: { + max: number; + min: number; + }; + description: string; + id: string; + image: ImageType; + partySize: { + max: number; + min: number; + }; + price: number; + rating: number; + tags?: ThemeComboTag[]; + theme: ThemeComboTheme[]; + time: string; + title: string; +}; + +export enum ThemeComboTheme { + ACTIVE = 'active', + CREATIVE = 'creative', + HARRY_POTTER = 'harry_potter', + INFORMATIVE = 'informative', + LOGIC = 'logic', + MILITARY = 'military', +} +export const ThemeComboThemeLabel: Record = { + [ThemeComboTheme.ACTIVE]: 'Активные', + [ThemeComboTheme.CREATIVE]: 'Креативные', + [ThemeComboTheme.HARRY_POTTER]: 'Гарри Поттер', + [ThemeComboTheme.INFORMATIVE]: 'Информативные', + [ThemeComboTheme.LOGIC]: 'Логические', + [ThemeComboTheme.MILITARY]: 'Военные', +}; +export enum ThemeComboTag { + BOYS = 'boys', + FILM = 'film', + GAME = 'game', + GIRLS = 'girls', + MULTFILM = 'multfilm', +} + const birthdayPageRate: RateItemType[] = [ { id: 'base', @@ -511,6 +563,145 @@ const outdoorsPageRate: RateItemType[] = [ }, ]; +const themedCombos: ThemedCombo[] = [ + { + age: { + max: 2, + min: 0, + }, + description: 'Чокнутый профессор Орвик, уверенный\n' + + 'в превосходстве химии над другими дисциплинами,\n' + + 'решает пойти на опасный эксперимент и приготовить\n' + + 'зелье, которое наделит каждого выдающимися\n' + + 'научными способностями!', + id: uuid(), + image: { + src: ChemistryImg, + }, + partySize: { + max: 30, + min: 2, + }, + price: 1500, + rating: 200, + tags: [ + ThemeComboTag.GAME, + ThemeComboTag.BOYS, + ], + theme: [ + ThemeComboTheme.ACTIVE, + ThemeComboTheme.CREATIVE, + ThemeComboTheme.MILITARY, + ], + time: '3 часа', + title: 'Чумовая химия', + }, + { + age: { + max: 15, + min: 4, + }, + description: 'Здесь будет описание тематического комбо\\n' + + 'по типу описания комбо “Чокнутый профессор”', + id: uuid(), + image: { + src: MilitaryPartyImg, + }, + partySize: { + max: 30, + min: 2, + }, + price: 1500, + rating: 200, + tags: [ + ThemeComboTag.BOYS, + ThemeComboTag.FILM, + ThemeComboTag.GIRLS, + ], + theme: [ + ThemeComboTheme.ACTIVE, + ThemeComboTheme.MILITARY, + ThemeComboTheme.INFORMATIVE, + ], + time: '3 часа', + title: 'Милитари Рarty', + }, + { + age: { + max: 10, + min: 2, + }, + description: 'Здесь будет описание тематического комбо\\n' + + 'по типу описания комбо “Чокнутый профессор”', + id: uuid(), + image: { + src: FuraImg, + }, + partySize: { + max: 30, + min: 2, + }, + price: 1500, + rating: 200, + theme: [ + ThemeComboTheme.ACTIVE, + ThemeComboTheme.MILITARY, + ], + time: '3 часа', + title: 'Загадки старца Фура', + }, + { + age: { + max: 8, + min: 7, + }, + description: 'Здесь будет описание тематического комбо\\n' + + 'по типу описания комбо “Чокнутый профессор”', + id: uuid(), + image: { + src: PijamasImg, + }, + partySize: { + max: 30, + min: 2, + }, + price: 1500, + rating: 200, + theme: [ + ThemeComboTheme.ACTIVE, + ThemeComboTheme.MILITARY, + ThemeComboTheme.CREATIVE, + ], + time: '3 часа', + title: 'Пижама Party', + }, + { + age: { + max: 25, + min: 20, + }, + description: 'Здесь будет описание тематического комбо\\n' + + 'по типу описания комбо “Чокнутый профессор”', + id: uuid(), + image: { + src: StarWarImg, + }, + partySize: { + max: 30, + min: 2, + }, + price: 1500, + rating: 200, + theme: [ + ThemeComboTheme.ACTIVE, + ThemeComboTheme.MILITARY, + ThemeComboTheme.LOGIC, + ], + time: '3 часа', + title: 'Звёздные войны', + }, +]; + export const getRate = (req: Request, res: Response) => { // @ts-ignore const { page } = req.body; @@ -528,6 +719,10 @@ export const getRate = (req: Request, res: Response) => { return res.status(200).json(outdoorsPageRate); } + case PAGE_LINK.THEMED_COMBOS: { + return res.status(200).json(themedCombos); + } + default: return res.status(404); } diff --git a/src/api/routes/text/controller.ts b/src/api/routes/text/controller.ts index 7ffcb12..1320aec 100644 --- a/src/api/routes/text/controller.ts +++ b/src/api/routes/text/controller.ts @@ -55,6 +55,43 @@ const showProgramsTitleText = { title: 'ШОУ-ПРОГРАММЫ\\n И ДИСКОТЕКИ', }; +const priceTitleText = { + description: 'Чтобы ознакомиться со стоимостью услуг,\n' + + 'выберите интересующую Вас категорию', + title: 'Ценовая политика ', +}; + +const themedCombosTitleText = { + age: { + text: '2-15', + }, + labels: { + items: [ + { mark: true, markMobile: true, text: 'командные игры и эстафеты' }, + { mark: true, markMobile: true, text: 'торжественное поздравление именинника' }, + { mark: true, markMobile: true, text: 'интерактивная игра с элементами квеста' }, + { mark: true, markMobile: true, text: 'сюжетная анимационная программа' }, + { mark: true, markMobile: true, text: 'шоу программа' }, + { mark: true, markMobile: true, text: 'творческий мастер-класс' }, + ], + }, + partySize: { + max: 30, + min: 4, + }, + time: { + text: '3 часа', + }, + title: 'Тематические комбо', +}; + +const themedCombosBannerText = { + description: 'проводятся в едином пространстве костюмированным аниматором', + mobileDescription: 'проводятся в едином пространстве', + title: 'Новые программы с тематическим\\n' + + 'реквизитом и оформлением', +}; + const masterClassesInfo = [ 'Знакомимся и проводим общий инструктаж', 'Рассказываем и показываем, как пользоваться реквизитом', @@ -224,6 +261,29 @@ export const getTitle = (req: Request, res: Response) => { } } + case PAGE_LINK.PRICE: { + switch (section) { + case TextSection.TITLE: + return res.status(200).json(priceTitleText); + + default: + return res.status(404); + } + } + + case PAGE_LINK.THEMED_COMBOS: { + switch (section) { + case TextSection.TITLE: + return res.status(200).json(themedCombosTitleText); + + case TextSection.BANNER: + return res.status(200).json(themedCombosBannerText); + + default: + return res.status(404); + } + } + default: return res.status(404); } diff --git a/src/constants/index.ts b/src/constants/index.ts index 93de342..a38f911 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -3,7 +3,6 @@ import { ImageType } from '../api/routes/image/controller'; export const enum PAGE_LINK { ABOUT = '/about', BIRTHDAY = '/holidays/birthday', - COMBO = '/combo', CONTACTS = '/contacts', COOPERATION = '/cooperation', ESCORT = '/escort', @@ -23,6 +22,7 @@ export const enum PAGE_LINK { RENT = '/rent', SERVICES = '/services', SHOW_PROGRAMS = '/services/show-programs', + THEMED_COMBOS = '/services/themed-combos', } export type PAGE_LINK_LABEL_TYPE = { @@ -34,7 +34,6 @@ export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = { [PAGE_LINK.BIRTHDAY]: 'День Рождения', [PAGE_LINK.HOLIDAYS]: 'Праздники', [PAGE_LINK.HOME]: 'Главная', - [PAGE_LINK.COMBO]: 'Комбо', [PAGE_LINK.CONTACTS]: 'Контакты', [PAGE_LINK.COOPERATION]: 'Сотрудничество', [PAGE_LINK.ESCORT]: 'Сопровождение', @@ -52,9 +51,11 @@ export const PAGE_LINK_LABEL: PAGE_LINK_LABEL_TYPE = { [PAGE_LINK.RENT]: 'Аренда залов', [PAGE_LINK.SERVICES]: 'Услуги', [PAGE_LINK.SHOW_PROGRAMS]: 'Шоу-программы', + [PAGE_LINK.THEMED_COMBOS]: 'Тематические комбо', }; export enum TextSection { + BANNER = 'banner', DESCRIPTION = 'description', INFO = 'info', PARK = 'parkInfo', @@ -252,3 +253,8 @@ export const COLORS: ColorType = { [ColorVariant.VERI_PERI_DARK]: '#5656A9', [ColorVariant.WHITE]: '#FFFFFF', }; + +export enum ImageSection { + BANNER = 'banner', + TITLE = 'title', +} diff --git a/static/images/quests/cards/price/desktop/eger.png b/static/images/quests/cards/price/desktop/eger.png new file mode 100644 index 0000000..7cca494 Binary files /dev/null and b/static/images/quests/cards/price/desktop/eger.png differ diff --git a/static/images/quests/cards/price/desktop/faraon.png b/static/images/quests/cards/price/desktop/faraon.png new file mode 100644 index 0000000..6e99680 Binary files /dev/null and b/static/images/quests/cards/price/desktop/faraon.png differ diff --git a/static/images/quests/cards/price/desktop/mult.png b/static/images/quests/cards/price/desktop/mult.png new file mode 100644 index 0000000..8e6f5ad Binary files /dev/null and b/static/images/quests/cards/price/desktop/mult.png differ diff --git a/static/images/rate/themed-combos/chemistry.png b/static/images/rate/themed-combos/chemistry.png new file mode 100644 index 0000000..e51592c Binary files /dev/null and b/static/images/rate/themed-combos/chemistry.png differ diff --git a/static/images/rate/themed-combos/fura.png b/static/images/rate/themed-combos/fura.png new file mode 100644 index 0000000..4e9f7bc Binary files /dev/null and b/static/images/rate/themed-combos/fura.png differ diff --git a/static/images/rate/themed-combos/militaryParty.png b/static/images/rate/themed-combos/militaryParty.png new file mode 100644 index 0000000..0de2c8b Binary files /dev/null and b/static/images/rate/themed-combos/militaryParty.png differ diff --git a/static/images/rate/themed-combos/pijamas.png b/static/images/rate/themed-combos/pijamas.png new file mode 100644 index 0000000..4d8b67c Binary files /dev/null and b/static/images/rate/themed-combos/pijamas.png differ diff --git a/static/images/rate/themed-combos/star-war.png b/static/images/rate/themed-combos/star-war.png new file mode 100644 index 0000000..02520a9 Binary files /dev/null and b/static/images/rate/themed-combos/star-war.png differ diff --git a/static/images/themed-combos/banner/desktop.png b/static/images/themed-combos/banner/desktop.png new file mode 100644 index 0000000..5afadd6 Binary files /dev/null and b/static/images/themed-combos/banner/desktop.png differ diff --git a/static/images/themed-combos/banner/mobile.png b/static/images/themed-combos/banner/mobile.png new file mode 100644 index 0000000..476c394 Binary files /dev/null and b/static/images/themed-combos/banner/mobile.png differ diff --git a/static/images/title/price/desktop.png b/static/images/title/price/desktop.png new file mode 100644 index 0000000..1bb2fcc Binary files /dev/null and b/static/images/title/price/desktop.png differ diff --git a/static/images/title/price/mobile.png b/static/images/title/price/mobile.png new file mode 100644 index 0000000..c3aa7db Binary files /dev/null and b/static/images/title/price/mobile.png differ diff --git a/static/images/title/themed-combos/desktop.png b/static/images/title/themed-combos/desktop.png new file mode 100644 index 0000000..a153d37 Binary files /dev/null and b/static/images/title/themed-combos/desktop.png differ diff --git a/static/images/title/themed-combos/mobile.png b/static/images/title/themed-combos/mobile.png new file mode 100644 index 0000000..eee7f81 Binary files /dev/null and b/static/images/title/themed-combos/mobile.png differ