This commit is contained in:
Iliyan Angelov
2025-12-06 03:27:35 +02:00
parent 7667eb5eda
commit 5a8ca3c475
2211 changed files with 28086 additions and 37066 deletions

View File

@@ -13,6 +13,8 @@ import {
Star,
Users,
AlertCircle,
Bell,
Shield,
} from 'lucide-react';
import { useClickOutside } from '../hooks/useClickOutside';
import { useCompanySettings } from '../contexts/CompanySettingsContext';
@@ -137,6 +139,21 @@ const Header: React.FC<HeaderProps> = ({
</Link>
{userInfo?.role !== 'admin' && userInfo?.role !== 'staff' && userInfo?.role !== 'accountant' && userInfo?.role !== 'housekeeping' && (
<>
<Link
to="/dashboard"
onClick={() =>
setIsMobileMenuOpen(false)
}
className="flex items-center
space-x-2 px-4 py-3 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
rounded-sm transition-all duration-300
border-l-2 border-transparent
hover:border-[#d4af37] font-light tracking-wide"
>
<Calendar className="w-4 h-4" />
<span>Dashboard</span>
</Link>
<Link
to="/favorites"
onClick={() =>
@@ -212,6 +229,36 @@ const Header: React.FC<HeaderProps> = ({
<AlertCircle className="w-4 h-4" />
<span>Complaints</span>
</Link>
<Link
to="/guest-requests"
onClick={() =>
setIsMobileMenuOpen(false)
}
className="flex items-center
space-x-2 px-4 py-3 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
rounded-sm transition-all duration-300
border-l-2 border-transparent
hover:border-[#d4af37] font-light tracking-wide"
>
<Bell className="w-4 h-4" />
<span>Guest Requests</span>
</Link>
<Link
to="/gdpr"
onClick={() =>
setIsMobileMenuOpen(false)
}
className="flex items-center
space-x-2 px-4 py-3 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
rounded-sm transition-all duration-300
border-l-2 border-transparent
hover:border-[#d4af37] font-light tracking-wide"
>
<Shield className="w-4 h-4" />
<span>Privacy & Data</span>
</Link>
</>
)}
{userInfo?.role === 'admin' && (
@@ -265,6 +312,23 @@ const Header: React.FC<HeaderProps> = ({
<span>Accountant Dashboard</span>
</Link>
)}
{userInfo?.role === 'housekeeping' && (
<Link
to="/housekeeping"
onClick={() =>
setIsMobileMenuOpen(false)
}
className="flex items-center
space-x-2 px-4 py-3 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
rounded-sm transition-all duration-300
border-l-2 border-transparent
hover:border-[#d4af37] font-light tracking-wide"
>
<User className="w-4 h-4" />
<span>Housekeeping Dashboard</span>
</Link>
)}
<div className="border-t border-[#d4af37]/20 my-2"></div>
<button
onClick={handleLogout}
@@ -429,6 +493,18 @@ const Header: React.FC<HeaderProps> = ({
</Link>
{userInfo?.role !== 'admin' && userInfo?.role !== 'staff' && userInfo?.role !== 'accountant' && userInfo?.role !== 'housekeeping' && (
<>
<Link
to="/dashboard"
onClick={() => setIsUserMenuOpen(false)}
className="flex items-center space-x-3
px-4 py-2.5 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
transition-all duration-300 border-l-2 border-transparent
hover:border-[#d4af37]"
>
<Calendar className="w-4 h-4" />
<span className="font-light tracking-wide">Dashboard</span>
</Link>
<Link
to="/favorites"
onClick={() => setIsUserMenuOpen(false)}
@@ -489,6 +565,30 @@ const Header: React.FC<HeaderProps> = ({
<AlertCircle className="w-4 h-4" />
<span className="font-light tracking-wide">Complaints</span>
</Link>
<Link
to="/guest-requests"
onClick={() => setIsUserMenuOpen(false)}
className="flex items-center space-x-3
px-4 py-2.5 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
transition-all duration-300 border-l-2 border-transparent
hover:border-[#d4af37]"
>
<Bell className="w-4 h-4" />
<span className="font-light tracking-wide">Guest Requests</span>
</Link>
<Link
to="/gdpr"
onClick={() => setIsUserMenuOpen(false)}
className="flex items-center space-x-3
px-4 py-2.5 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
transition-all duration-300 border-l-2 border-transparent
hover:border-[#d4af37]"
>
<Shield className="w-4 h-4" />
<span className="font-light tracking-wide">Privacy & Data</span>
</Link>
</>
)}
{userInfo?.role === 'admin' && (
@@ -539,6 +639,22 @@ const Header: React.FC<HeaderProps> = ({
<span className="font-light tracking-wide">Accountant Dashboard</span>
</Link>
)}
{userInfo?.role === 'housekeeping' && (
<Link
to="/housekeeping"
onClick={() =>
setIsUserMenuOpen(false)
}
className="flex items-center
space-x-3 px-4 py-2.5 text-white/90
hover:bg-[#d4af37]/10 hover:text-[#d4af37]
transition-all duration-300 border-l-2 border-transparent
hover:border-[#d4af37]"
>
<User className="w-4 h-4" />
<span className="font-light tracking-wide">Housekeeping Dashboard</span>
</Link>
)}
<div className="border-t border-[#d4af37]/20 my-1"></div>
<button
onClick={handleLogout}

View File

@@ -18,7 +18,8 @@ import {
Shield,
Activity,
TrendingUp,
FileCheck
FileCheck,
Monitor
} from 'lucide-react';
import useAuthStore from '../../store/useAuthStore';
import { useResponsive } from '../../hooks';
@@ -134,6 +135,11 @@ const SidebarAccountant: React.FC<SidebarAccountantProps> = ({
icon: User,
label: 'My Profile'
},
{
path: '/accountant/sessions',
icon: Monitor,
label: 'Session Management'
},
];
const isActive = (path: string) => {

View File

@@ -38,7 +38,10 @@ import {
HardDrive,
Activity,
Calendar,
Boxes
Boxes,
Monitor,
CreditCard,
MessageSquare
} from 'lucide-react';
import useAuthStore from '../../store/useAuthStore';
import { useResponsive } from '../../hooks';
@@ -136,7 +139,12 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
{
path: '/admin/advanced-rooms',
icon: Hotel,
label: 'Room Management'
label: 'Rooms & Housekeeping'
},
{
path: '/admin/services',
icon: Activity,
label: 'Services'
},
{
path: '/admin/inventory',
@@ -151,24 +159,23 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
]
},
{
title: 'Business',
title: 'Bookings & Finance',
icon: TrendingUp,
items: [
{
path: '/admin/business',
icon: FileText,
label: 'Business Dashboard'
path: '/admin/bookings',
icon: Calendar,
label: 'All Bookings'
},
]
},
{
title: 'Analytics & Reports',
icon: BarChart3,
items: [
{
path: '/admin/analytics',
icon: BarChart3,
label: 'Analytics'
path: '/admin/payments',
icon: CreditCard,
label: 'Payments'
},
{
path: '/admin/invoices',
icon: FileText,
label: 'Invoices'
},
{
path: '/admin/financial-audit',
@@ -177,6 +184,22 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
},
]
},
{
title: 'Analytics',
icon: BarChart3,
items: [
{
path: '/admin/analytics',
icon: BarChart3,
label: 'Reports & Analytics'
},
{
path: '/admin/business',
icon: TrendingUp,
label: 'Business Insights'
},
]
},
{
title: 'Users & Guests',
icon: Users,
@@ -235,6 +258,17 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
},
]
},
{
title: 'Communication',
icon: MessageSquare,
items: [
{
path: '/admin/team-chat',
icon: MessageSquare,
label: 'Team Chat'
},
]
},
{
title: 'Content Management',
icon: Globe,
@@ -285,11 +319,6 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
icon: Settings,
label: 'Settings'
},
{
path: '/admin/compliance',
icon: ClipboardCheck,
label: 'Compliance'
},
{
path: '/admin/approvals',
icon: CheckCircle2,
@@ -298,7 +327,7 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
{
path: '/admin/gdpr',
icon: Download,
label: 'GDPR'
label: 'GDPR & Compliance'
},
{
path: '/admin/webhooks',
@@ -315,11 +344,22 @@ const SidebarAdmin: React.FC<SidebarAdminProps> = ({
icon: HardDrive,
label: 'Backups'
},
]
},
{
title: 'Account',
icon: User,
items: [
{
path: '/admin/profile',
icon: User,
label: 'My Profile'
},
{
path: '/admin/sessions',
icon: Monitor,
label: 'Sessions'
},
]
},
];

View File

@@ -12,6 +12,7 @@ import {
X,
CreditCard,
MessageCircle,
MessageSquare,
Award,
Users,
Wrench,
@@ -20,7 +21,8 @@ import {
AlertTriangle,
TrendingUp,
Package,
Calendar
Calendar,
Monitor
} from 'lucide-react';
import useAuthStore from '../../store/useAuthStore';
import { useChatNotifications } from '../../features/notifications/contexts/ChatNotificationContext';
@@ -143,6 +145,11 @@ const SidebarStaff: React.FC<SidebarStaffProps> = ({
icon: Package,
label: 'Inventory'
},
{
path: '/staff/loyalty',
icon: Award,
label: 'Loyalty Program'
},
{
path: '/staff/shifts',
icon: Calendar,
@@ -151,7 +158,12 @@ const SidebarStaff: React.FC<SidebarStaffProps> = ({
{
path: '/staff/chats',
icon: MessageCircle,
label: 'Chat Support'
label: 'Guest Chat'
},
{
path: '/staff/team-chat',
icon: MessageSquare,
label: 'Team Chat'
},
{
path: '/staff/reports',
@@ -163,6 +175,11 @@ const SidebarStaff: React.FC<SidebarStaffProps> = ({
icon: Users,
label: 'My Profile'
},
{
path: '/staff/sessions',
icon: Monitor,
label: 'Session Management'
},
];
const isActive = (path: string) => {