feat(app): add quest calculator modal
This commit is contained in:
parent
0ab4ed1c8e
commit
a1b7717210
@ -9,17 +9,18 @@ type OrderBody = {
|
||||
memberQuantity: number;
|
||||
price: number;
|
||||
quest: string;
|
||||
rate: string;
|
||||
rate?: string;
|
||||
time?: string;
|
||||
};
|
||||
name: string;
|
||||
page: 'birthday' | 'graduation' | 'master-classes' | 'outdoors' | 'show-programs';
|
||||
page?: 'birthday' | 'graduation' | 'master-classes' | 'outdoors' | 'show-programs';
|
||||
phoneNumber: string;
|
||||
rate?: {
|
||||
price?: number;
|
||||
pricePerPerson?: number;
|
||||
title: string;
|
||||
};
|
||||
type: 'calculator' | 'callback' | 'newRate';
|
||||
type: 'calculator' | 'callback' | 'newRate' | 'quest-calculator';
|
||||
};
|
||||
|
||||
export const getNewOrder = async (req: Request<any, any, OrderBody>, res: Response) => {
|
||||
@ -43,6 +44,9 @@ export const getNewOrder = async (req: Request<any, any, OrderBody>, res: Respon
|
||||
case 'calculator':
|
||||
return 'Калькулятор праздника';
|
||||
|
||||
case 'quest-calculator':
|
||||
return 'Калькулятор квеста';
|
||||
|
||||
default:
|
||||
return 'Нужно связаться';
|
||||
}
|
||||
@ -97,6 +101,17 @@ export const getNewOrder = async (req: Request<any, any, OrderBody>, res: Respon
|
||||
<p>Стоимость: <b>${formatter.format(info.price)}</b></p>
|
||||
`;
|
||||
|
||||
case 'quest-calculator':
|
||||
return `
|
||||
<p>Имя: <b>${name}</b></p>
|
||||
<p>Телефон: <b>${phoneNumber}</b></p>
|
||||
<p>Квест: <b>${info.quest}</b></p>
|
||||
<p>Кол-во людей: <b>${info.memberQuantity}</b></p>
|
||||
<p>Дата: <b>${info.date}</b></p>
|
||||
<p>Время: <b>${info.time}</b></p>
|
||||
<p>Стоимость: <b>${formatter.format(info.price)}</b></p>
|
||||
`;
|
||||
|
||||
default:
|
||||
return 'ошибка';
|
||||
}
|
||||
@ -124,7 +139,12 @@ export const getNewOrder = async (req: Request<any, any, OrderBody>, res: Respon
|
||||
|
||||
case 'calculator':
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Отправлено письмо с калькулятором: %s', info.messageId);
|
||||
console.log('Отправлено письмо с калькулятором праздника: %s', info.messageId);
|
||||
break;
|
||||
|
||||
case 'quest-calculator':
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Отправлено письмо с калькулятором праздника: %s', info.messageId);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user