Báo cáo audit — Đặt xe + Chỉ đường phòng trọ
Ngày: 2026-07-31 Domain:
D-RIDES·D-RENTAL·D-ROUTEWP:WP-FE-RIDE-FLOW-01·WP-FE-RENT-DIR-01·WP-FE-ROUTE-PARAMS-01·WP-RIDE-VEHICLE-01Surfaces: CON (+ DRV emit status) Phạm vi: MVP journey (không chờ Mapbox / Pay live)
1. Tóm tắt
| Flow | Trước | Sau (MVP) | Status |
|---|---|---|---|
| Đặt xe CON | Coords demo, fare FE lệch BE, status stale | GPS + autocomplete, fare/vehicleType/paymentMethod persist, WALLET debit + refund hủy |
DONE (Mapbox blocked) |
| Chỉ đường phòng trọ | Chỉ Google Maps ngoài app từ list | RentalDetail / list → RoutingDirections nội bộ + lat/lng |
DONE |
| Routing | Không nhận params; Haversine giả “đường thật” | Prefill dest; banner ước lượng khi welife-haversine |
DONE (Mapbox BLOCKED) |
flowchart LR
subgraph rides [DatXe]
RH[RideHome] --> RQ[RideQuote]
RQ --> RM[RideMatching]
RM --> RD[RideDetail]
RD --> RR[RideRate]
end
subgraph rent [PhongTro]
RL[RentalList] --> RDet[RentalDetail]
RDet --> RVS[ViewingSuccess]
end
subgraph route [ChiDuong]
RD0[RoutingDirections] --> RS[RouteSteps]
RS --> RA[RouteActive]
end
RDet -->|Chỉ đường| RD0
RL -->|nav pin| RD0
2. Audit theo màn hình — D-RIDES
| Screen ID | File | User journey | API | Design | Status | Gap còn |
|---|---|---|---|---|---|---|
| SCR-RIDE-HOME | mobile/src/features/rides/screens/RideHomeScreen.tsx |
GPS đón · tìm điểm đến (autocomplete) · mở báo giá · lịch sử | GET /rides · GET /routing/autocomplete · GET /routing/geocode |
090d36cbb1363068692713.jpg |
DONE | Saved address thật (Nhà/Công ty) vẫn shortcut cứng |
| SCR-RIDE-QUOTE | …/RideQuoteScreen.tsx |
Chọn xe + CASH/WALLET · đặt xe (persist + debit ví) | POST /rides (+vehicle,paymentMethod) |
090d… |
DONE | Promo chưa áp dụng |
| SCR-RIDE-MATCHING | …/RideMatchingScreen.tsx |
Poll ghép · RideLiveMap đón/đến · hủy · timeout hint 90s | GET /rides/:id · POST /rides/:id/cancel |
090d… |
DONE | WP-RIDE-MAP-LIVE-01 · MapView từ ride coords |
| SCR-RIDE-DETAIL | …/RideDetailScreen.tsx |
Status · RideLiveMap · GPS · chat/call · rate · share · poll 4s | GET /rides/:id · tracking · cancel · Chat · WS /rides |
090d… |
DONE | WP-RIDE-MAP-LIVE-01 · MapView pickup/dropoff/driver |
| SCR-RIDE-RATE | …/RideRateScreen.tsx |
1–5★ + comment | POST /rides/:id/rate |
090d… |
DONE | Chỉ mở khi COMPLETED/DONE (đã siết) |
BE liên quan: api/src/modules/driver/driver.service.ts — accept / pickup / complete / cancel gọi RidesRealtimeService.emitStatus (WP-FE-RIDE-FLOW-01).
3. Audit theo màn hình — D-RENTAL
| Screen ID | File | User journey | API | Design | Status | Gap còn |
|---|---|---|---|---|---|---|
| SCR-RENT-LIST | mobile/src/features/rentals/screens/RentalListScreen.tsx |
List · GPS nearby · map pin · Chỉ đường nội bộ | GET /rentals · favorites |
0ea609678e9a0fc4568b23.jpg |
DONE | WP-FE-RENT-GPS-01 · fallback DEFAULT_GEO khi deny |
| SCR-RENT-DETAIL | …/RentalDetailScreen.tsx |
Chi tiết · Chỉ đường · Bản đồ ngoài · đặt lịch xem | GET /rentals/:id (có lat/lng) · viewings · report · favorites |
0ea6… |
DONE | Hero ảnh placeholder; slot giờ cứng |
| SCR-RENT-VIEW-SUCCESS | …/RentalViewingSuccessScreen.tsx |
Sau đặt lịch → Chỉ đường / viewings / list | — | HotelSuccess pattern | DONE | — |
| SCR-RENT-VIEWINGS | …/RentalViewingsScreen.tsx |
Xem lịch hẹn · Chỉ đường nếu có lat/lng | GET /rentals/viewings |
0ea6… |
DONE | Không cancel/reschedule |
| SCR-RENT-COMPARE | …/RentalCompareScreen.tsx |
So 2 listing | GET /rentals/:id ×2 |
0ea6… |
PARTIAL | Không directions |
4. Audit theo màn hình — D-ROUTE
| Screen ID | File | User journey | API | Design | Status | Gap còn |
|---|---|---|---|---|---|---|
| SCR-ROUTE-CHOOSE | mobile/src/features/routing/screens/RoutingDirectionsScreen.tsx |
Prefill dest từ rental · GPS origin · search · RouteSteps | GET /routing/autocomplete |
b6ccd00857f5d6ab8fe430.jpg |
DONE | Home/Work shortcut cứng |
| SCR-ROUTE-STEPS | …/RouteStepsScreen.tsx |
Modes · steps · banner ước lượng | POST /routing/directions |
b6ccd… |
DONE | Mapbox live BLOCKED |
| SCR-ROUTE-ACTIVE | …/RouteActiveScreen.tsx |
Dẫn đường + GPS follow · speed/ETA · advance step | — (polyline + device watch) | b6ccd… |
DONE | WP-FE-ROUTE-ACTIVE-01 · Mapbox live vẫn blocked |
Nav types: RoutingDirections nhận { destinationLabel?, destinationLat?, destinationLng?, originLat?, originLng?, originLabel? } — mobile/src/navigation/types.ts.
5. Checklist test tay
- CON → Thuê phòng → Detail → Chỉ đường → thấy RouteSteps + banner “Tuyến ước lượng (chưa Mapbox)” nếu không token.
- CON → List map pin → icon navigation → cùng flow routing.
- CON → Đặt xe → cấp GPS → chọn recent/gợi ý → Quote hiện 3 mức giá BE → Đặt → Matching → (Driver accept) Detail status đổi.
- Matching: nút X → confirm hủy.
- Detail: Chia sẻ lộ trình mở share sheet / Maps.
GET /rentals/:idcólat/lng.POST /routing/directionstrảprovider: welife-haversinekhi thiếu Mapbox.
Smoke đã chạy (2026-07-31)
| Check | Kết quả |
|---|---|
https://api.minhtien.cloud/api/v1/health |
OK |
GET /rentals?lat&lng |
3 items + lat/lng |
GET /rentals/:id |
lat/lng có |
POST /routing/directions |
provider: welife-haversine |
npm run audit:refresh |
328 IMP / 0 STUB |
Local :3000 |
Không chạy lúc audit → smoke qua prod |
6. BLOCKED / ngoài scope
| Mục | Lý do |
|---|---|
WP-ROUTE-MAPBOX-LIVE |
Optional — thay bằng WP-ROUTE-OSM-01 (OSRM) |
WP-ROUTE-OSM-01 |
DONE — provider=welife-osrm trên prod (không cần Mapbox token) |
| Pay / promo debit trên create ride | DONE WP-RIDE-PAY-01 (WALLET debit + refund hủy; promo chưa) |
Persist vehicleType trên Ride |
DONE WP-RIDE-VEHICLE-01 (2026-07-31) |
| Driver GPS production (không simulate) | DRV riêng |
| Partner confirm/reject viewing | Ngoài WP này |
WP-FE-ROUTE-05-FIGMA-SYNC |
Figma MCP blocked |
7. File đụng chính
FE CON
mobile/src/navigation/types.tsmobile/src/features/routing/screens/RoutingDirectionsScreen.tsxmobile/src/features/routing/screens/RouteStepsScreen.tsxmobile/src/features/rentals/screens/RentalDetailScreen.tsxmobile/src/features/rentals/screens/RentalListScreen.tsxmobile/src/features/rides/screens/RideHomeScreen.tsxmobile/src/features/rides/screens/RideQuoteScreen.tsxmobile/src/features/rides/screens/RideMatchingScreen.tsxmobile/src/features/rides/screens/RideDetailScreen.tsxmobile/src/features/rides/rideVehicles.tsmobile/src/services/api.ts(RentalsApi.get+RidesApi.quote.options)
BE
api/src/modules/driver/driver.module.tsapi/src/modules/driver/driver.service.ts(emitStatus)
Docs
docs/reports/RIDE-RENTAL-DIRECTIONS-AUDIT.md(file này)docs/15-COMPLETION-AUDIT-MATRIX.md(ghi WP MVP)
Footer
Domain: D-RIDES · D-RENTAL · D-ROUTE
WP: … · WP-FE-RENT-GPS-01 · WP-FE-ROUTE-ACTIVE-01
Surfaces: CON
Status: IMP (GPS list + active nav)
Local: PASS (tsc + geo tests)
Next: DONE_QUEUE (OSM map live; Mapbox optional)