# CC Soccer D11 - Session Handoff
**Date:** March 1, 2026
**Session:** Polish pass — nav fixes, color system, favicon, My Orders
**Branch:** `main`

## Last Updated
2026-03-01

## Current State
- All core functionality working
- Brand colors updated to match logo/jerseys (#d42020 red)
- Favicon configured sitewide via theme
- My Orders link working in account menu
- Contextual links (front-end edit overlays) removed
- Schema version: 9055

---

## ⚠️ Andrew: What You Need To Do

```bash
git pull
ddev drush updb
ddev drush cr
```

Also run on server after pulling:
```bash
/opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web updb
/opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web pm:uninstall contextual
/opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web cr
```

And re-enable Teams menu link via UI: Structure → Menus → Main navigation (same DB override issue as local).

---

## What Was Done This Session

### Teams Navigation
- Route permission changed from `_user_is_logged_in` to `_permission: 'view reports'`
- Teams link now shows only for board members, hidden from regular players
- Menu link was disabled in DB — re-enable via UI after each `drush cr` on new environments

### Credits Entity Field Resync
- Update hook `ccsoccer_update_9055` added to `ccsoccer.install`
- Syncs Amount, Type, Status, Reason fields with Drupal's entity metadata
- Ran successfully, schema now at 9055

### Jersey Report DISTINCT Fix
- `views.view.jersey_report_view.yml` updated with `distinct: true`
- Applied directly via drush config edit (not cim — config/sync is out of sync with DB)
- Eliminates MySQL REPEATABLE-READ primary key warning

### Contextual Links Removed
- `drush pm:uninstall contextual` run locally
- Removes front-end edit overlays that were blocking nav interaction
- Must also run on server

### Brand Color Update
- `--color-primary` changed from `#8B0000` (maroon) to `#d42020` (red matching logo/jerseys)
- `--color-primary-dark` changed to `#b01a1a`
- `--color-primary-light` changed to `#e02a2a`
- One token change ripples sitewide

### Home Page Color Fix
- League card headings and buttons were using `--color-accent` (orange-red)
- Updated `content-pages.css` to use `--color-primary` and `--color-primary-dark`
- Added `color: var(--color-white)` to hover state to fix unreadable hover text

### Favicon
- Favicon generated from logo SVG at 16/32/48px, saved as multi-size .ico
- `ccsoccer_theme.info.yml` updated with `favicon: images/favicon.ico`
- `system.theme.global` config updated via drush to use theme favicon instead of Drupal default
- Works in Chrome; Safari has known favicon cache issues in development

### My Orders Menu Link
- Custom route `ccsoccer.my_orders` added at `/my-orders`
- `ContentController::myOrders()` redirects current user to `/user/{uid}/orders`
- Menu link added to account menu (weight: 0, before My Registrations)
- Commerce's `view.commerce_user_orders.order_page` route requires `{user}` param — redirect approach solves this

---

## Files Modified This Session
- `web/modules/custom/ccsoccer/ccsoccer.routing.yml` — Teams route permission + My Orders route
- `web/modules/custom/ccsoccer/ccsoccer.links.menu.yml` — My Orders menu link
- `web/modules/custom/ccsoccer/ccsoccer.install` — Update hook 9055
- `web/modules/custom/ccsoccer/src/Controller/ContentController.php` — myOrders() method
- `web/modules/custom/ccsoccer/css/content-pages.css` — Home page color fixes
- `web/themes/custom/ccsoccer_theme/css/tokens.css` — Brand color update
- `web/themes/custom/ccsoccer_theme/ccsoccer_theme.info.yml` — Favicon declaration
- `config/sync/views.view.jersey_report_view.yml` — DISTINCT flag

---

## Remaining Work

### My Account / User Hub
- [ ] Login destination → My Account page
- [ ] My Orders page — needs styling
- [ ] My Registrations — needs styling
- [ ] Credits page — needs styling
- [ ] Purchase Jerseys — needs styling

### Inner Page Styling
- [ ] User profile / edit form
- [ ] Group management page

### Forms
- [ ] Registration form inputs, buttons, validation
- [ ] User register / edit forms

### Navigation / Mobile
- [ ] Mobile admin menu overlaps main nav — needs fix
- [ ] 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
- [ ] Self-host Inter font
- [ ] Re-enable CSS/JS aggregation
- [ ] Final mobile/browser testing

### Small Items
- [ ] Breadcrumbs: custom builder for full trails on custom routes
- [ ] Game status: only show ON/CANCELLED after 3pm
- [ ] Contact page — does /contact exist? Footer links to it
- [ ] Social links — Facebook/Instagram URLs are placeholder (#)
- [ ] Hero width mismatch (doesn't go full bleed)

---

## Server Quick Reference
```bash
cd ~/public_html/test_ccsoccer_site
git 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
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
```

**Note:** The `PATH=` prefix is required — drush spawns a subprocess via `vendor/bin/drush` which picks up system PHP 7.4 otherwise. The `drush/drush.yml` `options.php` key alone is insufficient.

## Git Workflow
- Always `git pull` before `git push` — Andrew may have pushed changes
- `main` is the primary branch
