Skip to content

feat: Add Nearby Labs feature and commission fee displays#111

Merged
aditya241104 merged 1 commit intomainfrom
feature/auth-quicklab
Jan 24, 2026
Merged

feat: Add Nearby Labs feature and commission fee displays#111
aditya241104 merged 1 commit intomainfrom
feature/auth-quicklab

Conversation

@aditya241104
Copy link
Collaborator

@aditya241104 aditya241104 commented Jan 24, 2026

  • Add Nearby Labs page with geolocation detection
  • Add 'Nearby Labs' button to QuickLab navigation (desktop & mobile)
  • Display QuickClinic 1% commission fee in booking summaries
  • Add new route for nearby labs feature
  • Fix QuickMed navbar Explore dropdown rendering

Project

  • QuickClinic
  • QuickMed
  • QuickLab

Change Type

  • New Feature/Page/API Endpoint
  • Bug Fix
  • UI Redesign
  • Optimization
  • Other

Stack

  • Frontend
  • Backend
  • Both

Page Type

  • Public
  • Patient
  • Doctor
  • Admin

Route/API Endpoint Status

  • New
  • Existing

What Changed

Route/API Affected

Description

Screenshots (If Applicable)

Mobile View

Desktop View

Code Quality

  • Prettier syntax check passed (npx prettier --check .)

Related Issues

Closes #

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Nearby Labs" discovery feature with automatic location detection and city-based search results
    • Introduced QuickClinic Commission fee display (1% platform fee) in booking summaries
    • Added option to change location/city when searching for nearby labs
  • UI Improvements

    • Enhanced navigation with map-based "Nearby Labs" button in navigation bars
    • Improved accessibility by making Explore section always visible on desktop
    • Better spacing adjustments in booking summary layouts

✏️ Tip: You can customize this high-level summary in your review settings.

- Add Nearby Labs page with geolocation detection
- Add 'Nearby Labs' button to QuickLab navigation (desktop & mobile)
- Display QuickClinic 1% commission fee in booking summaries
- Add new route for nearby labs feature
- Fix QuickMed navbar Explore dropdown rendering
@vercel
Copy link

vercel bot commented Jan 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
quick-clinic Ready Ready Preview, Comment Jan 24, 2026 5:58am
quick-clinic-m9k7 Ready Ready Preview, Comment Jan 24, 2026 5:58am

@aditya241104 aditya241104 merged commit cca8800 into main Jan 24, 2026
4 of 6 checks passed
@aditya241104 aditya241104 deleted the feature/auth-quicklab branch January 24, 2026 05:58
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 24, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request introduces a "Nearby Labs" feature for QuickLab with a new component for city-based lab discovery, adds a 1% QuickClinic Commission fee display to booking summaries, and makes the Explore dropdown always visible in QuickMed's navbar.

Changes

Cohort / File(s) Summary
QuickLab Nearby Labs Feature
client/src/pages/quicklab/NearbyLabs.jsx, client/src/routes/QuickLabRoutes.jsx, client/src/components/quicklab/DesktopNavbar.jsx, client/src/components/quicklab/MobileNavbar.jsx
New NearbyLabs component (282 lines) with city detection, lab search, and responsive grid display. Detects user city on mount, fetches nearby labs (limit 50), includes city-change modal with validation. Updated navbars (Desktop/Mobile) with conditional MapPin-icon "Nearby Labs" button visible for unauthenticated/patient users, navigating to /quick-lab/nearby. Route added to QuickLabRoutes.
Booking Summary Commission Display
client/src/components/Patient/BookAppointment/BookingSummary.jsx, client/src/pages/quicklab/LabDetails.jsx
Added "QuickClinic Commission" informational block (1% of consultation fee) beneath totals in both components. Block displays calculated fee (₹{Math.round(fee \* 0.01)}) with blue-tinted background/border styling. Consultation Fee row adjusted with bottom margin (mb-3).
QuickMed Navigation Update
client/src/components/quickmed/Navbar.jsx
Removed authentication-based gating; Explore dropdown now always renders on desktop regardless of authentication status or user role.

Sequence Diagram

sequenceDiagram
    participant User
    participant NearbyLabs as NearbyLabs<br/>Component
    participant CityService as City Detection<br/>Service
    participant LabAPI as Lab Search<br/>API
    participant UI as Lab Grid<br/>Display

    User->>NearbyLabs: Page Mount
    NearbyLabs->>CityService: detectUserCity()
    CityService-->>NearbyLabs: city detected
    NearbyLabs->>LabAPI: searchLabs(city, limit: 50)
    LabAPI-->>NearbyLabs: labs array
    NearbyLabs->>UI: Render lab cards<br/>(logo, rating, address,<br/>contact, tests, home collection)
    
    User->>NearbyLabs: Click "Change location"
    NearbyLabs->>NearbyLabs: Show city input modal
    User->>NearbyLabs: Enter city + Apply
    NearbyLabs->>LabAPI: searchLabs(newCity, limit: 50)
    LabAPI-->>NearbyLabs: updated labs array
    NearbyLabs->>UI: Re-render grid
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #72: Modifies BookingSummary.jsx to rework UI and props; directly affected by this PR's commission display addition.
  • PR #71: Introduces the original BookingSummary component; this PR extends it with commission fee block.
  • PR #108: Adds initial QuickLab navbar/routes infrastructure; this PR extends it with Nearby Labs navigation and routing.

Suggested labels

enhancement, UI

Poem

🐰 A rabbit hops through nearby labs with glee,
Detecting cities with precision and speed,
Commission blocks now gleam in sapphire blue,
Navbars guide the way to clinics anew! ✨

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

📋 PR Auto-Check

📝 Files Changed

client/src/components/Patient/BookAppointment/BookingSummary.jsx
client/src/components/quicklab/DesktopNavbar.jsx
client/src/components/quicklab/MobileNavbar.jsx
client/src/components/quickmed/Navbar.jsx
client/src/pages/quicklab/LabDetails.jsx
client/src/pages/quicklab/NearbyLabs.jsx
client/src/routes/QuickLabRoutes.jsx

✨ Code Quality

Prettier Check: ❌ Failed


Auto-generated on 2026-01-24T05:58:45.870Z

@github-actions
Copy link

📋 PR Auto-Check

📝 Files Changed

client/src/components/Patient/BookAppointment/BookingSummary.jsx
client/src/components/quicklab/DesktopNavbar.jsx
client/src/components/quicklab/MobileNavbar.jsx
client/src/components/quickmed/Navbar.jsx
client/src/pages/quicklab/LabDetails.jsx
client/src/pages/quicklab/NearbyLabs.jsx
client/src/routes/QuickLabRoutes.jsx

✨ Code Quality

Prettier Check: ❌ Failed


Auto-generated on 2026-01-24T06:00:40.292Z

@coderabbitai coderabbitai bot mentioned this pull request Jan 24, 2026
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments