feat(admin): align UI with Backend Brooke Phase 2 contracts, flip mocks to real endpoints
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Phase 2 Integration Updates: - Profile UI: Read/write address and contact fields from settings.address/settings.contact JSONB structure - Court dependencies: Updated modal to show 3 counts (slot_definitions, slot_instances_future, slot_instances_booked) - Error codes: Fixed duplicate court check to use court_name_duplicate (matches backend) - Mock flags: Flipped all 9 USE_MOCKS flags to false (courts.ts x7, materialisation.ts x2) Profile Tab (ClubProfileTab.tsx): - Read address fields from profile.settings?.address?.line_1 etc. - Read contact fields from profile.settings?.contact?.phone etc. - Write to settings structure preserving existing settings - Added Info icon tooltips: "Stored in settings until native fields ship" - Removed Integration section (provider/remote_club_id not in API) Court Dependencies Modal (ClubCourtsTab.tsx): - Display slot_instances_future count (was upcoming_bookings) - Display slot_instances_booked count (new field) - Updated deletion instructions for 3-count structure Types (courts.ts): - Created ClubProfileSettings interface for JSONB structure - Updated ClubProfile to use settings instead of flat fields - Updated CourtDependencies with court_id + 3 dependency counts - Updated ClubProfileUpdateRequest to support settings API Clients: - courts.ts: Updated mock data to match API contracts (settings structure, 3 counts, court_name_duplicate) - materialisation.ts: Flipped USE_MOCKS to false for real backend integration Integration Ready: - All contract mismatches resolved - Build succeeds - Ready for Phase 1 smoke tests against BUILD:290-291 Related: Backend Brooke BUILD:290 (courts CRUD) + BUILD:291 (club profile PATCH) Contract references: docs/owners/payloads/court-api-contract.md, club-profile-api-contract.mdmaster
parent
cb255cf1f3
commit
a61e64ded0
@ -1,152 +0,0 @@
|
|||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: default
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: debug-secrets
|
|
||||||
image: alpine
|
|
||||||
environment:
|
|
||||||
VAULT_API_URL:
|
|
||||||
from_secret: VAULT_API_URL
|
|
||||||
commands:
|
|
||||||
- 'echo "Docker Registry URL: $${VAULT_API_URL}"'
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- tag
|
|
||||||
|
|
||||||
# Make the image available for next step
|
|
||||||
- name: publish
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
build_args:
|
|
||||||
- NEXT_PUBLIC_PYTHON_API_URL=https://api.playchoo.com
|
|
||||||
- NEXT_PUBLIC_AUTH_BACKEND_URL=https://auth.api.playchoo.com
|
|
||||||
- NEXT_PUBLIC_SWISSOID_TARGET_SERVICE_HANDLE=playchoo
|
|
||||||
- NEXT_PUBLIC_APP_VERSION=1.0.10
|
|
||||||
dockerfile: docker/Dockerfile
|
|
||||||
context: .
|
|
||||||
registry: registry.sn48.zivili.ch
|
|
||||||
repo: registry.sn48.zivili.ch/meow/playchoo-nextjs
|
|
||||||
tags:
|
|
||||||
- "amd64-1.0.0"
|
|
||||||
- "latest"
|
|
||||||
username:
|
|
||||||
from_secret: PORTUS_USER
|
|
||||||
password:
|
|
||||||
from_secret: PORTUS_PASSWORD
|
|
||||||
debug: true
|
|
||||||
launch_debug: true
|
|
||||||
# make sure to replace image with same tag
|
|
||||||
force_tag: true
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- tag
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
image: registry.sn48.zivili.ch/meow/drone-deploy:amd64-1.0.0
|
|
||||||
pull: never
|
|
||||||
settings:
|
|
||||||
ssh_port:
|
|
||||||
from_secret: SSH_PORT
|
|
||||||
# this is required for the moment to generate the .docker/config.json
|
|
||||||
# drone is failing to do it on its own at the moment
|
|
||||||
dockerconfigjson:
|
|
||||||
from_secret: dockerconfigjson
|
|
||||||
# use portus or directly docker logins
|
|
||||||
portus_user:
|
|
||||||
from_secret: PORTUS_USER
|
|
||||||
portus_password:
|
|
||||||
from_secret: PORTUS_PASSWORD
|
|
||||||
# used by deploy to login to deploy server
|
|
||||||
ssh_host:
|
|
||||||
from_secret: SSH_HOST
|
|
||||||
ssh_user:
|
|
||||||
from_secret: SSH_USER
|
|
||||||
ssh_key:
|
|
||||||
from_secret: SSH_KEY
|
|
||||||
ssh_fingerprint:
|
|
||||||
from_secret: SSH_FINGERPRINT
|
|
||||||
# used by the deploy script to gather all project's .env values from vault
|
|
||||||
drone_agent1_token:
|
|
||||||
from_secret: DRONE_AGENT1_TOKEN
|
|
||||||
# used by deploy script to know where to gather secrets from
|
|
||||||
vault_api_url:
|
|
||||||
from_secret: VAULT_API_URL
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: SSH_HOST
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: SSH_HOST
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: SSH_USER
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: SSH_USER
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: SSH_KEY
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: SSH_KEY
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: DRONE_AGENT1_TOKEN
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: DRONE_AGENT1_TOKEN
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: VAULT_API_URL
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: VAULT_API_URL
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: PORTUS_USER
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: PORTUS_USER
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: PORTUS_PASSWORD
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: PORTUS_PASSWORD
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: dockerconfigjson
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: dockerconfigjson
|
|
||||||
|
|
||||||
image_pull_secrets:
|
|
||||||
from_secret: dockerconfigjson
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: SSH_PORT
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: SSH_PORT
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: secret
|
|
||||||
name: SSH_FINGERPRINT
|
|
||||||
get:
|
|
||||||
path: kv/data/__drone-admin-secrets
|
|
||||||
name: SSH_FINGERPRINT
|
|
||||||
Loading…
Reference in New Issue