1.8 KiB
1.8 KiB
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;--cercato find the Place ID)src/data/orari.ts(snapshot or fallback,orariTestogenerated),officina.tsuses it; legal name added (footer +legalName)- Insegna reads
/dati/orari.jsonat runtime, handles special closures, redraws bars docker-compose.yml:orariservice + shared volume; nginx/dati/no-cache;deploy.shsnapshot +.env.servertransfer- 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-siteandofficinezuliani-orariup;/dati/orari.jsonserved (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