Vans
Van Drive Time
| Path | /van-drive-time |
|---|---|
| Status | todo |
| Drill-down pages | — |
| Pop-ups | (+1 inline) |
| Tabs | — |
| API routes | /api/data/maps-key/api/data/offices/api/data/van-routes/api/data/vans:x/api/js |
Business rules
Written when this page is worked on (docs/BUSINESS-RULES.md).
Database tables & columns
| Table | Columns used |
|---|---|
calendars | calendar_name, city, dentrix_office_id, hubspot_id, short_code, state, status, street_address, zip_code |
companies | hubspot_id, name |
dd_staff_assignments | calendar_id, pending, position, schedule_date, staff_id |
dentrix_offices | app, dentrix_id, name |
equipment_repairs | (columns not named in the SQL) |
geocode_cache | address, found, latitude, longitude, provider |
route_leg_cache | drive_meters, drive_seconds, drive_seconds_static, found, from_lat, from_lng, polyline, provider, to_lat, to_lng |
schedules | calendar_id, date, end_hour, start_hour, van_name |
staff | first_name, id, last_name |
vans | active, color, created_at, home_address, id, name, notes, sort_order |
File structure
Its own files
- apps/
- web/
- src/
- pages/
- VanDriveTime.tsx
- pages/
- src/
- web/
Shared code it uses (followed through its imports and the helpers its API calls; sign-in/access plumbing and UI primitives left out)
- apps/
- web/
- src/
- components/
- reports/
- HowItWorksNote.tsx
- sortable-grid.tsx
- reports/
- hooks/
- useApi.ts
- lib/
- van-colors.ts
- services/
- api.ts
- components/
- src/
- worker/
- src/
- routes/
- data.ts
- services/
- van-legs.ts
- utils/
- office.ts
- routes/
- src/
- web/