Skip to content

Service Directory Added#1065

Closed
veenupunyani wants to merge 12 commits into
developfrom
dev-41-service-bc-location-directory
Closed

Service Directory Added#1065
veenupunyani wants to merge 12 commits into
developfrom
dev-41-service-bc-location-directory

Conversation

@veenupunyani

Copy link
Copy Markdown
Collaborator

Other than search using postal code, street address of user, everything else in the ticket requirement should be working

Introduce a static service locations module and wire server-side rendering to hydrate initial data for the appointment booking UI. Added src/data/service-locations.ts with ServiceLocation models and API-to-model mapping helpers; App.tsx refactored to render a public locations directory, location detail pages, and a booking landing page driven by the service locations list or a slug. entry-server.tsx now fetches visible offices from the API, maps them to ServiceLocation, and returns initialData; server.js injects a serialized initialData script into the HTML (with '<' escaped). entry-client.tsx reads window.__APPOINTMENT_BOOKING_INITIAL_DATA__ and passes locations and the current path into App for hydration. Also: updated styles (App.css, index.css) for layout and components, adjusted booking-api typing for getOffices, and updated tests to mock design system components and assert directory/detail/404 renderings.
Add office_hours and office_contact_email to the Office model and schema, with an Alembic migration to add/drop the new columns. Seed additional offices (Nanaimo, Kelowna), update existing office contact info and time slots in manage.py, and wire the new fields into the API-to-frontend mapping. Improve JWT setup in qsystem.py to skip initialization if well-known/jwks config is missing and log a warning. Frontend changes: overhaul appointment-booking styles and App.tsx to add a search bar, convert the card grid to an accessible location list, show contact/hours/email/phone with actions, handle empty service lists, and update sample location data. Expose Postgres on host port 5433 in compose.yaml.
Replace anchor-wrapped buttons with Button components that call a new navigateTo() helper (guards window access). Simplify tag rendering by removing the explicit Tag render and unused Tag import (use TagList directly). Update CSS to underline link elements and remove the service-tag cursor override. Adjust a location row Button to small. Update unit test expectation to reflect the changed hours string format.
Hide per-location "Book an appointment" CTAs when appointments are disabled and remove the global booking callouts from directory and detail pages. Add a non-bookable test office to the serviceLocations fixture and extend tests to cover the non-bookable state; update test expectations accordingly. Adjust intro copy/title and add a CSS rule for the directory intro paragraph. Change API fallback values to explicit "TODO - Data not available from API" placeholders. Update compose.yaml to use postgres:16 and expose port 5432 for local development.
commit d0e2d3c
Author: Veenu Punyani <[email protected]>
Date:   Thu May 28 14:58:05 2026 -0700

    Use nginx to serve appointment-booking

    Switch  to nginx and serve built assets statically. Added nginx.conf and public/config/runtime-config.json, removed the custom Node server and in-image logos, and updated Dockerfile to copy dist into /app and run nginx on 8080. Updated package.json preview script to use vite preview, adjusted docker compose port mapping (5173:8080) and README instructions, and added ci_output.txt to .gitignore while deleting the file. Also expanded local CORS origins in api/config.py to include Vite ports 5173/5174.

commit ce05eee
Author: Veenu Punyani <[email protected]>
Date:   Tue May 26 23:18:37 2026 -0700

    Switch appointment-booking to Vite client app

    Replace SSR setup with a client-side Vite React app and simplify runtime server. Removed server-side entry and SSR rendering, renamed client entry to main.tsx using createRoot, and updated index.html to remove SSR outlet. package.json scripts now use vite for dev and build. server.js simplified to a static file server that serves dist files and exposes /config/runtime-config.json. Dockerfile and compose.yaml adjusted to run the frontend image (added appointment-booking service in compose, exposed port 5173, and updated Postgres image/ports). Documentation updated across README files to document the new React Vite app and dev/run instructions.
design changed, search added, maps added
@sonarqubecloud

Copy link
Copy Markdown

@veenupunyani veenupunyani deleted the dev-41-service-bc-location-directory branch June 17, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant