Files
officinazuliani/docs/handoffs/2026-11-04-orari-google.md
T
2026-11-04 16:18:32 +01:00

1.8 KiB
Raw Blame History

Handoff

Issue

None (explicit user instruction: read opening hours from the Google Business Profile via Places API)

Goal

Make Google Business Profile the single source of opening hours.

Status

done — live on https://officinezuliani.a75.eu

What changed

  • scripts/orari-google.mjs (Places API → site format; --cerca to find the Place ID)
  • src/data/orari.ts (snapshot or fallback, orariTesto generated), officina.ts uses it; legal name added (footer + legalName)
  • Insegna reads /dati/orari.json at runtime, handles special closures, redraws bars
  • docker-compose.yml: orari service + shared volume; nginx /dati/ no-cache; deploy.sh snapshot + .env.server transfer
  • ADR 0005, runbook, module map, CLAUDE.md

Tests

  • Run: script with a stubbed Places response (regular hours + holiday + half day) → correct settimana / prossimiGiorni
  • Run: Insegna with a test /dati/orari.json (today closed) → "Chiuso ora · Riapriamo venerdì alle 8:00"; without file → build hours
  • Run: real Places API — Place ID ChIJCY2DP7HKe0cR5gsnqt1z9aU (Officine Zuliani E. di Peresani A. Tosoni B. & C. S.A.S., Viale Venezia 446); snapshot committed
  • Run: deploy — containers officinezuliani-site and officinezuliani-orari up; /dati/orari.json served (no-cache, noindex); live sign shows "Aperto ora · Chiudiamo alle 19:00"

Risks / open questions

  • Google says Mon–Fri 8:00–12:00 / 14:00–19:00; the old site said 18:30. The site now follows Google: client to confirm the listing is right
  • Saturday: closed on Google
  • Billing account required on Google Cloud; check free usage on the current price list
  • Restrict the key to Places API (New) only

Suggested next step

  • Phase 2 content (service pages, FAQ page); contact form decision