|
| 1 | +import { Calendar, Clock, CheckCircle } from "lucide-react"; |
| 2 | + |
| 3 | +const SchedulePresent = () => { |
| 4 | + const hasRegistered = true; |
| 5 | + const registrationData = { |
| 6 | + trialSlot: { date: "17/01/2026", time: "7:00 - 7:45" }, |
| 7 | + officialSlots: [ |
| 8 | + { date: "17/01/2026", time: "13:00 - 13:45" }, |
| 9 | + { date: "18/01/2026", time: "14:00 - 14:45" }, |
| 10 | + ], |
| 11 | + }; |
| 12 | + |
| 13 | + if (!hasRegistered) { |
| 14 | + return ( |
| 15 | + <div className="overflow-hidden rounded-lg border border-gray-200 bg-white shadow-xs"> |
| 16 | + <div className="border-b border-gray-200/70 bg-gradient-to-r from-gray-50/80 to-white px-5 py-4"> |
| 17 | + <h3 className="flex items-center gap-2 text-sm font-semibold text-gray-900"> |
| 18 | + <Calendar className="h-4 w-4 text-gray-600" /> |
| 19 | + Lịch đã đăng ký |
| 20 | + </h3> |
| 21 | + </div> |
| 22 | + <div className="px-5 py-8 text-center"> |
| 23 | + <div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-gray-100"> |
| 24 | + <Calendar className="h-6 w-6 text-gray-400" /> |
| 25 | + </div> |
| 26 | + <p className="mt-3 text-sm font-medium text-gray-900">Chưa đăng ký</p> |
| 27 | + <p className="mt-1 text-xs text-gray-500">Bạn chưa đăng ký thời gian thuyết trình</p> |
| 28 | + </div> |
| 29 | + </div> |
| 30 | + ); |
| 31 | + } |
| 32 | + |
| 33 | + return ( |
| 34 | + <div className="overflow-hidden rounded-lg border-1 border-green-200/60 shadow-xs"> |
| 35 | + <div className="border-b border-green-200/60 bg-gradient-to-br from-green-50/80 to-white px-5 py-4"> |
| 36 | + <h3 className="flex items-center gap-2 text-sm font-semibold text-gray-900"> |
| 37 | + <CheckCircle className="h-4 w-4 text-green-600" /> |
| 38 | + Lịch đã đăng ký |
| 39 | + </h3> |
| 40 | + </div> |
| 41 | + <div className="space-y-4 px-5 py-4"> |
| 42 | + {registrationData.trialSlot && ( |
| 43 | + <div> |
| 44 | + <div className="mb-2 flex items-center gap-1.5"> |
| 45 | + <Clock className="h-3.5 w-3.5 text-blue-600" /> |
| 46 | + <p className="text-sm font-semibold text-blue-900">Thuyết trình thử</p> |
| 47 | + </div> |
| 48 | + <div className="rounded-md border-1 border-blue-400 bg-blue-50 px-3 py-2"> |
| 49 | + <div className="flex items-center gap-2 text-sm"> |
| 50 | + <Calendar className="h-3 w-3 text-blue-600" /> |
| 51 | + <span className="font-medium text-blue-900">{registrationData.trialSlot.date}</span> |
| 52 | + <span className="text-blue-500"> - </span> |
| 53 | + <span className="text-blue-800">{registrationData.trialSlot.time}</span> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + </div> |
| 57 | + )} |
| 58 | + |
| 59 | + <div> |
| 60 | + <div className="mb-2 flex items-center gap-1.5"> |
| 61 | + <Clock className="h-3.5 w-3.5 text-green-600" /> |
| 62 | + <p className="text-sm font-semibold text-green-900">Thuyết trình chính thức</p> |
| 63 | + </div> |
| 64 | + <div className="space-y-2"> |
| 65 | + {registrationData.officialSlots.map((slot, index) => ( |
| 66 | + <div key={index} className="bg-primary/10 border-primary rounded-md border-1 px-3 py-2"> |
| 67 | + <div className="flex items-center gap-2 text-sm"> |
| 68 | + <Calendar className="h-3 w-3 text-green-600" /> |
| 69 | + <span className="font-medium text-green-900">{slot.date}</span> |
| 70 | + <span className="text-green-500"> - </span> |
| 71 | + <span className="text-green-800">{slot.time}</span> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + ))} |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + |
| 78 | + <div className="rounded-md border border-amber-200/50 bg-amber-50/50 px-3 py-2"> |
| 79 | + <p className="text-sm text-amber-800"> |
| 80 | + <span className="font-semibold">Lưu ý:</span> Bạn chỉ được đăng ký 1 lần duy nhất. Liên hệ ban |
| 81 | + tổ chức nếu cần thay đổi. |
| 82 | + </p> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + ); |
| 87 | +}; |
| 88 | + |
| 89 | +export default SchedulePresent; |
0 commit comments