From c08d9bf888556c3d8bdce692a6445dc6d667c18b Mon Sep 17 00:00:00 2001 From: GhassanYusuf Date: Tue, 3 Feb 2026 02:26:54 +0300 Subject: [PATCH] added personal trainner card --- resources/views/clubs/explore.blade.php | 258 +++++++++++++++- .../views/components/club-modal.blade.php | 2 +- .../club-modal/tabs/location.blade.php | 2 +- .../components/member-create-modal.blade.php | 286 ++++++++++++++++++ routes/web.php | 1 + 5 files changed, 533 insertions(+), 16 deletions(-) create mode 100644 resources/views/components/member-create-modal.blade.php diff --git a/resources/views/clubs/explore.blade.php b/resources/views/clubs/explore.blade.php index e01a10d..d24e5d8 100644 --- a/resources/views/clubs/explore.blade.php +++ b/resources/views/clubs/explore.blade.php @@ -110,7 +110,7 @@ @push('styles') + + + @endpush @@ -392,7 +538,7 @@ function initMap(lat, lng) { draggable: true, icon: L.divIcon({ className: 'user-location-marker', - html: '', + html: '', iconSize: [36, 36], iconAnchor: [18, 36] }) @@ -487,7 +633,91 @@ function displayClubs(clubs) { container.innerHTML = ''; - if (clubs.length === 0) { + let trainerAdded = false; + + // Add dummy trainer card if category is 'all' or 'personal-trainers' + if (currentCategory === 'all' || currentCategory === 'personal-trainers') { + const trainerCard = document.createElement('div'); + trainerCard.className = 'col'; + trainerCard.innerHTML = ` +
+ +
+ Personal Trainer + + +
+ Personal Trainer +
+
+ + +
+
+ +

Alex Thompson

+ + +
+ + Certified Strength & Conditioning Coach +
+ + +
+ + + + + Ghassan Yusuf +
+
+ +
+
+
+ +

13

+

Years Exp.

+
+
+
+
+ +

NASM

+

Packages

+
+
+
+
+ +

5.0

+

Rating

+
+
+
+ + +
+ + +
+
+
+ `; + container.appendChild(trainerCard); + trainerAdded = true; + } + + if (clubs.length === 0 && !trainerAdded) { noResultsContainer.style.display = 'flex'; return; } @@ -533,7 +763,7 @@ function displayClubs(clubs) {
- Sports Club + Sports Club
@@ -544,7 +774,7 @@ function displayClubs(clubs) {

${club.club_name}

-
+
@@ -564,8 +794,8 @@ function displayClubs(clubs) {
-
- +
+ @@ -576,8 +806,8 @@ function displayClubs(clubs) {
-
- +
+ @@ -589,8 +819,8 @@ function displayClubs(clubs) {
-
- +
+

0

@@ -601,7 +831,7 @@ function displayClubs(clubs) {
- - +
diff --git a/resources/views/components/club-modal.blade.php b/resources/views/components/club-modal.blade.php index afbcb18..ffefd04 100644 --- a/resources/views/components/club-modal.blade.php +++ b/resources/views/components/club-modal.blade.php @@ -291,7 +291,7 @@ } /* ISSUE 4 FIX: Map container styles */ - #clubMap { + #modalClubMap { height: 400px; width: 100%; border-radius: 0.5rem; diff --git a/resources/views/components/club-modal/tabs/location.blade.php b/resources/views/components/club-modal/tabs/location.blade.php index b0b71cb..3fb7755 100644 --- a/resources/views/components/club-modal/tabs/location.blade.php +++ b/resources/views/components/club-modal/tabs/location.blade.php @@ -266,7 +266,7 @@ const lng = parseFloat(document.getElementById('gps_long')?.value) || 50.5577; // ISSUE 4 FIX: Initialize map without attribution control - clubMap = L.map('clubMap', { + clubMap = L.map('modalClubMap', { attributionControl: false // Disable attribution }).setView([lat, lng], 13); diff --git a/resources/views/components/member-create-modal.blade.php b/resources/views/components/member-create-modal.blade.php new file mode 100644 index 0000000..e21092d --- /dev/null +++ b/resources/views/components/member-create-modal.blade.php @@ -0,0 +1,286 @@ + + + +@push('scripts') + +@endpush diff --git a/routes/web.php b/routes/web.php index 9a0d534..6f39c6a 100644 --- a/routes/web.php +++ b/routes/web.php @@ -182,6 +182,7 @@ Route::middleware(['auth', 'verified'])->group(function () { Route::get('/family/create', function () { return redirect()->route('members.create'); })->name('family.create'); + Route::post('/family', [FamilyController::class, 'store'])->name('family.store'); Route::get('/family/{id}', function ($id) { return redirect()->route('member.show', $id); })->name('family.show');