forked from UKSOURCE/hailearning.edu.vn
Merge pull request 'feat: UI appointment contact pricing page' (#5) from hoanganh-03022026-appointment-contact-pricing into main
Reviewed-on: UKSOURCE/hailearning.edu.vn#5
This commit is contained in:
@@ -1,501 +1,487 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState, useEffect, FormEvent } from "react";
|
||||||
import appointmentData from "./appointment.json";
|
|
||||||
|
// Types for appointment data from CMS
|
||||||
|
interface AppointmentHero {
|
||||||
|
title: string;
|
||||||
|
backgroundImage: string;
|
||||||
|
subtitle: string;
|
||||||
|
heading: string;
|
||||||
|
description: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AppointmentForm {
|
||||||
|
heading: string;
|
||||||
|
fields: Array<{
|
||||||
|
name: string;
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
required: boolean;
|
||||||
|
colClass: string;
|
||||||
|
}>;
|
||||||
|
submitButton: {
|
||||||
|
text: string;
|
||||||
|
icon: string;
|
||||||
|
buttonClass: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
interface AppointmentData {
|
||||||
|
hero: AppointmentHero;
|
||||||
|
visaOptions: string[];
|
||||||
|
form: AppointmentForm;
|
||||||
|
}
|
||||||
|
|
||||||
export default function AppointmentPage() {
|
export default function AppointmentPage() {
|
||||||
const [selectedType, setSelectedType] = useState("consultation");
|
const [appointmentData, setAppointmentData] = useState<AppointmentData | null>(null);
|
||||||
const [selectedConsultant, setSelectedConsultant] = useState("");
|
const [isLoading, setIsLoading] = useState(true);
|
||||||
const [selectedDate, setSelectedDate] = useState("");
|
|
||||||
const [selectedTime, setSelectedTime] = useState("");
|
|
||||||
const [selectedOffice, setSelectedOffice] = useState("online");
|
|
||||||
const [openFaq, setOpenFaq] = useState<number | null>(null);
|
|
||||||
|
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
fullName: "",
|
name: "",
|
||||||
email: "",
|
email: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
visaType: "",
|
address: "",
|
||||||
country: "",
|
appointmentDate: "",
|
||||||
travelDate: "",
|
message: "",
|
||||||
previousVisa: "",
|
visaTypes: [] as string[],
|
||||||
notes: "",
|
|
||||||
});
|
});
|
||||||
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
|
const [submitStatus, setSubmitStatus] = useState<{
|
||||||
|
type: "success" | "error" | null;
|
||||||
|
message: string;
|
||||||
|
}>({ type: null, message: "" });
|
||||||
|
|
||||||
const handleInputChange = (
|
// Calendar state
|
||||||
e: React.ChangeEvent<
|
const [currentDate, setCurrentDate] = useState(new Date());
|
||||||
HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
|
|
||||||
>,
|
const apiUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3001";
|
||||||
|
|
||||||
|
// Calendar helper functions
|
||||||
|
const months = [
|
||||||
|
"January", "February", "March", "April", "May", "June",
|
||||||
|
"July", "August", "September", "October", "November", "December"
|
||||||
|
];
|
||||||
|
|
||||||
|
const getDaysInMonth = (year: number, month: number) => {
|
||||||
|
return new Date(year, month + 1, 0).getDate();
|
||||||
|
};
|
||||||
|
|
||||||
|
const getFirstDayOfMonth = (year: number, month: number) => {
|
||||||
|
const day = new Date(year, month, 1).getDay();
|
||||||
|
// Convert Sunday (0) to 7 for Monday-first calendar
|
||||||
|
return day === 0 ? 7 : day;
|
||||||
|
};
|
||||||
|
|
||||||
|
const generateCalendarDays = () => {
|
||||||
|
const year = currentDate.getFullYear();
|
||||||
|
const month = currentDate.getMonth();
|
||||||
|
const daysInMonth = getDaysInMonth(year, month);
|
||||||
|
const firstDay = getFirstDayOfMonth(year, month);
|
||||||
|
const today = new Date();
|
||||||
|
|
||||||
|
const days: React.ReactNode[] = [];
|
||||||
|
|
||||||
|
// Empty cells for days before the first day of the month
|
||||||
|
for (let i = 1; i < firstDay; i++) {
|
||||||
|
days.push(<div key={`empty-${i}`} className="date empty"></div>);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Days of the month
|
||||||
|
for (let day = 1; day <= daysInMonth; day++) {
|
||||||
|
const isToday =
|
||||||
|
day === today.getDate() &&
|
||||||
|
month === today.getMonth() &&
|
||||||
|
year === today.getFullYear();
|
||||||
|
|
||||||
|
days.push(
|
||||||
|
<div
|
||||||
|
key={day}
|
||||||
|
className={`date ${isToday ? "today active" : ""}`}
|
||||||
|
onClick={() => handleDateClick(year, month, day)}
|
||||||
|
style={{ cursor: "pointer" }}
|
||||||
|
>
|
||||||
|
{day}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return days;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleDateClick = (year: number, month: number, day: number) => {
|
||||||
|
const selectedDate = new Date(year, month, day);
|
||||||
|
const formattedDate = selectedDate.toISOString().split("T")[0];
|
||||||
|
setFormData((prev) => ({ ...prev, appointmentDate: formattedDate }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePrevMonth = () => {
|
||||||
|
setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleNextMonth = () => {
|
||||||
|
setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 1));
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fetch appointment data from CMS
|
||||||
|
useEffect(() => {
|
||||||
|
const fetchAppointmentData = async () => {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`${apiUrl}/api/appointment`);
|
||||||
|
const result = await response.json();
|
||||||
|
|
||||||
|
if (result.success && result.data) {
|
||||||
|
setAppointmentData(result.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching appointment data:", error);
|
||||||
|
} finally {
|
||||||
|
setIsLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
fetchAppointmentData();
|
||||||
|
}, [apiUrl]);
|
||||||
|
|
||||||
|
const handleChange = (
|
||||||
|
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
||||||
) => {
|
) => {
|
||||||
const { name, value } = e.target;
|
const { name, value } = e.target;
|
||||||
|
setFormData((prev) => ({ ...prev, [name]: value }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleCheckboxChange = (visaType: string, checked: boolean) => {
|
||||||
setFormData((prev) => ({
|
setFormData((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
[name]: value,
|
visaTypes: checked
|
||||||
|
? [...prev.visaTypes, visaType]
|
||||||
|
: prev.visaTypes.filter((v) => v !== visaType),
|
||||||
}));
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent) => {
|
const handleSubmit = async (e: FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log("Appointment booked:", {
|
setIsSubmitting(true);
|
||||||
type: selectedType,
|
setSubmitStatus({ type: null, message: "" });
|
||||||
consultant: selectedConsultant,
|
|
||||||
date: selectedDate,
|
try {
|
||||||
time: selectedTime,
|
const response = await fetch(`${apiUrl}/api/appointment/submit`, {
|
||||||
office: selectedOffice,
|
method: "POST",
|
||||||
...formData,
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(formData),
|
||||||
});
|
});
|
||||||
alert(
|
|
||||||
"Đặt lịch thành công! Chúng tôi sẽ liên hệ xác nhận trong thời gian sớm nhất.",
|
const data = await response.json();
|
||||||
);
|
|
||||||
|
if (response.ok && data.success) {
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "success",
|
||||||
|
message: data.message || "Thank you! Your appointment has been submitted.",
|
||||||
|
});
|
||||||
|
// Reset form
|
||||||
|
setFormData({
|
||||||
|
name: "",
|
||||||
|
email: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
appointmentDate: "",
|
||||||
|
message: "",
|
||||||
|
visaTypes: [],
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "error",
|
||||||
|
message: data.error || "Something went wrong. Please try again.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Submit error:", error);
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "error",
|
||||||
|
message: "Network error. Please check your connection and try again.",
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
setIsSubmitting(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleFaq = (index: number) => {
|
// Get data with fallbacks
|
||||||
setOpenFaq(openFaq === index ? null : index);
|
const hero = appointmentData?.hero || {
|
||||||
|
title: "Make Appointment",
|
||||||
|
backgroundImage: "/assets/img/inner-page/breadcrumb.jpg",
|
||||||
|
subtitle: "About Our Consultancy",
|
||||||
|
heading: "Want to meet us for your need?",
|
||||||
|
description: "24/7 customer support is always ready to answer all your questions",
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectedAppointmentType = appointmentData.appointmentTypes.find(
|
const visaOptions = appointmentData?.visaOptions || [
|
||||||
(type) => type.id === selectedType,
|
"Canada Immigration",
|
||||||
);
|
"Tourist Visa",
|
||||||
const selectedConsultantData = appointmentData.consultants.find(
|
"Medical Visa",
|
||||||
(c) => c.id === selectedConsultant,
|
"Coaching",
|
||||||
|
"Student Visa",
|
||||||
|
"Spouse Visa",
|
||||||
|
"Job Opportunity",
|
||||||
|
"Exam",
|
||||||
|
];
|
||||||
|
|
||||||
|
const formSettings = appointmentData?.form || {
|
||||||
|
heading: "Request Appointment",
|
||||||
|
submitButton: {
|
||||||
|
text: "Request Appointment",
|
||||||
|
icon: "fa-solid fa-arrow-right",
|
||||||
|
buttonClass: "theme-btn",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
// Get background image URL
|
||||||
|
const backgroundImage = hero.backgroundImage?.startsWith("http")
|
||||||
|
? hero.backgroundImage
|
||||||
|
: hero.backgroundImage?.startsWith("/")
|
||||||
|
? hero.backgroundImage
|
||||||
|
: `/assets/img/inner-page/breadcrumb.jpg`;
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return (
|
||||||
|
<div className="loading-wrapper" style={{ minHeight: "50vh", display: "flex", alignItems: "center", justifyContent: "center" }}>
|
||||||
|
<div className="spinner-border text-primary" role="status">
|
||||||
|
<span className="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<>
|
||||||
<div className="max-w-6xl mx-auto">
|
{/* Breadcrumb-Wrapper Section Start */}
|
||||||
{/* Header */}
|
<section
|
||||||
<div className="text-center mb-12">
|
className="breadcrumb-wrapper fix bg-cover"
|
||||||
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
style={{ backgroundImage: `url(${backgroundImage})` }}
|
||||||
{appointmentData.title}
|
|
||||||
</h1>
|
|
||||||
<p className="text-xl text-gray-600 mb-8">
|
|
||||||
{appointmentData.subtitle}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
{/* Benefits */}
|
|
||||||
<div className="grid md:grid-cols-4 gap-6 max-w-4xl mx-auto">
|
|
||||||
{appointmentData.hero.benefits.map((benefit, index) => (
|
|
||||||
<div key={index} className="bg-blue-50 p-4 rounded-lg">
|
|
||||||
<p className="text-blue-800 font-medium">{benefit}</p>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="grid lg:grid-cols-3 gap-8">
|
|
||||||
{/* Booking Form */}
|
|
||||||
<div className="lg:col-span-2">
|
|
||||||
<div className="bg-white rounded-lg shadow-lg p-6">
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-6">
|
|
||||||
Đặt Lịch Hẹn
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
<form onSubmit={handleSubmit} className="space-y-6">
|
|
||||||
{/* Appointment Type */}
|
|
||||||
<div>
|
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-3">
|
|
||||||
Loại tư vấn <span className="text-red-500">*</span>
|
|
||||||
</label>
|
|
||||||
<div className="grid md:grid-cols-2 gap-4">
|
|
||||||
{appointmentData.appointmentTypes.map((type) => (
|
|
||||||
<div
|
|
||||||
key={type.id}
|
|
||||||
className={`border rounded-lg p-4 cursor-pointer transition-colors ${
|
|
||||||
selectedType === type.id
|
|
||||||
? "border-blue-500 bg-blue-50"
|
|
||||||
: "border-gray-200 hover:border-gray-300"
|
|
||||||
}`}
|
|
||||||
onClick={() => setSelectedType(type.id)}
|
|
||||||
>
|
>
|
||||||
<div className="flex items-center justify-between mb-2">
|
<div className="shape">
|
||||||
<div className="flex items-center">
|
<img src="/assets/img/inner-page/shape.png" alt="img" />
|
||||||
<span className="text-2xl mr-3">{type.icon}</span>
|
</div>
|
||||||
<div>
|
<div className="container">
|
||||||
<h3 className="font-semibold">{type.name}</h3>
|
<div className="page-heading">
|
||||||
{type.popular && (
|
<h1 className="breadcrumb-title">{hero.title}</h1>
|
||||||
<span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
|
<ul className="breadcrumb-list">
|
||||||
Phổ biến
|
<li>
|
||||||
</span>
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevron-right"></i>
|
||||||
|
</li>
|
||||||
|
<li>{hero.title}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Appointment Section Start */}
|
||||||
|
<section className="appointment-section section-padding fix">
|
||||||
|
<div className="container">
|
||||||
|
<div className="appointment-wrapper">
|
||||||
|
<div className="row g-4">
|
||||||
|
<div className="col-lg-6">
|
||||||
|
<div className="appointment-content">
|
||||||
|
<div className="section-title mb-0">
|
||||||
|
{hero.subtitle && (
|
||||||
|
<span className="sub-title-2">{hero.subtitle}</span>
|
||||||
|
)}
|
||||||
|
{hero.heading && (
|
||||||
|
<h2 className="split-text-right split-text-in-right">
|
||||||
|
{hero.heading}
|
||||||
|
</h2>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<h5>Have any questions?</h5>
|
||||||
<div className="text-right">
|
{hero.description && <p>{hero.description}</p>}
|
||||||
<div className="font-bold text-blue-600">
|
|
||||||
{type.price}
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-gray-500">
|
|
||||||
{type.duration}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="col-lg-6">
|
||||||
<p className="text-gray-600 text-sm">
|
<div className="calendar">
|
||||||
{type.description}
|
<div className="calendar-header">
|
||||||
</p>
|
<h2 id="month-year">{months[currentDate.getMonth()]} {currentDate.getFullYear()}</h2>
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Consultant Selection */}
|
|
||||||
<div>
|
<div>
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-3">
|
<button type="button" onClick={handlePrevMonth}><</button>
|
||||||
Chọn chuyên gia
|
<button type="button" onClick={handleNextMonth}>></button>
|
||||||
</label>
|
|
||||||
<div className="space-y-3">
|
|
||||||
<div
|
|
||||||
className={`border rounded-lg p-4 cursor-pointer transition-colors ${
|
|
||||||
selectedConsultant === ""
|
|
||||||
? "border-blue-500 bg-blue-50"
|
|
||||||
: "border-gray-200 hover:border-gray-300"
|
|
||||||
}`}
|
|
||||||
onClick={() => setSelectedConsultant("")}
|
|
||||||
>
|
|
||||||
<div className="font-medium">
|
|
||||||
Để chúng tôi chọn chuyên gia phù hợp
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-gray-600">
|
|
||||||
Dựa trên loại visa và quốc gia bạn quan tâm
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="days">
|
||||||
|
<div>Mon</div>
|
||||||
|
<div>Tue</div>
|
||||||
|
<div>Wed</div>
|
||||||
|
<div>Thu</div>
|
||||||
|
<div>Fri</div>
|
||||||
|
<div>Sat</div>
|
||||||
|
<div>Sun</div>
|
||||||
|
</div>
|
||||||
|
<div className="dates" id="dates">
|
||||||
|
{generateCalendarDays()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
{appointmentData.consultants.map((consultant) => (
|
{/* Contact Section Start */}
|
||||||
|
<div className="contact-section section-padding fix pt-0">
|
||||||
|
<div className="container">
|
||||||
|
<div className="contact-from-wrapper">
|
||||||
|
{/* Status Message */}
|
||||||
|
{submitStatus.type && (
|
||||||
<div
|
<div
|
||||||
key={consultant.id}
|
className={`alert ${submitStatus.type === "success"
|
||||||
className={`border rounded-lg p-4 cursor-pointer transition-colors ${
|
? "alert-success"
|
||||||
selectedConsultant === consultant.id
|
: "alert-danger"
|
||||||
? "border-blue-500 bg-blue-50"
|
} text-center mb-4`}
|
||||||
: "border-gray-200 hover:border-gray-300"
|
|
||||||
}`}
|
|
||||||
onClick={() => setSelectedConsultant(consultant.id)}
|
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
{submitStatus.message}
|
||||||
<div className="w-12 h-12 bg-gray-200 rounded-full flex items-center justify-center mr-4">
|
|
||||||
<span className="text-gray-600">👤</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex-1">
|
|
||||||
<div className="font-semibold">
|
|
||||||
{consultant.name}
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-gray-600">
|
|
||||||
{consultant.title}
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center text-sm text-gray-500">
|
|
||||||
<span className="mr-2">
|
|
||||||
⭐ {consultant.rating}
|
|
||||||
</span>
|
|
||||||
<span className="mr-2">
|
|
||||||
({consultant.reviews} đánh giá)
|
|
||||||
</span>
|
|
||||||
<span>{consultant.experience}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Date & Time */}
|
<form onSubmit={handleSubmit} className="contact-form-items">
|
||||||
<div className="grid md:grid-cols-2 gap-6">
|
<div className="row g-4">
|
||||||
<div>
|
<div className="col-xl-12">
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
<div className="row g-4">
|
||||||
Ngày hẹn <span className="text-red-500">*</span>
|
<div className="col-lg-4">
|
||||||
</label>
|
<div className="form-clt">
|
||||||
|
<span>Your Name *</span>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="name"
|
||||||
|
value={formData.name}
|
||||||
|
onChange={handleChange}
|
||||||
|
placeholder="Your name"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-lg-4">
|
||||||
|
<div className="form-clt">
|
||||||
|
<span>Your Email *</span>
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
name="email"
|
||||||
|
value={formData.email}
|
||||||
|
onChange={handleChange}
|
||||||
|
placeholder="Your email"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-lg-4">
|
||||||
|
<div className="form-clt">
|
||||||
|
<span>Your Phone</span>
|
||||||
|
<input
|
||||||
|
type="tel"
|
||||||
|
name="phone"
|
||||||
|
value={formData.phone}
|
||||||
|
onChange={handleChange}
|
||||||
|
placeholder="Phone Number"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-lg-6">
|
||||||
|
<div className="form-clt">
|
||||||
|
<span>Your Address</span>
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
name="address"
|
||||||
|
value={formData.address}
|
||||||
|
onChange={handleChange}
|
||||||
|
placeholder="Your address"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-lg-6">
|
||||||
|
<div className="form-clt">
|
||||||
|
<span>Appointment Date</span>
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
value={selectedDate}
|
name="appointmentDate"
|
||||||
onChange={(e) => setSelectedDate(e.target.value)}
|
value={formData.appointmentDate}
|
||||||
min={new Date().toISOString().split("T")[0]}
|
onChange={handleChange}
|
||||||
required
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
|
||||||
Giờ hẹn <span className="text-red-500">*</span>
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
value={selectedTime}
|
|
||||||
onChange={(e) => setSelectedTime(e.target.value)}
|
|
||||||
required
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
>
|
|
||||||
<option value="">Chọn giờ</option>
|
|
||||||
{appointmentData.timeSlots.map((slot) => (
|
|
||||||
<option
|
|
||||||
key={slot.time}
|
|
||||||
value={slot.time}
|
|
||||||
disabled={!slot.available}
|
|
||||||
>
|
|
||||||
{slot.label} {!slot.available && "(Đã đặt)"}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="col-lg-12">
|
||||||
|
<div className="form-clt">
|
||||||
{/* Office Selection */}
|
|
||||||
<div>
|
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-3">
|
|
||||||
Hình thức tư vấn <span className="text-red-500">*</span>
|
|
||||||
</label>
|
|
||||||
<div className="space-y-3">
|
|
||||||
<div
|
|
||||||
className={`border rounded-lg p-4 cursor-pointer transition-colors ${
|
|
||||||
selectedOffice === "online"
|
|
||||||
? "border-blue-500 bg-blue-50"
|
|
||||||
: "border-gray-200 hover:border-gray-300"
|
|
||||||
}`}
|
|
||||||
onClick={() => setSelectedOffice("online")}
|
|
||||||
>
|
|
||||||
<div className="flex items-center">
|
|
||||||
<span className="text-2xl mr-3">💻</span>
|
|
||||||
<div>
|
|
||||||
<div className="font-medium">Tư vấn online</div>
|
|
||||||
<div className="text-sm text-gray-600">
|
|
||||||
Video call qua Zoom/Google Meet
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{appointmentData.offices.map((office, index) => (
|
|
||||||
<div
|
|
||||||
key={index}
|
|
||||||
className={`border rounded-lg p-4 cursor-pointer transition-colors ${
|
|
||||||
selectedOffice === office.name
|
|
||||||
? "border-blue-500 bg-blue-50"
|
|
||||||
: "border-gray-200 hover:border-gray-300"
|
|
||||||
}`}
|
|
||||||
onClick={() => setSelectedOffice(office.name)}
|
|
||||||
>
|
|
||||||
<div className="flex items-center">
|
|
||||||
<span className="text-2xl mr-3">🏢</span>
|
|
||||||
<div>
|
|
||||||
<div className="font-medium">
|
|
||||||
Văn phòng {office.name}
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-gray-600">
|
|
||||||
{office.address}
|
|
||||||
</div>
|
|
||||||
<div className="text-sm text-gray-500">
|
|
||||||
{office.hours}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Personal Information */}
|
|
||||||
<div className="border-t pt-6">
|
|
||||||
<h3 className="text-lg font-semibold text-gray-900 mb-4">
|
|
||||||
Thông Tin Cá Nhân
|
|
||||||
</h3>
|
|
||||||
<div className="grid md:grid-cols-2 gap-6">
|
|
||||||
{appointmentData.formFields.map((field) => (
|
|
||||||
<div
|
|
||||||
key={field.name}
|
|
||||||
className={
|
|
||||||
field.type === "textarea" ? "md:col-span-2" : ""
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
|
||||||
{field.label}
|
|
||||||
{field.required && (
|
|
||||||
<span className="text-red-500 ml-1">*</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
|
|
||||||
{field.type === "textarea" ? (
|
|
||||||
<textarea
|
<textarea
|
||||||
name={field.name}
|
name="message"
|
||||||
value={
|
value={formData.message}
|
||||||
formData[field.name as keyof typeof formData]
|
onChange={handleChange}
|
||||||
}
|
placeholder="Type your message"
|
||||||
onChange={handleInputChange}
|
></textarea>
|
||||||
placeholder={field.placeholder}
|
|
||||||
required={field.required}
|
|
||||||
rows={4}
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
|
||||||
) : field.type === "select" ? (
|
|
||||||
<select
|
|
||||||
name={field.name}
|
|
||||||
value={
|
|
||||||
formData[field.name as keyof typeof formData]
|
|
||||||
}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
required={field.required}
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
>
|
|
||||||
<option value="">
|
|
||||||
Chọn {field.label.toLowerCase()}
|
|
||||||
</option>
|
|
||||||
{field.options?.map((option, index) => (
|
|
||||||
<option key={index} value={option}>
|
|
||||||
{option}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
) : (
|
|
||||||
<input
|
|
||||||
type={field.type}
|
|
||||||
name={field.name}
|
|
||||||
value={
|
|
||||||
formData[field.name as keyof typeof formData]
|
|
||||||
}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
placeholder={field.placeholder}
|
|
||||||
required={field.required}
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Submit Button */}
|
{visaOptions.length > 0 && (
|
||||||
|
<div className="cheak-list-item">
|
||||||
|
<div className="cheak-list">
|
||||||
|
{visaOptions.slice(0, Math.ceil(visaOptions.length / 2)).map((visa, index) => (
|
||||||
|
<div className="form-check" key={index}>
|
||||||
|
<input
|
||||||
|
className="form-check-input"
|
||||||
|
type="checkbox"
|
||||||
|
id={`visa-${index}`}
|
||||||
|
checked={formData.visaTypes.includes(visa)}
|
||||||
|
onChange={(e) =>
|
||||||
|
handleCheckboxChange(visa, e.target.checked)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="form-check-label"
|
||||||
|
htmlFor={`visa-${index}`}
|
||||||
|
>
|
||||||
|
{visa}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<div className="cheak-list mb-0">
|
||||||
|
{visaOptions.slice(Math.ceil(visaOptions.length / 2)).map((visa, index) => (
|
||||||
|
<div className="form-check" key={index + Math.ceil(visaOptions.length / 2)}>
|
||||||
|
<input
|
||||||
|
className="form-check-input"
|
||||||
|
type="checkbox"
|
||||||
|
id={`visa-${index + Math.ceil(visaOptions.length / 2)}`}
|
||||||
|
checked={formData.visaTypes.includes(visa)}
|
||||||
|
onChange={(e) =>
|
||||||
|
handleCheckboxChange(visa, e.target.checked)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="form-check-label"
|
||||||
|
htmlFor={`visa-${index + Math.ceil(visaOptions.length / 2)}`}
|
||||||
|
>
|
||||||
|
{visa}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-full bg-blue-600 text-white py-3 px-6 rounded-lg hover:bg-blue-700 transition-colors font-medium text-lg"
|
className={formSettings.submitButton?.buttonClass || "theme-btn"}
|
||||||
|
disabled={isSubmitting}
|
||||||
>
|
>
|
||||||
Đặt Lịch Hẹn
|
{isSubmitting ? "SUBMITTING..." : (formSettings.submitButton?.text || "Request Appointment")}
|
||||||
|
<i className={formSettings.submitButton?.icon || "fa-solid fa-arrow-right"}></i>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sidebar */}
|
|
||||||
<div className="space-y-6">
|
|
||||||
{/* Booking Summary */}
|
|
||||||
<div className="bg-white rounded-lg shadow-lg p-6">
|
|
||||||
<h3 className="text-lg font-semibold text-gray-900 mb-4">
|
|
||||||
Tóm Tắt Đặt Lịch
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
{selectedAppointmentType && (
|
|
||||||
<div className="space-y-3">
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Loại tư vấn:</span>
|
|
||||||
<span className="font-medium">
|
|
||||||
{selectedAppointmentType.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Thời gian:</span>
|
|
||||||
<span className="font-medium">
|
|
||||||
{selectedAppointmentType.duration}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Phí:</span>
|
|
||||||
<span className="font-medium text-blue-600">
|
|
||||||
{selectedAppointmentType.price}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{selectedConsultantData && (
|
|
||||||
<div className="border-t pt-3">
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Chuyên gia:</span>
|
|
||||||
<span className="font-medium">
|
|
||||||
{selectedConsultantData.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{selectedDate && selectedTime && (
|
|
||||||
<div className="border-t pt-3">
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Ngày giờ:</span>
|
|
||||||
<span className="font-medium">
|
|
||||||
{selectedDate} lúc{" "}
|
|
||||||
{
|
|
||||||
appointmentData.timeSlots.find(
|
|
||||||
(s) => s.time === selectedTime,
|
|
||||||
)?.label
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{selectedOffice && (
|
|
||||||
<div className="flex justify-between">
|
|
||||||
<span className="text-gray-600">Hình thức:</span>
|
|
||||||
<span className="font-medium">
|
|
||||||
{selectedOffice === "online"
|
|
||||||
? "Online"
|
|
||||||
: `Văn phòng ${selectedOffice}`}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Contact Info */}
|
|
||||||
<div className="bg-blue-50 rounded-lg p-6">
|
|
||||||
<h3 className="text-lg font-semibold text-gray-900 mb-4">
|
|
||||||
Cần Hỗ Trợ?
|
|
||||||
</h3>
|
|
||||||
<div className="space-y-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<span className="text-blue-600 mr-2">📞</span>
|
|
||||||
<span>1900 1234</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center">
|
|
||||||
<span className="text-blue-600 mr-2">✉️</span>
|
|
||||||
<span>info@visaservice.com</span>
|
|
||||||
</div>
|
|
||||||
<div className="flex items-center">
|
|
||||||
<span className="text-blue-600 mr-2">💬</span>
|
|
||||||
<span>Chat trực tuyến 24/7</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* FAQs */}
|
|
||||||
<div className="mt-16">
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-8 text-center">
|
|
||||||
Câu Hỏi Thường Gặp
|
|
||||||
</h2>
|
|
||||||
<div className="max-w-3xl mx-auto space-y-4">
|
|
||||||
{appointmentData.faqs.map((faq, index) => (
|
|
||||||
<div
|
|
||||||
key={index}
|
|
||||||
className="bg-white rounded-lg shadow-md overflow-hidden"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
className="w-full p-6 text-left hover:bg-gray-50 transition-colors"
|
|
||||||
onClick={() => toggleFaq(index)}
|
|
||||||
>
|
|
||||||
<div className="flex items-center justify-between">
|
|
||||||
<h3 className="font-semibold text-gray-900">
|
|
||||||
{faq.question}
|
|
||||||
</h3>
|
|
||||||
<span className="text-gray-400">
|
|
||||||
{openFaq === index ? "−" : "+"}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
{openFaq === index && (
|
|
||||||
<div className="px-6 pb-6">
|
|
||||||
<p className="text-gray-700">{faq.answer}</p>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,157 +1,291 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState, useEffect, FormEvent } from "react";
|
||||||
import contactData from "./contact.json";
|
|
||||||
|
interface ContactCard {
|
||||||
|
type: string;
|
||||||
|
title: string;
|
||||||
|
content: string[];
|
||||||
|
iconType: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ContactData {
|
||||||
|
hero: {
|
||||||
|
title: string;
|
||||||
|
backgroundImage: string;
|
||||||
|
};
|
||||||
|
contactCards: ContactCard[];
|
||||||
|
map: {
|
||||||
|
embedUrl: string;
|
||||||
|
};
|
||||||
|
form: {
|
||||||
|
heading: string;
|
||||||
|
description: string;
|
||||||
|
fields: {
|
||||||
|
name: string;
|
||||||
|
label: string;
|
||||||
|
type: string;
|
||||||
|
placeholder: string;
|
||||||
|
required: boolean;
|
||||||
|
colClass: string;
|
||||||
|
}[];
|
||||||
|
submitButton: {
|
||||||
|
text: string;
|
||||||
|
icon: string;
|
||||||
|
buttonClass: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default function ContactPage() {
|
export default function ContactPage() {
|
||||||
|
const [contactData, setContactData] = useState<ContactData | null>(null);
|
||||||
|
const [loading, setLoading] = useState(true);
|
||||||
const [formData, setFormData] = useState({
|
const [formData, setFormData] = useState({
|
||||||
fullName: "",
|
name: "",
|
||||||
email: "",
|
email: "",
|
||||||
phone: "",
|
phone: "",
|
||||||
service: "",
|
address: "",
|
||||||
|
date: "",
|
||||||
message: "",
|
message: "",
|
||||||
});
|
});
|
||||||
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
||||||
|
const [submitStatus, setSubmitStatus] = useState<{
|
||||||
|
type: "success" | "error" | null;
|
||||||
|
message: string;
|
||||||
|
}>({ type: null, message: "" });
|
||||||
|
|
||||||
const handleInputChange = (
|
const apiUrl = process.env.NEXT_PUBLIC_API_URL || "http://localhost:3001";
|
||||||
e: React.ChangeEvent<
|
|
||||||
HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement
|
// Fetch contact data from CMS
|
||||||
>,
|
useEffect(() => {
|
||||||
) => {
|
const fetchContactData = async () => {
|
||||||
const { name, value } = e.target;
|
try {
|
||||||
setFormData((prev) => ({
|
const response = await fetch(`${apiUrl}/api/contact`, { cache: 'no-store' });
|
||||||
...prev,
|
if (response.ok) {
|
||||||
[name]: value,
|
const data = await response.json();
|
||||||
}));
|
setContactData(data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Error fetching contact data:", error);
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent) => {
|
fetchContactData();
|
||||||
|
}, [apiUrl]);
|
||||||
|
|
||||||
|
const handleChange = (
|
||||||
|
e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
|
||||||
|
) => {
|
||||||
|
const { name, value } = e.target;
|
||||||
|
setFormData((prev) => ({ ...prev, [name]: value }));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmit = async (e: FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log("Form submitted:", formData);
|
setIsSubmitting(true);
|
||||||
// Handle form submission here
|
setSubmitStatus({ type: null, message: "" });
|
||||||
alert(
|
|
||||||
"Cảm ơn bạn đã liên hệ! Chúng tôi sẽ phản hồi trong thời gian sớm nhất.",
|
try {
|
||||||
|
const response = await fetch(`${apiUrl}/api/contact/submit`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify(formData),
|
||||||
|
});
|
||||||
|
|
||||||
|
const data = await response.json();
|
||||||
|
|
||||||
|
if (response.ok && data.success) {
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "success",
|
||||||
|
message: data.message || "Thank you! We will contact you soon.",
|
||||||
|
});
|
||||||
|
setFormData({
|
||||||
|
name: "",
|
||||||
|
email: "",
|
||||||
|
phone: "",
|
||||||
|
address: "",
|
||||||
|
date: "",
|
||||||
|
message: "",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "error",
|
||||||
|
message: data.error || "Something went wrong. Please try again.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Submit error:", error);
|
||||||
|
setSubmitStatus({
|
||||||
|
type: "error",
|
||||||
|
message: "Network error. Please check your connection and try again.",
|
||||||
|
});
|
||||||
|
} finally {
|
||||||
|
setIsSubmitting(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (loading) {
|
||||||
|
return (
|
||||||
|
<div className="loading-wrapper" style={{ minHeight: "100vh", display: "flex", alignItems: "center", justifyContent: "center" }}>
|
||||||
|
<p>Loading...</p>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default values if API fails
|
||||||
|
const hero = contactData?.hero || { title: "Contact Us", backgroundImage: "/assets/img/inner-page/breadcrumb.jpg" };
|
||||||
|
const contactCards = contactData?.contactCards || [];
|
||||||
|
const map = contactData?.map || { embedUrl: "" };
|
||||||
|
const form = contactData?.form || {
|
||||||
|
heading: "Send Us Message",
|
||||||
|
description: "Have questions? Send us a message today.",
|
||||||
|
fields: [],
|
||||||
|
submitButton: { text: "SEND MESSAGE", icon: "fa-solid fa-arrow-right", buttonClass: "theme-btn style-2" }
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<>
|
||||||
<div className="max-w-6xl mx-auto">
|
{/* Breadcrumb-Wrapper Section Start */}
|
||||||
{/* Header */}
|
<section
|
||||||
<div className="text-center mb-12">
|
className="breadcrumb-wrapper fix bg-cover"
|
||||||
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
style={{ backgroundImage: `url(${hero.backgroundImage || "/assets/img/inner-page/breadcrumb.jpg"})` }}
|
||||||
{contactData.title}
|
>
|
||||||
</h1>
|
<div className="shape">
|
||||||
<p className="text-xl text-gray-600">{contactData.subtitle}</p>
|
<img src="/assets/img/inner-page/shape.png" alt="img" />
|
||||||
</div>
|
</div>
|
||||||
|
<div className="container">
|
||||||
|
<div className="page-heading">
|
||||||
|
<h1 className="breadcrumb-title">{hero.title}</h1>
|
||||||
|
<ul className="breadcrumb-list">
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevron-right"></i>
|
||||||
|
</li>
|
||||||
|
<li>Contact Us</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<div className="grid lg:grid-cols-2 gap-12">
|
{/* Contact Icon Section Start */}
|
||||||
{/* Contact Information */}
|
<section className="contact-us-section-3 section-padding fix">
|
||||||
<div>
|
<div className="container">
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-6">
|
<div className="row g-4">
|
||||||
Thông Tin Liên Hệ
|
{contactCards.map((card, index) => (
|
||||||
</h2>
|
<div className="col-xl-4 col-lg-6 col-md-6" key={index}>
|
||||||
|
<div className="contact-icon-item">
|
||||||
{/* Contact Details */}
|
<div className="icon">
|
||||||
<div className="space-y-6 mb-8">
|
<i className={card.iconType}></i>
|
||||||
{Object.entries(contactData.contactInfo).map(([key, info]) => (
|
|
||||||
<div key={key} className="flex items-start">
|
|
||||||
<span className="text-2xl mr-4">{info.icon}</span>
|
|
||||||
<div>
|
|
||||||
<h3 className="font-semibold text-gray-900">
|
|
||||||
{info.label}
|
|
||||||
</h3>
|
|
||||||
<p className="text-gray-700 whitespace-pre-line">
|
|
||||||
{info.value}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="content">
|
||||||
))}
|
<p>{card.title}</p>
|
||||||
</div>
|
<h6>
|
||||||
|
{card.content.map((line, i) => (
|
||||||
{/* Offices */}
|
<span key={i}>
|
||||||
<h3 className="text-xl font-bold text-gray-900 mb-4">Văn Phòng</h3>
|
{card.type === "email" ? (
|
||||||
<div className="space-y-4">
|
<a href={`mailto:${line}`}>{line}</a>
|
||||||
{contactData.offices.map((office, index) => (
|
) : card.type === "phone" ? (
|
||||||
<div key={index} className="bg-gray-50 p-4 rounded-lg">
|
<a href={`tel:${line.replace(/\s/g, "")}`}>{line}</a>
|
||||||
<h4 className="font-semibold text-gray-900 mb-2">
|
) : (
|
||||||
{office.name}
|
line
|
||||||
</h4>
|
|
||||||
<p className="text-gray-700 text-sm mb-1">
|
|
||||||
📍 {office.address}
|
|
||||||
</p>
|
|
||||||
<p className="text-gray-700 text-sm mb-1">
|
|
||||||
📞 {office.phone}
|
|
||||||
</p>
|
|
||||||
<p className="text-gray-700 text-sm">✉️ {office.email}</p>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Contact Form */}
|
|
||||||
<div>
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-6">
|
|
||||||
Gửi Tin Nhắn
|
|
||||||
</h2>
|
|
||||||
<form onSubmit={handleSubmit} className="space-y-6">
|
|
||||||
{contactData.formFields.map((field) => (
|
|
||||||
<div key={field.name}>
|
|
||||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
|
||||||
{field.label}
|
|
||||||
{field.required && (
|
|
||||||
<span className="text-red-500 ml-1">*</span>
|
|
||||||
)}
|
)}
|
||||||
</label>
|
{i < card.content.length - 1 && <br />}
|
||||||
|
</span>
|
||||||
|
))}
|
||||||
|
</h6>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Contact Section Start */}
|
||||||
|
<section className="contact-section-3 section-padding fix pt-0">
|
||||||
|
<div className="container">
|
||||||
|
<div className="contact-from-wrapper">
|
||||||
|
<h5 className="text-center">{form.heading}</h5>
|
||||||
|
<p className="text-center mt-3 mb-5">"{form.description}"</p>
|
||||||
|
|
||||||
|
{/* Status Message */}
|
||||||
|
{submitStatus.type && (
|
||||||
|
<div
|
||||||
|
className={`alert ${submitStatus.type === "success" ? "alert-success" : "alert-danger"
|
||||||
|
} text-center mb-4`}
|
||||||
|
>
|
||||||
|
{submitStatus.message}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<div className="row g-4">
|
||||||
|
<div className="col-xl-12">
|
||||||
|
<form onSubmit={handleSubmit} className="contact-form-items">
|
||||||
|
<div className="row g-4">
|
||||||
|
{form.fields.map((field, index) => (
|
||||||
|
<div className={field.colClass || "col-lg-12"} key={index}>
|
||||||
|
<div className="form-clt">
|
||||||
|
<span>{field.label}{field.required && " *"}</span>
|
||||||
{field.type === "textarea" ? (
|
{field.type === "textarea" ? (
|
||||||
<textarea
|
<textarea
|
||||||
name={field.name}
|
name={field.name}
|
||||||
value={formData[field.name as keyof typeof formData]}
|
value={formData[field.name as keyof typeof formData] || ""}
|
||||||
onChange={handleInputChange}
|
onChange={handleChange}
|
||||||
placeholder={field.placeholder}
|
placeholder={field.placeholder}
|
||||||
required={field.required}
|
required={field.required}
|
||||||
rows={4}
|
></textarea>
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
|
||||||
) : field.type === "select" ? (
|
|
||||||
<select
|
|
||||||
name={field.name}
|
|
||||||
value={formData[field.name as keyof typeof formData]}
|
|
||||||
onChange={handleInputChange}
|
|
||||||
required={field.required}
|
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
>
|
|
||||||
<option value="">Chọn dịch vụ</option>
|
|
||||||
{field.options?.map((option, index) => (
|
|
||||||
<option key={index} value={option}>
|
|
||||||
{option}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</select>
|
|
||||||
) : (
|
) : (
|
||||||
<input
|
<input
|
||||||
type={field.type}
|
type={field.type}
|
||||||
name={field.name}
|
name={field.name}
|
||||||
value={formData[field.name as keyof typeof formData]}
|
value={formData[field.name as keyof typeof formData] || ""}
|
||||||
onChange={handleInputChange}
|
onChange={handleChange}
|
||||||
placeholder={field.placeholder}
|
placeholder={field.placeholder}
|
||||||
required={field.required}
|
required={field.required}
|
||||||
className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
))}
|
))}
|
||||||
|
<div className="col-lg-4">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="w-full bg-blue-600 text-white py-3 px-6 rounded-lg hover:bg-blue-700 transition-colors font-medium"
|
className={form.submitButton.buttonClass}
|
||||||
|
disabled={isSubmitting}
|
||||||
>
|
>
|
||||||
Gửi Tin Nhắn
|
{isSubmitting ? "SENDING..." : form.submitButton.text}
|
||||||
|
<i className={form.submitButton.icon}></i>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Map Section Start */}
|
||||||
|
{map.embedUrl && (
|
||||||
|
<div className="map-section section-padding pt-0">
|
||||||
|
<div className="map-items">
|
||||||
|
<div className="googpemap">
|
||||||
|
<iframe
|
||||||
|
src={map.embedUrl}
|
||||||
|
style={{ border: 0 }}
|
||||||
|
allowFullScreen
|
||||||
|
loading="lazy"
|
||||||
|
></iframe>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,188 +1,358 @@
|
|||||||
import pricingData from "./pricing.json";
|
|
||||||
|
|
||||||
export default function PricingPage() {
|
export default function PricingPage() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto px-4 py-8">
|
<>
|
||||||
<div className="max-w-6xl mx-auto">
|
{/* Breadcrumb-Wrapper Section Start */}
|
||||||
{/* Header */}
|
<section
|
||||||
<div className="text-center mb-12">
|
className="breadcrumb-wrapper fix bg-cover"
|
||||||
<h1 className="text-4xl font-bold text-gray-900 mb-4">
|
style={{ backgroundImage: "url(/assets/img/inner-page/breadcrumb.jpg)" }}
|
||||||
{pricingData.title}
|
|
||||||
</h1>
|
|
||||||
<p className="text-xl text-gray-600 mb-4">{pricingData.subtitle}</p>
|
|
||||||
<p className="text-sm text-gray-500 bg-yellow-50 p-3 rounded-lg inline-block">
|
|
||||||
💡 {pricingData.note}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Pricing Packages */}
|
|
||||||
<div className="grid md:grid-cols-3 gap-8 mb-16">
|
|
||||||
{pricingData.packages.map((pkg) => (
|
|
||||||
<div
|
|
||||||
key={pkg.id}
|
|
||||||
className={`relative bg-white rounded-lg shadow-lg p-6 ${
|
|
||||||
pkg.popular ? "ring-2 ring-blue-500 transform scale-105" : ""
|
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
{/* Popular Badge */}
|
<div className="shape">
|
||||||
{pkg.popular && (
|
<img src="/assets/img/inner-page/shape.png" alt="img" />
|
||||||
<div className="absolute -top-3 left-1/2 transform -translate-x-1/2">
|
</div>
|
||||||
<span className="bg-blue-500 text-white px-4 py-1 rounded-full text-sm font-medium">
|
<div className="container">
|
||||||
Phổ biến nhất
|
<div className="page-heading">
|
||||||
|
<h1 className="breadcrumb-title">pricing plan</h1>
|
||||||
|
<ul className="breadcrumb-list">
|
||||||
|
<li>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevron-right"></i>
|
||||||
|
</li>
|
||||||
|
<li>Pricing Plan</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Pricing Section Start */}
|
||||||
|
<section className="pricing-section-2 section-padding fix section-bg-1">
|
||||||
|
<div className="container">
|
||||||
|
<div className="pricing-wrapper-2">
|
||||||
|
<div className="row g-4 align-items-center">
|
||||||
|
<div className="col-xl-6 col-lg-5">
|
||||||
|
<div className="pricing-content">
|
||||||
|
<div className="section-title mb-0">
|
||||||
|
<span className="sub-title-2 wow fadeInUp">
|
||||||
|
pricing plan
|
||||||
</span>
|
</span>
|
||||||
|
<h2 className="split-text-right split-text-in-right">
|
||||||
|
Flexible Plans to Suit Every Traveler
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
)}
|
<p className="pricing-text wow fadeInUp" data-wow-delay=".5s">
|
||||||
|
Choose the plan that fits your visa needs and enjoy expert
|
||||||
{/* Package Header */}
|
guidance every step of the way.
|
||||||
<div className="text-center mb-6">
|
</p>
|
||||||
<h3 className="text-2xl font-bold text-gray-900 mb-2">
|
<div
|
||||||
{pkg.name}
|
className="d-flex mt-3 mt-md-0 wow fadeInUp"
|
||||||
</h3>
|
data-wow-delay=".5s"
|
||||||
<p className="text-gray-600 mb-4">{pkg.description}</p>
|
|
||||||
<div className="text-3xl font-bold text-blue-600">
|
|
||||||
{parseInt(pkg.price).toLocaleString()} {pkg.currency}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Features */}
|
|
||||||
<div className="mb-6">
|
|
||||||
<h4 className="font-semibold text-gray-900 mb-3">Bao gồm:</h4>
|
|
||||||
<ul className="space-y-2">
|
|
||||||
{pkg.features.map((feature, index) => (
|
|
||||||
<li key={index} className="flex items-center text-gray-700">
|
|
||||||
<span className="text-green-500 mr-2">✓</span>
|
|
||||||
{feature}
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Limitations */}
|
|
||||||
{pkg.limitations.length > 0 && (
|
|
||||||
<div className="mb-6">
|
|
||||||
<h4 className="font-semibold text-gray-900 mb-3">Lưu ý:</h4>
|
|
||||||
<ul className="space-y-2">
|
|
||||||
{pkg.limitations.map((limitation, index) => (
|
|
||||||
<li
|
|
||||||
key={index}
|
|
||||||
className="flex items-center text-gray-600 text-sm"
|
|
||||||
>
|
>
|
||||||
<span className="text-orange-500 mr-2">⚠</span>
|
<div className="pricing-two__tab">
|
||||||
{limitation}
|
<nav>
|
||||||
</li>
|
<div className="nav nav-tabs" id="nav-tab" role="tablist">
|
||||||
))}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* CTA Button */}
|
|
||||||
<button
|
<button
|
||||||
className={`w-full py-3 px-6 rounded-lg font-medium transition-colors ${
|
className="nav-link active"
|
||||||
pkg.popular
|
id="pt-1-tab"
|
||||||
? "bg-blue-600 text-white hover:bg-blue-700"
|
data-bs-toggle="tab"
|
||||||
: "bg-gray-100 text-gray-900 hover:bg-gray-200"
|
data-bs-target="#pt-1"
|
||||||
}`}
|
type="button"
|
||||||
|
role="tab"
|
||||||
|
aria-controls="pt-1"
|
||||||
|
aria-selected="true"
|
||||||
>
|
>
|
||||||
Chọn gói này
|
Monthly
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="nav-link"
|
||||||
|
id="pt-2-tab"
|
||||||
|
data-bs-toggle="tab"
|
||||||
|
data-bs-target="#pt-2"
|
||||||
|
type="button"
|
||||||
|
role="tab"
|
||||||
|
aria-controls="pt-2"
|
||||||
|
aria-selected="false"
|
||||||
|
tabIndex={-1}
|
||||||
|
>
|
||||||
|
Yearly
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
))}
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{/* Additional Services */}
|
</div>
|
||||||
<div className="mb-16">
|
</div>
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-8 text-center">
|
<div className="col-xl-6 col-lg-7">
|
||||||
Dịch Vụ Bổ Sung
|
<div className="pricing__tab-content">
|
||||||
</h2>
|
<div className="tab-content" id="nav-tabContent">
|
||||||
<div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
|
|
||||||
{pricingData.additionalServices.map((service, index) => (
|
|
||||||
<div
|
<div
|
||||||
key={index}
|
className="tab-pane fade active show"
|
||||||
className="bg-white rounded-lg shadow-md p-6 text-center"
|
id="pt-1"
|
||||||
|
role="tabpanel"
|
||||||
|
aria-labelledby="pt-1-tab"
|
||||||
>
|
>
|
||||||
<h3 className="font-semibold text-gray-900 mb-2">
|
<div className="pricing-right-items">
|
||||||
{service.name}
|
<div className="pricing-box-items">
|
||||||
</h3>
|
<div className="pricing-header">
|
||||||
<div className="text-2xl font-bold text-blue-600 mb-2">
|
<h2>
|
||||||
{parseInt(service.price).toLocaleString()} VNĐ
|
<sup>$</sup>
|
||||||
</div>
|
32
|
||||||
<div className="text-sm text-gray-500 mb-3">
|
<sub>/mo</sub>
|
||||||
/{service.unit}
|
|
||||||
</div>
|
|
||||||
<p className="text-gray-700 text-sm">{service.description}</p>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Country Pricing */}
|
|
||||||
<div>
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-8 text-center">
|
|
||||||
Phí Visa Theo Quốc Gia
|
|
||||||
</h2>
|
</h2>
|
||||||
<div className="bg-white rounded-lg shadow-lg overflow-hidden">
|
<span className="sub-texts">Basic Plan</span>
|
||||||
<div className="overflow-x-auto">
|
</div>
|
||||||
<table className="w-full">
|
<a href="/pricing" className="theme-btn">
|
||||||
<thead className="bg-gray-50">
|
Get Started Today
|
||||||
<tr>
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
</a>
|
||||||
Quốc gia
|
<ul className="pricing-list">
|
||||||
</th>
|
<li>
|
||||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
Phí visa
|
Everything in Basic Plan
|
||||||
</th>
|
</li>
|
||||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
<li>
|
||||||
Thời gian xử lý
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
</th>
|
Visa Interview Preparation
|
||||||
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
|
</li>
|
||||||
Tỷ lệ thành công
|
<li>
|
||||||
</th>
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
</tr>
|
Priority Processing Support
|
||||||
</thead>
|
</li>
|
||||||
<tbody className="bg-white divide-y divide-gray-200">
|
<li>
|
||||||
{pricingData.countries.map((country, index) => (
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
<tr key={index} className="hover:bg-gray-50">
|
Phone & Email Assistance
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">
|
</li>
|
||||||
{country.name}
|
<li>
|
||||||
</td>
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
Step-by-Step Application Support
|
||||||
{parseInt(country.visaFee).toLocaleString()} VNĐ
|
</li>
|
||||||
</td>
|
</ul>
|
||||||
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-900">
|
</div>
|
||||||
{country.processingTime}
|
<div className="pricing-box-items style-2">
|
||||||
</td>
|
<div className="pricing-header">
|
||||||
<td className="px-6 py-4 whitespace-nowrap">
|
<h2>
|
||||||
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 text-green-800">
|
<sup>$</sup>
|
||||||
{country.successRate}
|
32
|
||||||
|
<sub>/mo</sub>
|
||||||
|
</h2>
|
||||||
|
<span className="sub-texts">Premium Plan</span>
|
||||||
|
</div>
|
||||||
|
<a href="/pricing" className="theme-btn style-2">
|
||||||
|
Get Started Today
|
||||||
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
<ul className="pricing-list">
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Everything in Basic Plan
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Visa Interview Preparation
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Priority Processing Support
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Phone & Email Assistance
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Step-by-Step Application Support
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="tab-pane fade"
|
||||||
|
id="pt-2"
|
||||||
|
role="tabpanel"
|
||||||
|
aria-labelledby="pt-2-tab"
|
||||||
|
>
|
||||||
|
<div className="pricing-right-items">
|
||||||
|
<div className="pricing-box-items">
|
||||||
|
<div className="pricing-header">
|
||||||
|
<h2>
|
||||||
|
<sup>$</sup>
|
||||||
|
32
|
||||||
|
<sub>/mo</sub>
|
||||||
|
</h2>
|
||||||
|
<span className="sub-texts">Basic Plan</span>
|
||||||
|
</div>
|
||||||
|
<a href="/pricing" className="theme-btn">
|
||||||
|
Get Started Today
|
||||||
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
<ul className="pricing-list">
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Everything in Basic Plan
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Visa Interview Preparation
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Priority Processing Support
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Phone & Email Assistance
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Step-by-Step Application Support
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div className="pricing-box-items style-2">
|
||||||
|
<div className="pricing-header">
|
||||||
|
<h2>
|
||||||
|
<sup>$</sup>
|
||||||
|
32
|
||||||
|
<sub>/mo</sub>
|
||||||
|
</h2>
|
||||||
|
<span className="sub-texts">Premium Plan</span>
|
||||||
|
</div>
|
||||||
|
<a href="/pricing" className="theme-btn style-2">
|
||||||
|
Get Started Today
|
||||||
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
<ul className="pricing-list">
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Everything in Basic Plan
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Visa Interview Preparation
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Priority Processing Support
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Phone & Email Assistance
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<i className="fa-solid fa-chevrons-right"></i>{" "}
|
||||||
|
Step-by-Step Application Support
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{/* Testimonial Section Start */}
|
||||||
|
<section className="testimonial-section section-padding fix">
|
||||||
|
<div className="container">
|
||||||
|
<div className="section-title-area">
|
||||||
|
<div className="section-title mb-0">
|
||||||
|
<span className="sub-title-2 wow fadeInUp">
|
||||||
|
What Our Clients Say
|
||||||
</span>
|
</span>
|
||||||
</td>
|
<h2 className="split-text-right split-text-in-right">
|
||||||
</tr>
|
Immigration Success Stories
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Contact CTA */}
|
|
||||||
<div className="text-center mt-12 bg-blue-50 rounded-lg p-8">
|
|
||||||
<h2 className="text-2xl font-bold text-gray-900 mb-4">
|
|
||||||
Cần Tư Vấn Chi Tiết?
|
|
||||||
</h2>
|
</h2>
|
||||||
<p className="text-gray-700 mb-6">
|
</div>
|
||||||
Liên hệ với chúng tôi để được tư vấn miễn phí và nhận báo giá phù
|
<a href="/contact" className="theme-btn">
|
||||||
hợp nhất
|
View All Review
|
||||||
</p>
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
</a>
|
||||||
<button className="bg-blue-600 text-white px-8 py-3 rounded-lg hover:bg-blue-700 transition-colors">
|
</div>
|
||||||
Tư vấn miễn phí
|
<div className="testimonial-wrapper-3">
|
||||||
|
<div className="row g-4 align-items-center">
|
||||||
|
<div className="col-lg-4">
|
||||||
|
<div className="testimonial-thumb">
|
||||||
|
<img src="/assets/img/home-3/test-thumb.jpg" alt="img" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="col-lg-8">
|
||||||
|
<div className="testimonial-content">
|
||||||
|
<div className="swiper testimonial-slider-3">
|
||||||
|
<div className="swiper-wrapper">
|
||||||
|
<div className="swiper-slide">
|
||||||
|
<div className="content">
|
||||||
|
<div className="star">
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
</div>
|
||||||
|
<h3>
|
||||||
|
“The team provided exceptional guidance
|
||||||
|
throughout my immigration process. Their expertise,
|
||||||
|
personalized support, and attention to detail
|
||||||
|
ensured a smooth, stress-free experience and
|
||||||
|
successful visa approval.”
|
||||||
|
</h3>
|
||||||
|
<div className="info-item">
|
||||||
|
<div className="icon">
|
||||||
|
<i className="fa-solid fa-quote-right"></i>
|
||||||
|
</div>
|
||||||
|
<div className="content">
|
||||||
|
<h5>Mohammed Ali,</h5>
|
||||||
|
<span>Family Visa</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="swiper-slide">
|
||||||
|
<div className="content">
|
||||||
|
<div className="star">
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
<i className="fa-solid fa-star"></i>
|
||||||
|
</div>
|
||||||
|
<h3>
|
||||||
|
“The team provided exceptional guidance
|
||||||
|
throughout my immigration process. Their expertise,
|
||||||
|
personalized support, and attention to detail
|
||||||
|
ensured a smooth, stress-free experience and
|
||||||
|
successful visa approval.”
|
||||||
|
</h3>
|
||||||
|
<div className="info-item">
|
||||||
|
<div className="icon">
|
||||||
|
<i className="fa-solid fa-quote-right"></i>
|
||||||
|
</div>
|
||||||
|
<div className="content">
|
||||||
|
<h5>Mohammed Ali,</h5>
|
||||||
|
<span>Family Visa</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="array-buttons-3">
|
||||||
|
<button className="array-prev">
|
||||||
|
<i className="fa-solid fa-arrow-left"></i>
|
||||||
</button>
|
</button>
|
||||||
<button className="bg-white text-blue-600 border border-blue-600 px-8 py-3 rounded-lg hover:bg-blue-50 transition-colors">
|
<button className="array-next">
|
||||||
Gọi ngay: 1900 1234
|
<i className="fa-solid fa-arrow-right"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user