Ocean Majesty Ocean Majesty
y.id == id); if (!y) return; this.yateId = y.id; this.yateNombre = y.nombre; this.capacidadMax = y.capacidadMaxima; this.capacidadNormal = y.capacidadNormal ?? y.capacidadMaxima; this.precioPaxExtra = y.precioPaxExtra ?? null; this.paquetes = y.paquetes; const dest = y.paquetes.find(p => p.destacado) ?? y.paquetes[0]; if (dest) this.seleccionarPaquete(dest.id); const mesActual = this.fecha ? this.fecha.substring(0, 7) : new Date().toISOString().substring(0, 7); this.cargarDisponibilidad(y.slug ?? '', mesActual); }, seleccionarPaquete(id) { const p = this.paquetes.find(p => p.id == id); if (!p) return; this.paqueteId = p.id; this.paqueteNombre = p.nombre; this.paqueteDetalle = p.detalle; this.precio = p.precio; }, paxExtra() { return Math.max(0, this.numPasajeros - (this.capacidadNormal || 0)); }, precioExtra() { return this.paxExtra() * (this.precioPaxExtra || 0); }, precioTotal() { return Number(this.precio) + this.precioExtra(); }, precioFormateado() { return '$' + Math.round(this.precioTotal()).toLocaleString('es-MX') + ' MXN'; }, precioUsd() { return '≈ $' + Math.round(this.precioTotal() / this.tasaCambio).toLocaleString('en-US') + ' USD'; }, validarPaso1() { this.errores = {}; if (!this.yateId) this.errores.yate = __t.errYate; if (!this.paqueteId) this.errores.paquete = __t.errPaquete; if (!this.fecha) this.errores.fecha = __t.errFecha; if (this.numPasajeros < 1) this.errores.pasajeros = __t.errMinPax; if (this.numPasajeros > this.capacidadMax) this.errores.pasajeros = __t.maximoPax.replace('__N__', this.capacidadMax); return Object.keys(this.errores).length === 0; }, validarPaso2() { this.errores = {}; if (!this.nombre.trim()) this.errores.nombre = __t.errNombre; if (!this.email.includes('@')) this.errores.email = __t.errEmail; if (this.telefono.length < 7) this.errores.telefono = __t.errTelefono; return Object.keys(this.errores).length === 0; }, avanzar() { if (this.paso === 1 && !this.validarPaso1()) return; if (this.paso === 2 && !this.validarPaso2()) return; this.paso++; }, yateActual() { return this.yatesData.find(y => y.id == this.yateId) ?? null; }, resetSeleccionYate() { this.yateId = null; this.yateNombre = ''; this.paqueteId = null; this.paquetes = []; this.capacidadMax = 0; this.capacidadNormal = 0; this.precioPaxExtra = null; } }" >
3
Your trip Your info Summary

Your trip

Your info

Summary

Package:

Date:

Passengers:

Occasion:

Your info

Name:

Email:

Phone:

You'll receive a PDF and we'll contact you within 2 hours