# CC Soccer D11 - Session Handoff
**Date:** March 14, 2026
**Session:** Page cleanup continued — order detail styling, profile theme consistency
**Branch:** `main`

## Last Updated
2026-03-14 (session 2)

## Current State

### Completed this session (continued from earlier today)

#### Order detail page (`/user/{uid}/orders/{order_id}`)
- Added to `UserProfileThemeNegotiator` so it renders in frontend theme for all users
- CSS added to `user-pages.css` using real Commerce markup classes (verified from source):
  - `.customer-information` / `.order-information` — label/value div pairs styled as flex rows
  - `.customer-billing` — grey card with uppercase label
  - `table.cols-4` — styled with card/shadow/rounded border matching site tables
  - `.order-total-line` / `.order-total-line-label` / `.order-total-line-value` — right-aligned totals
  - `#block-ccsoccer-theme-page-title h1` — "Order number # 64" flattened to one line
  - `#block-ccsoccer-theme-primary-admin-actions` — bullet removed, button styled as solid red primary

#### Button methodology (noted for future pass)
Three-tier button system to formalize when all pages are on custom theme:
- **Primary (solid red)** — main CTA actions (Register, Send Invitation, Manage this order)
- **Primary-soft (light red tint)** — navigation/secondary (Back to My Registrations)
- **Default (white/outlined)** — informational/optional actions

#### Product catalog (noted for future)
- Current `/purchase-jerseys` is a custom node — pre-dates clean Commerce setup
- Plan: assess Commerce's built-in product pages before any custom work
- Jersey page node edits (remove duplicate h2, add description, add image) — content edit, no code

---

## Files Changed This Session (session 2)
- `web/themes/custom/ccsoccer_theme/css/user-pages.css` (order detail + manage button)
- `web/modules/custom/ccsoccer/src/Theme/UserProfileThemeNegotiator.php` (added order detail routes)

---

## Deploy Notes
Standard deploy — no new PHP classes, no composer changes needed:
```bash
cd ~/public_html/test_ccsoccer_site
git pull
PATH=... drush.php -r web updb -y
PATH=... drush.php -r web cr
```

---

## Remaining Work

### Page cleanup in progress
- [ ] My Profile edit page — field/layout tweaks (jersey size review, width/layout)
- [ ] Address book page — CSS styling
- [ ] Payment methods page — CSS styling
- [ ] Credits (Admin) page — dark table header needs token-based styling
- [ ] Order detail page — further polish (time format, quantity shows 1.00 not 1)
- [ ] Purchase Jerseys — node edit (remove duplicate h2, add jersey set description + photo)
- [ ] Product catalog exploration — assess Commerce out-of-box before customizing

### Width/layout pass (batch fix)
Pages that are full-width and should be ~60% constrained:
- [ ] User edit form
- [ ] Address book
- [ ] Payment methods
- [ ] Order detail (partially done — customer-information/order-information constrained)

### Button methodology pass (after all pages on custom theme)
- Formalize 3-tier system: primary red / primary-soft navigation / white informational
- Audit all button usages across templates and CSS files

### Content
- [ ] Add description to 2026 Summer Cup tournament entity

### Inner Page Styling
- [ ] Credits page (player)
- [ ] Purchase Jerseys page

### Forms
- [ ] Registration form inputs, buttons, visual styling

### Navigation / Mobile
- [ ] Re-add Tournament Schedule to main nav

### Notifications
- [ ] "Don't send to already registered" logic
- [ ] Automated reminders (6/4/2/1 week intervals)

### Deployment Prep
- [ ] Enable reCAPTCHA on registration form
- [ ] Self-host Inter font
- [ ] Enable CSS/JS aggregation on test + production before launch
- [ ] Final mobile/browser testing
- [ ] Remove IP whitelist block from production `.htaccess`
- [ ] Decide canonical domain (www vs non-www)
- [ ] Confirm HTTPS redirect handling

### Small Items
- [ ] Breadcrumbs
- [ ] Game status: only show ON/CANCELLED after 3pm
- [ ] Contact page
- [ ] Social links (placeholder #)
- [ ] Hero width (full bleed)
- [ ] Password reset flow for migrated users
- [ ] Fix contextual theme stale database reference
- [ ] Fix Commerce config import loop
- [ ] CSS consolidation pass (33 CSS files — replace hardcoded hex/px with tokens)

---

## Test Server .htaccess (IP Whitelist)

Not in git — protected via `skip-worktree`. If ever lost:

```apache
# IP Whitelist - Test server only (DO NOT commit to git)
# Caleb/Layne: 68.249.41.9 | Andrew: 35.151.50.130 | Dave: 99.8.107.54 | Haley: 97.84.70.141
Require ip 68.249.41.9 35.151.50.130 99.8.107.54 97.84.70.141

<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow, noarchive"
</IfModule>
```

```bash
git update-index --skip-worktree web/.htaccess
```

---

## Server Quick Reference
```bash
cd ~/public_html/test_ccsoccer_site
git pull

# If new PHP classes added:
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php /opt/cpanel/composer/bin/composer dump-autoload

# If composer.lock changed:
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php /opt/cpanel/composer/bin/composer install --ignore-platform-req=ext-intl

# Standard post-pull:
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web updb -y
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web cr
```

## Git Workflow
- Always `git pull` before `git push` — Andrew may have pushed changes
- `main` is the primary branch
- `settings.local.php` is NOT in git — never commit it
# CC Soccer D11 - Session Handoff
**Date:** March 14, 2026
**Session:** Page-by-page visual cleanup — My Group, My Profile/user profile area
**Branch:** `main`

## Last Updated
2026-03-14

## Current State

### Completed this session

#### My Group page (`ccsoccer-group-manage.html.twig`)
- Back button now uses `button--primary-soft` (light red tint, red border/text)
- Pending Invitations table: split into 4 columns — Player | Email | Status | Actions
- Player name lookup added to controller (`manage()` in `GroupController.php`)
  - Looks up by UID first, falls back to email match
  - Passes `$invitee_names` array to template (keyed by invitation ID)
  - "Unknown" italic fallback when no account found
  - **Root fix:** `invitee_names` registered in `hook_theme()` variables array in `ccsoccer.module`
- `group-management.css`: removed local `.button` overrides (were fighting base system)

#### Button system (`ccsoccer-base.css` + `ccsoccer_theme/css/base.css`)
- New `button--primary-soft` variant added to BOTH files
- Two-file architecture documented with `!! KEEP IN SYNC !!` comments
  - Module copy: admin pages (Claro theme)
  - Theme copy: public pages (ccsoccer_theme)

#### User profile tab cleanup (`ccsoccer.module` — `hook_menu_local_tasks_alter`)
- Detection approach: checks for `entity.user.edit_form` tab presence (not route name)
  so filtering fires correctly on ALL sub-pages regardless of active tab
- **Hidden for everyone (incl. admin):** View, Shortcuts, Commerce Orders (replaced by ours)
- **Hidden for players only:** Our Orders tab, Credits (Admin)
- **Tab order:** Edit → Address book → Payment methods → Orders → Credits (Admin)

#### Orders page unified (`ContentController::myOrders`, routing, links.task.yml)
- Single controller method handles both `/my-orders` (current user) and
  `/user/{uid}/ccsoccer-orders` (admin reviewing any user)
- New route: `ccsoccer.user_orders_page` at `/user/{user}/ccsoccer-orders`
- New task link: `ccsoccer.user_orders_tab` on user profile (admin only)
- Commerce's built-in Orders tab hidden for everyone (replaced by ours)
- Order detail links still go to Commerce's own order view (`/user/{uid}/orders/{id}`)

#### Credits (Admin) route moved off `/admin/`
- Old path: `/admin/ccsoccer/player/{user}/credits` (triggered Claro admin theme)
- New path: `/user/{user}/ccsoccer-credits` (renders in frontend theme)
- All route references use route name so redirect in `revokeCredit()` still works

#### Theme negotiator (`src/Theme/UserProfileThemeNegotiator.php`)
- Forces frontend theme (`ccsoccer_theme`) on all user profile sub-pages
- Registered as service at priority 100 (beats Drupal's `AdminNegotiator` at 0)
- Covers: edit_form, canonical, ccsoccer-orders, ccsoccer-credits,
  payment_methods, address_book, profile pages
- **Required `composer dump-autoload` + `drush cr`** (new PHP class, new namespace)

---

## Files Changed This Session
- `web/modules/custom/ccsoccer/templates/ccsoccer-group-manage.html.twig`
- `web/modules/custom/ccsoccer/css/group-management.css`
- `web/modules/custom/ccsoccer/css/ccsoccer-base.css`
- `web/themes/custom/ccsoccer_theme/css/base.css`
- `web/modules/custom/ccsoccer/src/Controller/GroupController.php` (manage method)
- `web/modules/custom/ccsoccer/src/Controller/ContentController.php` (myOrders method)
- `web/modules/custom/ccsoccer/ccsoccer.module` (hook_theme, hook_menu_local_tasks_alter, hook_route_alter)
- `web/modules/custom/ccsoccer/ccsoccer.routing.yml` (new ccsoccer.user_orders_page + moved admin_user_credits path)
- `web/modules/custom/ccsoccer/ccsoccer.links.task.yml` (new ccsoccer.user_orders_tab)
- `web/modules/custom/ccsoccer/ccsoccer.services.yml` (new theme negotiator service)
- `web/modules/custom/ccsoccer/src/Theme/UserProfileThemeNegotiator.php` (NEW FILE)

---

## Deploy Notes
When pushing to TEST, this session requires:
```bash
git pull
composer dump-autoload  # Required — new PHP class
PATH=... drush.php -r web updb -y
PATH=... drush.php -r web cr
```

---

## Remaining Work

### Page cleanup in progress (continue next session)
- [ ] My Profile edit page — field/layout tweaks (jersey size review, width/layout)
- [ ] Address book page — CSS styling to match design system
- [ ] Payment methods page — CSS styling to match design system
- [ ] Credits (Admin) page — still using dark table header, needs token-based styling
- [ ] Order detail page (`/user/{uid}/orders/{id}`) — CSS-only tweak, lower priority

### Width/layout pass (tracking for batch fix)
Several pages are full-width when they should be ~60% max-width. Track and fix in one pass:
- [ ] User edit form
- [ ] Address book
- [ ] Payment methods
- (add others as discovered)

### Content
- [ ] Add description to 2026 Summer Cup tournament entity

### Inner Page Styling
- [ ] Credits page
- [ ] Purchase Jerseys page

### Forms
- [ ] Registration form inputs, buttons, visual styling

### Navigation / Mobile
- [ ] Re-add Tournament Schedule to main nav

### Notifications
- [ ] "Don't send to already registered" logic
- [ ] Automated reminders (6/4/2/1 week intervals)

### Deployment Prep
- [ ] Enable reCAPTCHA on registration form
- [ ] Self-host Inter font
- [ ] Enable CSS/JS aggregation on test + production before launch
- [ ] Final mobile/browser testing
- [ ] Remove IP whitelist block from production `.htaccess`
- [ ] Decide canonical domain (www vs non-www)
- [ ] Confirm HTTPS redirect handling

### Small Items
- [ ] Breadcrumbs
- [ ] Game status: only show ON/CANCELLED after 3pm
- [ ] Contact page
- [ ] Social links (placeholder #)
- [ ] Hero width (full bleed)
- [ ] Password reset flow for migrated users
- [ ] Fix contextual theme stale database reference
- [ ] Fix Commerce config import loop
- [ ] CSS consolidation pass (all 33 CSS files, replace hardcoded hex/px with tokens)
- [ ] Order detail page styling (`/user/{uid}/orders/{id}`)

---

## Test Server .htaccess (IP Whitelist)

Not in git — protected via `skip-worktree`. If ever lost:

```apache
# IP Whitelist - Test server only (DO NOT commit to git)
# Caleb/Layne: 68.249.41.9 | Andrew: 35.151.50.130 | Dave: 99.8.107.54 | Haley: 97.84.70.141
Require ip 68.249.41.9 35.151.50.130 99.8.107.54 97.84.70.141

<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow, noarchive"
</IfModule>
```

```bash
git update-index --skip-worktree web/.htaccess
```

---

## Server Quick Reference
```bash
cd ~/public_html/test_ccsoccer_site
git pull

# If new PHP classes added (composer.json/autoload changed):
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php /opt/cpanel/composer/bin/composer dump-autoload

# If composer.lock changed:
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php /opt/cpanel/composer/bin/composer install --ignore-platform-req=ext-intl

# Standard post-pull:
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web updb -y
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web cr
```

## Git Workflow
- Always `git pull` before `git push` — Andrew may have pushed changes
- `main` is the primary branch
- `settings.local.php` is NOT in git — never commit it
