Project

General

Profile

Edit Copy Actions

Feature #9110

closed

work on guest login and integrate across the mythri website

Added by Subhani Shaik about 8 hours ago. Updated about 8 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
06/19/2026
Due date:
06/19/2026
% Done:

100%

Estimated time:
8:00 h
Spent time:

Add

Subtasks


Add

Related issues

Actions #1

Updated by Subhani Shaik about 8 hours ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Estimated time set to 8:00 h

Updated by Subhani Shaik about 8 hours ago

  1. Complete Work Description (Mythri Restaurant Customer-Facing Updates)
  1. 1. Security & Validations Hardening
    Unified strict input validations and password policies across all authentication points (Login, Register, Guest Modal, Reset Password).
  1. Password Policy Overhaul
    - Strict Complexity: Enforced a new, highly secure password policy requiring a minimum of 6 characters and a maximum of 20 characters.
    - Character Requirements: Passwords must contain at least one uppercase letter, one lowercase letter, and one special character.
    - Scope: Applied globally to both `RegisterPage.tsx` and `ResetPasswordPage.tsx`.
  1. Unified Form Validations (Login, Register, Guest)
    - Name Fields (First/Last):
    - Constraint: Hard limit of 25 characters maximum.
    - Sanitization: Implemented live-typing interceptors that actively strip out numbers and all special characters, ensuring only letters and spaces are recorded.
    - Phone Fields:
    - Constraint: Enforced a strict 10-digit raw limit.
    - Sanitization: Blocks all letters and special characters natively. Inputs automatically format to the standard US layout `(XXX) XXX-XXXX`. Submissions are strictly blocked if exactly 10 raw digits aren't present.
    - Email Fields:
    - Constraint: Replaced the legacy loose regex with a strict global standard (`/^[a-zA-Z0-9._\-+]+[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$/`).
    - *Sanitization:* Rejects all special characters (e.g., `!`, `#`, `$`, `%`) before the `
    ` symbol, strictly allowing only `.` `_` `-` `+`.

  1. 2. UX Overhaul: Table Booking Flow
    Redesigned the table booking system to remove friction and behave with the same seamless experience as the Menu.
  1. Frictionless UI Redesign
    - Simplified Interface: Completely stripped out the clunky personal detail inputs (Name, Phone, Email) from the primary `BookPage.tsx` screen to drastically lower cognitive load. Users now solely select their Date, Guests, and Time.
    - Smart Auth Modal Integration: When a user clicks "Confirm Booking", they are no longer redirected to a different page. Instead, the centralized `AuthModal` instantly slides up.
  1. Intelligent Booking Execution
    - Guest Intercept: If the user selects "Continue as Guest", they fill out their details in the modal, and the table is booked instantly without ever leaving the page.
    - Magic Auto-Submit: If the user chooses to "Login" or "Register", their selected table slot is cached in the browser's `sessionStorage`. Once authentication is complete, they are seamlessly redirected back and the system automatically completes the booking in the background without requiring a second click.

  1. 3. Cart & Checkout Unification
    Synchronized the guest checkout and table booking states to eliminate redundant data entry.

- Centralized `AuthModal`: Refactored the `AuthModal.tsx` to handle authentication from anywhere in the application dynamically via the `onGuestSubmit` callback.
- Cross-Pollination of Data: Wired the system so that if a user books a table as a guest, their contact information is securely cached in `sessionStorage`. If they subsequently navigate to their Cart to order food, the Checkout page is magically pre-filled with the exact details they used for their table reservation.


  1. 4. Core Bug Fixes & System Cleanup
    - Infinite Reload Loop Fix: Patched a critical bug in the core API interceptor (`axios.ts`) that was causing the frontend to fall into an infinite reload loop when handling `401 Unauthorized` errors during token expiration.
    - Filesystem Cleanup: Identified and deleted stubborn background testing files (`test_hours.json`, `test_slots.js`) that were locking up the Git branch and causing "Device or resource busy" system errors.

Status: All tasks have been successfully implemented, compiled, and actively running on the local environment without errors.

Edit Copy Actions

Also available in: Atom PDF