diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 6cb1e59..94da970 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -27,7 +27,8 @@ const NAV = [ { id: 'gallery', label: 'Images', icon: '🖼️' }, { id: 'slides', label: 'Slideshow', icon: '🎞️' }, { id: 'calendar', label: 'Calendar', icon: '📅' }, - { id: 'social', label: 'Social Events', icon: '🎪' }, + { id: 'social', label: 'Public Events', icon: '🎪' }, + { id: 'private-events', label: 'Private Events', icon: '🔒' }, { id: 'rooms', label: 'Rooms', icon: '🏨' }, { id: 'amenities', label: 'Amenities', icon: '✨' }, { id: 'trips', label: 'Trips', icon: '✈️' }, @@ -273,8 +274,11 @@ function ImageGallery({ images, onDelete }: { images: Image[]; onDelete: (id: nu const sectionCategories = [ { key: 'slides', label: '🎞️ Slideshow Gallery', filter: (i: Image) => i.category === 'slides' || i.location_target === 'slides' }, { key: 'food', label: '🍽️ Food Gallery', filter: (i: Image) => i.category === 'food' || i.location_target === 'food' }, + { key: 'spa', label: '🧖 Spa Gallery', filter: (i: Image) => i.category === 'spa' || i.location_target === 'spa' }, + { key: 'pool', label: '🏊 Pool Gallery', filter: (i: Image) => i.category === 'pool' || i.location_target === 'pool' }, { key: 'calendar', label: '📅 Calendar Events Gallery', filter: (i: Image) => i.category === 'calendar' || i.location_target === 'calendar' }, - { key: 'social', label: '🎪 Social Events Gallery', filter: (i: Image) => i.category === 'social' || i.location_target === 'social' }, + { key: 'public', label: '🎪 Public Events Gallery', filter: (i: Image) => i.category === 'public' || i.location_target === 'public' || i.category === 'social' || i.location_target === 'social' }, + { key: 'private', label: '🔒 Private Events Gallery', filter: (i: Image) => i.category === 'private' || i.location_target === 'private' }, ]; // Group room images by room location_target (e.g. "room-1", "room-2") @@ -292,6 +296,10 @@ function ImageGallery({ images, onDelete }: { images: Image[]; onDelete: (id: nu if (selectedCategory === 'all') return true; if (selectedCategory === 'rooms') return img.category === 'rooms' || img.location_target?.startsWith('room-'); if (selectedCategory === 'food') return img.category === 'food' || img.location_target === 'food'; + if (selectedCategory === 'spa') return img.category === 'spa' || img.location_target === 'spa'; + if (selectedCategory === 'pool') return img.category === 'pool' || img.location_target === 'pool'; + if (selectedCategory === 'public') return img.category === 'public' || img.location_target === 'public' || img.category === 'social' || img.location_target === 'social'; + if (selectedCategory === 'private') return img.category === 'private' || img.location_target === 'private'; return img.category === selectedCategory || img.location_target === selectedCategory; }); @@ -389,7 +397,7 @@ function ImageGallery({ images, onDelete }: { images: Image[]; onDelete: (id: nu border: `1px solid ${C.border}`, background: '#fff', boxShadow: C.shadow, }}> - {['all', 'slides', 'food', 'calendar', 'social', 'rooms', 'other'].map((cat) => ( + {['all', 'slides', 'food', 'spa', 'pool', 'calendar', 'public', 'private', 'rooms', 'other'].map((cat) => ( setSelectedCategory(cat)} @@ -786,9 +794,9 @@ function SocialSection({ events, setEvents, images, onToast }: any) { return (
- setEditing({ id: 0, name: '', description: '', price: null, date: null, photos: [], featured_photo: null, active: true, sort_order: events.length })} size="sm">+ New Event} /> - {events.length === 0 ? : ( + {events.length === 0 ? : (
{events.map((ev: SocialEvent) => ( void }) { + return ( +
+ + +
+ ); +} + function RoomsSection({ rooms, setRooms, images, onToast }: any) { const [editing, setEditing] = useState(null); const [confirmDel, setConfirmDel] = useState(null); @@ -2548,6 +2565,7 @@ export default function AdminPage() { case 'slides': return ; case 'calendar': return ; case 'social': return ; + case 'private-events': return ; case 'rooms': return ; case 'amenities': return ; case 'menu': return ;