Wire match header to real SportsMatch data; add Match#/Court + country flags
The match page header rendered hard-coded demo content (Sami Al Manea vs Hassan Al Shallan, Match# 103, referee Ghassan Yusuf, external takeone-dev links) on EVERY match video, ignoring the SportsMatch record the create form saves. - Video::sportsMatch() hasOne relationship. - SportsMatch::headerData() maps the record into the header's shape (fighters + country flags, championship, weight class, referee, venue, match#/court), null-safe, with a country-name/ISO2 -> flag-icons resolver. - match.blade header now renders from headerData(): real names/flags, no external links, and degrades gracefully to just title/views/date when a video has no match data (instead of the fake card). - sports-match-modal: add Match # and Court fields (stored in the existing competition JSON, no migration) and convert fighter/referee country inputs to the mandated <x-country-select> so header flags resolve from ISO2. - Tracker updated for the new country-select usages. Verified: empty state (no SportsMatch) shows only title/views/date; a populated record renders fighters, flags (bh/us), championship, Match# 42, Court 3, U21, referee; modal compiles with the new fields. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
8ea63a6720
commit
af276f2cd1
5 files changed
+150
-100
No files matched your search
@@ -144,6 +144,9 @@ Stored value: ISO2 code (e.g. `"BH"`).
|
||||
|---|---|---|
|
||||
| `resources/views/user/profile.blade.php` | `nationality` | Edit Profile form |
|
||||
| `resources/views/auth/register.blade.php` | `nationality` | Registration form — mandatory |
|
||||
| `resources/views/layouts/partials/sports-match-modal.blade.php` | `participants[p1_country]` | Fighter 1 country → header flag |
|
||||
| `resources/views/layouts/partials/sports-match-modal.blade.php` | `participants[p2_country]` | Fighter 2 country → header flag |
|
||||
| `resources/views/layouts/partials/sports-match-modal.blade.php` | `participants[referee_country]` | Referee country → header flag |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user