Calendar fully blocked for unauthenticated users
All checks were successful
Build frontend / build (push) Successful in 46s
All checks were successful
Build frontend / build (push) Successful in 46s
- Overlay blocks entire calendar with 'login to view dates' message - Date cells disabled when not authenticated - Clicking overlay or any disabled date shows login/register dialog
This commit is contained in:
@ -609,7 +609,18 @@ export default function PropertyDetailsPage() {
|
||||
})()}
|
||||
|
||||
{/* Calendar */}
|
||||
<div className="mb-4">
|
||||
<div className="mb-4 relative">
|
||||
{!AuthService.isAuthenticated() && (
|
||||
<div
|
||||
onClick={() => setShowLoginDialog(true)}
|
||||
className="absolute inset-0 z-10 flex items-center justify-center bg-white/80 backdrop-blur-sm rounded-xl cursor-pointer"
|
||||
>
|
||||
<div className="text-center">
|
||||
<LogIn className="w-8 h-8 text-gray-400 mx-auto mb-2" />
|
||||
<p className="text-sm text-gray-500 font-medium">سجّل الدخول لعرض التواريخ المتاحة</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<button onClick={() => setCalendarMonth(new Date(calendarMonth.getFullYear(), calendarMonth.getMonth() - 1))} className="p-1 hover:bg-gray-100 rounded-lg">
|
||||
<ChevronRight className="w-5 h-5" />
|
||||
@ -651,8 +662,8 @@ export default function PropertyDetailsPage() {
|
||||
cells.push(
|
||||
<button
|
||||
key={dateStr}
|
||||
onClick={() => !isPast && handleCalendarClick(dateStr)}
|
||||
disabled={isPast || !available}
|
||||
onClick={() => !isPast && AuthService.isAuthenticated() && handleCalendarClick(dateStr)}
|
||||
disabled={isPast || !available || !AuthService.isAuthenticated()}
|
||||
className={`w-full aspect-square rounded-lg text-sm font-medium transition-all ${
|
||||
isStart || isEnd
|
||||
? 'bg-amber-500 text-white'
|
||||
|
||||
Reference in New Issue
Block a user