fix(api): case-insensitive contact matching on cruise import#105
fix(api): case-insensitive contact matching on cruise import#105Systemsaholic merged 5 commits intomainfrom
Conversation
Comprehensive design spec for the consumer-facing OTA covering: - Application architecture (Next.js 15.x on Vercel, existing NestJS API) - AI Concierge with real API tools (Amadeus, Traveltek, Globus) - Advisor micro-sites synced from TravelLeaders Network profiles - Attribution system with 30-day referral cookies and CRM priority chain - Deals system fed by existing VPS scraper via new API endpoint - Search pages for flights, hotels, cars, cruises, tours, all-inclusives - Data model (advisor_profiles, deals, ota_referrals, itinerary_templates additions) - Auth strategy (public endpoints, service-to-service keys, rate limiting) - Cross-cutting concerns (SEO, a11y, mobile, error handling) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Key corrections based on codebase audit: - cruise-repository (already public) replaces FusionAPI for Phase 1 search - Hotels are composite (Google Places + Amadeus + Booking.com), not Amadeus-only - Template publishing uses separate ota_published_trips table with snapshot (itinerary_templates stores JSON blobs, not relational itinerary data) - Flights/hotels need public facade endpoints (existing are JWT-gated) - Airport lookup endpoint needed for flight search UX - tour-repository and Globus live proxy both already public - Updated API endpoints to reflect actual vs new capabilities Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- FusionAPI required for live cruise pricing (not just catalog) - Remove Booking.com from hotel search — Amadeus only - Defer car rentals to Phase 2 (no provider exists) - Update all search, tool, and endpoint references accordingly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Admins can now switch between Agent view (personal trips only), Agency view (all agency trips), or Both (current behavior). The toggle scopes KPI cards, charts, widgets, and leaderboard visibility. Selection persists to localStorage. Non-admin users always see personal view only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The import flow normalized passenger names to title case but matched against existing contacts using exact case-sensitive eq(). If an existing contact was stored as "gaetan" but the import normalized to "Gaetan", a duplicate was created. Switch to LOWER() comparison for firstName and lastName matching. fixes #103 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughIntroduced a "view" selection feature to the admin dashboard enabling filtering between personal, agency, and combined views. Frontend manages view state with localStorage persistence; backend API supports the Changes
Sequence Diagram(s)sequenceDiagram
actor Admin as Admin User
participant UI as Dashboard Page
participant Hook as useDashboardOverview
participant QK as React Query
participant API as Dashboard API
participant Service as DashboardService
participant DB as Database
Admin->>UI: Select view (personal/agency/all)
UI->>UI: setView(), persist to localStorage
UI->>Hook: useDashboardOverview({view})
Hook->>QK: queryKey includes {view}
QK->>API: GET /dashboard/overview?view=X
API->>Service: getOverview(auth, {view})
alt view === 'personal' or 'all'
Service->>DB: Query personal KPIs
DB-->>Service: Personal KPI data
end
alt view === 'agency' or 'all'
Service->>DB: Query agency KPIs & leaderboard
DB-->>Service: Agency KPI data
end
Service->>Service: Compute trends if both prior+current
Service-->>API: Dashboard overview (scoped by view)
API-->>Hook: KPI response
Hook-->>UI: Updated dashboard data
UI->>UI: Render KPI sections conditionally
UI-->>Admin: Display filtered dashboard
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
eq()match on firstName/lastNameLOWER()comparison for case-insensitive matchingTest plan
fixes #103
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation