gigafibre-fsm/apps/ops/src/api
louispaulb 3599ec995f feat(dispatch): P1-C "Trouver un créneau" — wire suggest-slots to a booking dialog
The hub /dispatch/suggest-slots (gap-finding + travel buffer + proximity
ranking) existed but had NO UI (Gemini claimed SuggestSlotsDialog.vue was
coded — it did not exist). Built it:

- api/dispatch.js: suggestSlots(payload) → POST /dispatch/suggest-slots.
- SuggestSlotsDialog.vue: address (RQA geocode via useAddressSearch) +
  duration + earliest date → ranked slots (tech, date, time, travel min,
  reasons). Selecting a slot emits it.
- DispatchPage: "📅 Créneau" button in the header opens the dialog;
  onSlotSelected prefills the WO create modal (tech + date + address +
  duration) and confirmWo injects the slot's start_time + geocoded coords
  into createJob. Manual "+ WO" clears the booking slot.

Verified: dialog compiles/opens with inputs; suggest-slots returns ranked
slots (e.g. Gilles Drolet 08:15–09:45, journée libre, 15 min). Note: the
address geocode (/api/method/search_address) 403s in the dev preview
because the dev proxy doesn't inject the ERP token that prod nginx adds —
works in prod (same call the create modal already uses).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-03 07:30:08 -04:00
..
address.js Conformité : repli « centre du code postal / ville » pour les unmatched restants (statut 'area') 2026-06-07 17:14:41 -04:00
auth.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
billing.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
campaigns.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
dispatch.js feat(dispatch): P1-C "Trouver un créneau" — wire suggest-slots to a booking dialog 2026-07-03 07:30:08 -04:00
emailQueue.js feat(ops): Email Queue admin page (view/delete/purge ERPNext outbound) 2026-06-02 17:29:33 -04:00
erp.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00
flow-templates.js feat: flow editor, Gemini QR scanner with offline queue, dispatch planning v2 2026-04-22 10:44:17 -04:00
ocr.js feat: unify vision on Gemini + port field tech scan/device into /j 2026-04-22 11:26:01 -04:00
offers.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
presets.js feat: dispatch planning mode, offer pool, shared presets, recurrence selector 2026-04-08 22:44:18 -04:00
reports.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
roster.js fix(dispatch): OSRM for ALL routing + fix waypoint overshoot + detail dialog polish 2026-07-02 20:41:00 -04:00
service-request.js feat: add ops app + CONTEXT.md, simplify URL to /ops/ 2026-03-30 22:41:58 -04:00
sms.js feat: telephony UI, performance indexes, Twilio softphone, lazy-load invoices 2026-04-02 13:59:59 -04:00
subcontractor.js feat(ops): dispatch auto complet + perf Boîte/rapports + fix session 2026-07-02 08:49:35 -04:00
traccar.js refactor: reduce token count, DRY code, consolidate docs 2026-04-13 08:39:58 -04:00