Changes in module "mixed reservations"
Deploy NPM app / Deploy NPM (push) Successful in 1m23s

This commit is contained in:
Ichitux
2026-04-24 01:59:50 +02:00
parent 823ca68119
commit fce84ff4a6
4 changed files with 150 additions and 54 deletions
+27 -5
View File
@@ -276,7 +276,7 @@ export const GALLERY_IMAGES = [
// ---- PAQUETES MIXTOS (Room + Pass) ----
export type RoomType = "individual" | "double" | "suite";
export type PassType = "full" | "party" | "single";
export type PassType = "full" | "party";
export const ROOM_TYPES: { id: RoomType }[] = [
{ id: "individual" },
@@ -284,10 +284,32 @@ export const ROOM_TYPES: { id: RoomType }[] = [
{ id: "suite" },
];
// ---- PRECIOS DINÁMICOS FULL PASS ----
/**
* Calcula el precio del Full Pass según la fecha actual.
* - Hasta 1 de julio: 170€
* - 1 de julio - 1 de septiembre: 190€
* - Después del inicio del evento: 200€ (último precio)
*/
export function getFullPassPrice(): { price: number; isLastPrice: boolean } {
const now = new Date();
const julyFirst = new Date("2026-07-01T00:00:00");
const septemberFirst = new Date("2026-09-01T00:00:00");
const eventStart = new Date(EVENT_INFO.date);
if (now < julyFirst) {
return { price: 170, isLastPrice: false };
} else if (now < septemberFirst) {
return { price: 190, isLastPrice: false };
} else {
// After event starts
return { price: 200, isLastPrice: true };
}
}
export const MIXED_BOOKING_PACKAGES = [
{ id: "full" as PassType, label: "full", roomPrices: { individual: 0, double: 0, suite: 0 } },
{ id: "party" as PassType, label: "party", roomPrices: { individual: 0, double: 0, suite: 0 } },
{ id: "single" as PassType, label: "single", roomPrices: { individual: 0, double: 0, suite: 0 } },
{ id: "full" as PassType, label: "full", roomPrices: { individual: 100, double: 150, suite: 213 } },
{ id: "party" as PassType, label: "party", roomPrices: { individual: 100, double: 150, suite: 213 } },
];
// ---- SECCIONES VISIBLES ----
@@ -299,7 +321,7 @@ export const SECTIONS = {
schedule: true,
booking: false,
mixed_booking: true,
hotel: true,
hotel: false,
practical: true,
gallery: true,
};