Merge version_7 into main
Merge version_7 into main
This commit was merged in pull request #13.
This commit is contained in:
@@ -140,7 +140,10 @@ export default function AppointmentsPage() {
|
||||
|
||||
const handleBooking = () => {
|
||||
if (selectedSlot && selectedDay) {
|
||||
window.location.href = `/booking?date=${selectedDay.date}&time=${selectedSlot.time}`;
|
||||
// Store the selected date and time for the booking confirmation
|
||||
localStorage.setItem('appointmentDate', selectedDay.date);
|
||||
localStorage.setItem('appointmentTime', selectedSlot.time);
|
||||
window.location.href = "/";
|
||||
}
|
||||
};
|
||||
|
||||
@@ -165,10 +168,10 @@ export default function AppointmentsPage() {
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="Radiance Beauty"
|
||||
navItems={[
|
||||
{ name: "גלריה", id: "gallery" },
|
||||
{ name: "שירותים", id: "services" },
|
||||
{ name: "גלריה", id: "#gallery" },
|
||||
{ name: "שירותים", id: "#services" },
|
||||
{ name: "תור", id: "/appointments" },
|
||||
{ name: "יצירת קשר", id: "contact" }
|
||||
{ name: "יצירת קשר", id: "#appointment" }
|
||||
]}
|
||||
button={{ text: "הזמן תור", href: "/booking" }}
|
||||
animateOnLoad={true}
|
||||
@@ -261,7 +264,7 @@ export default function AppointmentsPage() {
|
||||
{selectedDay?.dayName}, {selectedDay?.date} ב {selectedSlot.time}
|
||||
</p>
|
||||
<button onClick={handleBooking} className="bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded-lg font-medium transition-colors">
|
||||
המשך להזמנה
|
||||
אישור והחזרה לבית
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -4,11 +4,9 @@ import { useState } from "react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
|
||||
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
||||
import { Calendar, Clock, User, Mail, Phone, Sparkles, ChevronLeft } from 'lucide-react';
|
||||
import { User, Mail, Phone, Sparkles, ChevronLeft } from 'lucide-react';
|
||||
|
||||
export default function BookingPage() {
|
||||
const [selectedDate, setSelectedDate] = useState("");
|
||||
const [selectedTime, setSelectedTime] = useState("");
|
||||
const [selectedService, setSelectedService] = useState("");
|
||||
const [fullName, setFullName] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
@@ -24,13 +22,9 @@ export default function BookingPage() {
|
||||
{ id: "nails", name: "ציור ציפורניים", duration: "45 דקות", price: "$60" }
|
||||
];
|
||||
|
||||
const timeSlots = [
|
||||
"9:00 AM", "9:30 AM", "10:00 AM", "10:30 AM", "11:00 AM", "11:30 AM", "12:00 PM", "1:00 PM", "1:30 PM", "2:00 PM", "2:30 PM", "3:00 PM", "3:30 PM", "4:00 PM", "4:30 PM", "5:00 PM"
|
||||
];
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
if (selectedDate && selectedTime && selectedService && fullName && email && phoneNumber) {
|
||||
if (selectedService && fullName && email && phoneNumber) {
|
||||
setSubmitted(true);
|
||||
setTimeout(() => {
|
||||
window.location.href = "/";
|
||||
@@ -55,10 +49,10 @@ export default function BookingPage() {
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="Radiance Beauty"
|
||||
navItems={[
|
||||
{ name: "גלריה", id: "gallery" },
|
||||
{ name: "שירותים", id: "services" },
|
||||
{ name: "גלריה", id: "#gallery" },
|
||||
{ name: "שירותים", id: "#services" },
|
||||
{ name: "תור", id: "/appointments" },
|
||||
{ name: "יצירת קשר", id: "contact" }
|
||||
{ name: "יצירת קשר", id: "#appointment" }
|
||||
]}
|
||||
button={{ text: "חזור לבית", href: "/" }}
|
||||
animateOnLoad={true}
|
||||
@@ -74,9 +68,9 @@ export default function BookingPage() {
|
||||
</a>
|
||||
<h1 className="text-4xl md:text-5xl font-light mb-3 flex items-center gap-3">
|
||||
<Sparkles className="w-8 h-8 md:w-10 md:h-10" />
|
||||
הזמן את התור שלך
|
||||
בחר את שירותך
|
||||
</h1>
|
||||
<p className="text-lg text-foreground/70">תור את מושב היופי שלך עם צוות המומחים שלנו</p>
|
||||
<p className="text-lg text-foreground/70">בחר שירות ופרטיך האישיים. בחר תאריך וזמן בעמוד התורים.</p>
|
||||
</div>
|
||||
|
||||
{submitted ? (
|
||||
@@ -113,45 +107,6 @@ export default function BookingPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Date Selection */}
|
||||
<div className="space-y-4">
|
||||
<label className="block text-lg font-medium flex items-center gap-2">
|
||||
<Calendar className="w-5 h-5" />
|
||||
בחר תאריך *
|
||||
</label>
|
||||
<input
|
||||
type="date"
|
||||
value={selectedDate}
|
||||
onChange={(e) => setSelectedDate(e.target.value)}
|
||||
required
|
||||
className="w-full px-4 py-3 rounded-xl bg-card border border-foreground/10 focus:border-primary-cta focus:outline-none transition-colors"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Time Selection */}
|
||||
<div className="space-y-4">
|
||||
<label className="block text-lg font-medium flex items-center gap-2">
|
||||
<Clock className="w-5 h-5" />
|
||||
בחר זמן *
|
||||
</label>
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-2">
|
||||
{timeSlots.map((time) => (
|
||||
<button
|
||||
key={time}
|
||||
type="button"
|
||||
onClick={() => setSelectedTime(time)}
|
||||
className={`py-2 px-3 rounded-lg border-2 transition-all text-sm ${
|
||||
selectedTime === time
|
||||
? "border-primary-cta bg-primary-cta/10"
|
||||
: "border-card hover:border-primary-cta/50"
|
||||
}`}
|
||||
>
|
||||
{time}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* User Details */}
|
||||
<div className="space-y-4">
|
||||
<h3 className="text-lg font-medium">המידע שלך</h3>
|
||||
@@ -202,9 +157,9 @@ export default function BookingPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Booking Summary */}
|
||||
{/* Service Summary */}
|
||||
<div className="bg-card rounded-xl p-6 border border-foreground/10">
|
||||
<h3 className="font-medium mb-4">סיכום הזמנה</h3>
|
||||
<h3 className="font-medium mb-4">סיכום בחירתך</h3>
|
||||
<div className="space-y-2 text-sm">
|
||||
<div className="flex justify-between">
|
||||
<span className="text-foreground/70">שירות:</span>
|
||||
@@ -212,24 +167,19 @@ export default function BookingPage() {
|
||||
{selectedService ? services.find(s => s.id === selectedService)?.name : "לא נבחר"}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-foreground/70">תאריך:</span>
|
||||
<span className="font-medium">{selectedDate || "לא נבחר"}</span>
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<span className="text-foreground/70">זמן:</span>
|
||||
<span className="font-medium">{selectedTime || "לא נבחר"}</span>
|
||||
<div className="flex justify-between text-foreground/60 text-xs mt-2 pt-2 border-t border-foreground/10">
|
||||
<span>בחר תאריך וזמן בעמוד התורים</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Submit Button */}
|
||||
{/* Next Button */}
|
||||
<button
|
||||
type="submit"
|
||||
disabled={!selectedDate || !selectedTime || !selectedService || !fullName || !email || !phoneNumber}
|
||||
disabled={!selectedService || !fullName || !email || !phoneNumber}
|
||||
className="w-full py-4 px-6 bg-primary-cta text-foreground font-medium rounded-xl hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-opacity"
|
||||
>
|
||||
אשר תור
|
||||
המשך לבחירת תאריך וזמן
|
||||
</button>
|
||||
|
||||
<p className="text-xs text-foreground/60 text-center">
|
||||
|
||||
@@ -29,10 +29,10 @@ export default function LandingPage() {
|
||||
<NavbarLayoutFloatingInline
|
||||
brandName="Radiance Beauty"
|
||||
navItems={[
|
||||
{ name: "גלריה", id: "gallery" },
|
||||
{ name: "שירותים", id: "services" },
|
||||
{ name: "גלריה", id: "#gallery" },
|
||||
{ name: "שירותים", id: "#services" },
|
||||
{ name: "תור", id: "/appointments" },
|
||||
{ name: "יצירת קשר", id: "contact" }
|
||||
{ name: "יצירת קשר", id: "#appointment" }
|
||||
]}
|
||||
button={{ text: "הזמן תור", href: "/booking" }}
|
||||
animateOnLoad={true}
|
||||
|
||||
Reference in New Issue
Block a user