Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Feature ID: PF-94 Status: πŸ“‹ Specification Spec Reference: PF-94-multi-timezone-organization-management.md Last Updated: 2026-03-23

Overview

PF-94 adds authoritative site-level IANA timezones, per-site business hours (pf_site_business_hours), and platform hooks for scheduling, SLA, reporting, and notifications. Consumers use the Platform Integration Layer (@/platform/timezone when implemented) rather than direct database access from domain cores.

Integration Points (from Spec)

DependencyTypePurpose
PF-01 (Sites)Platformpf_sites.timezone column; site settings UI
PF-54 (Formatting)PlatformformatInUserTimeZone / related display utilities
PF-84 (Calendar)PlatformHoliday awareness for business-hour calculations
PF-83 (SLA)PlatformSLA engine consumes business-hours semantics
PF schedulingPlatformCross-timezone conflict detection and dual-label display
PM / CL (future)ConsumerAppointment and reporting UIs via platform exports only

API / Platform Contracts (Planned)

  • Client layer (planned): @/platform/timezone (or equivalent path chosen at implementation):
    • useSiteTimezone(siteId) β€” IANA id, format/toSite/toUTC helpers
    • useBusinessHours(siteId) β€” rows, isOpen, next open/close
    • Pure utilities: isBusinessHours(siteId, timestamp) (may delegate to edge or client cache)
  • Data: pf_sites.timezone; pf_site_business_hours with RLS via pf_has_org_access
  • Permission keys: pf.sites.timezone.manage, pf.sites.business-hours.manage

Security and Tenant Isolation

  • All new rows are scoped by organization_id; RLS policies require pf_has_org_access(organization_id, auth.uid()) for all operations.
  • No PHI: configuration and timestamps only; follow standard audit (PF-04) for timezone changes.
  • Application mutations must include .eq('organization_id', orgId) per defense-in-depth.

Event Contracts

No new domain events in Phase 1 unless PF-83 or scheduling publishes optional β€œsite configuration changed” events; document here if added.

Contract completeness

Before implementation freeze, verify sections against CONTRACT_VALIDATION_CHECKLIST.md (platform contracts, tenant isolation, no PHI in payloads).