diff --git a/Frontend/src/App.tsx b/Frontend/src/App.tsx index a7973178..1c5cb227 100644 --- a/Frontend/src/App.tsx +++ b/Frontend/src/App.tsx @@ -11,11 +11,14 @@ import { GlobalLoadingProvider } from './contexts/GlobalLoadingContext'; import { CookieConsentProvider } from './contexts/CookieConsentContext'; import { CurrencyProvider } from './contexts/CurrencyContext'; import { CompanySettingsProvider } from './contexts/CompanySettingsContext'; +import { AuthModalProvider } from './contexts/AuthModalContext'; import OfflineIndicator from './components/common/OfflineIndicator'; import CookieConsentBanner from './components/common/CookieConsentBanner'; import AnalyticsLoader from './components/common/AnalyticsLoader'; import Loading from './components/common/Loading'; import ScrollToTop from './components/common/ScrollToTop'; +import AuthModalManager from './components/modals/AuthModalManager'; +import ResetPasswordRouteHandler from './components/ResetPasswordRouteHandler'; import useAuthStore from './store/useAuthStore'; import useFavoritesStore from './store/useFavoritesStore'; @@ -50,10 +53,6 @@ const InvoicePage = lazy(() => import('./pages/customer/InvoicePage')); const ProfilePage = lazy(() => import('./pages/customer/ProfilePage')); const AboutPage = lazy(() => import('./pages/AboutPage')); const ContactPage = lazy(() => import('./pages/ContactPage')); -const LoginPage = lazy(() => import('./pages/auth/LoginPage')); -const RegisterPage = lazy(() => import('./pages/auth/RegisterPage')); -const ForgotPasswordPage = lazy(() => import('./pages/auth/ForgotPasswordPage')); -const ResetPasswordPage = lazy(() => import('./pages/auth/ResetPasswordPage')); const AdminDashboardPage = lazy(() => import('./pages/admin/DashboardPage')); const InvoiceManagementPage = lazy(() => import('./pages/admin/InvoiceManagementPage')); @@ -69,17 +68,7 @@ const ReceptionDashboardPage = lazy(() => import('./pages/admin/ReceptionDashboa const StaffDashboardPage = lazy(() => import('./pages/staff/DashboardPage')); const ChatManagementPage = lazy(() => import('./pages/staff/ChatManagementPage')); const StaffLayout = lazy(() => import('./pages/StaffLayout')); - -const DemoPage: React.FC<{ title: string }> = ({ title }) => ( -
- This page is under development... -
-+ {settings.company_tagline} +
+ )} ++ Enter your email to receive a password reset link for {settings.company_name || 'Luxury Hotel'} +
++ We have sent a password reset link to +
++ {submittedEmail} +
++ Note: +
++ Don't have an account?{' '} + +
++ If you're having trouble resetting your password, please contact our support team via email{' '} + + {supportEmail} + + {supportPhone && ( + <> + {' '}or hotline{' '} + + {supportPhone} + + > + )} +
++ {settings.company_tagline} +
+ )} ++ {requiresMFA + ? 'Enter the 6-digit code from your authenticator app' + : `Sign in to ${settings.company_name || 'Luxury Hotel'}`} +
++ Don't have an account?{' '} + +
++ {settings.company_tagline} +
+ )} ++ Join {settings.company_name || 'Luxury Hotel'} for exclusive benefits +
++ {settings.company_tagline} +
+ )} ++ {isSuccess + ? 'Password has been reset successfully' + : `Enter a new password for your ${settings.company_name || 'Luxury Hotel'} account`} +
++ Your password has been updated. +
++ You can now login with your new password. +
++ Redirecting to login... +
++ {settings.company_tagline} +
+ )} + + {/* 404 Number */} ++ We're sorry, but the page you're looking for doesn't exist or has been moved. +
++ The page you requested could not be found on our server. +
+- {settings.company_tagline} -
- )} -- Enter your email to receive a password reset link for {settings.company_name || 'Luxury Hotel'} -
-- We have sent a password reset link to -
-- {submittedEmail} -
-- Note: -
-- Don't have an account?{' '} - - Register now - -
-- If you're having trouble resetting your password, - please contact our support team via email{' '} - - {supportEmail} - - {supportPhone && ( - <> - {' '}or hotline{' '} - - {supportPhone} - - > - )} -
-- {settings.company_tagline} -
- )} -- {requiresMFA - ? 'Enter the 6-digit code from your authenticator app' - : `Sign in to ${settings.company_name || 'Luxury Hotel'}`} -
-- Don't have an account?{' '} - - Register now - -
-- By logging in, you agree to our{' '} - - Terms of Service - {' '} - and{' '} - - Privacy Policy - -
-- {settings.company_tagline} -
- )} -- Join {settings.company_name || 'Luxury Hotel'} for exclusive benefits -
-- {settings.company_tagline} -
- )} -- {isSuccess - ? 'Password has been reset successfully' - : `Enter a new password for your ${settings.company_name || 'Luxury Hotel'} account`} -
-- Your password has been updated. -
-- You can now login with your new password. -
-- Redirecting to login page... -
-You need to login to view your favorites list
- openModal('login')} className="inline-block px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-semibold" > Login - +