diff --git a/app/Http/Controllers/Auth/AuthenticatedSessionController.php b/app/Http/Controllers/Auth/AuthenticatedSessionController.php index fe45eed..923a57a 100644 --- a/app/Http/Controllers/Auth/AuthenticatedSessionController.php +++ b/app/Http/Controllers/Auth/AuthenticatedSessionController.php @@ -59,7 +59,7 @@ class AuthenticatedSessionController extends Controller // ]); // } - return redirect()->route('family.dashboard'); + return redirect()->route('clubs.explore'); } return back()->withErrors([ diff --git a/app/Http/Controllers/FamilyController.php b/app/Http/Controllers/FamilyController.php index b2243ca..f8ef2b1 100644 --- a/app/Http/Controllers/FamilyController.php +++ b/app/Http/Controllers/FamilyController.php @@ -243,7 +243,7 @@ class FamilyController extends Controller { $validated = $request->validate([ 'full_name' => 'required|string|max:255', - 'email' => 'nullable|email|max:255', + 'email' => 'nullable|email|max:255|unique:users,email,' . $id, 'mobile_code' => 'nullable|string|max:5', 'mobile' => 'nullable|string|max:20', 'gender' => 'required|in:m,f', @@ -366,7 +366,8 @@ class FamilyController extends Controller ->where('dependent_user_id', $id) ->firstOrFail(); - $relationship->delete(); + $dependent = User::findOrFail($id); + $dependent->delete(); return redirect()->route('family.dashboard') ->with('success', 'Family member removed successfully.'); diff --git a/app/Models/User.php b/app/Models/User.php index 05a7e19..cea837b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -5,6 +5,7 @@ namespace App\Models; // use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Database\Eloquent\Relations\HasMany; @@ -15,7 +16,7 @@ use Carbon\Carbon; class User extends Authenticatable { /** @use HasFactory<\Database\Factories\UserFactory> */ - use HasFactory, Notifiable, MustVerifyEmail; + use HasFactory, Notifiable, MustVerifyEmail, SoftDeletes; /** * The attributes that are mass assignable. diff --git a/database/migrations/2026_01_22_003308_add_deleted_at_to_users_table.php b/database/migrations/2026_01_22_003308_add_deleted_at_to_users_table.php new file mode 100644 index 0000000..a7bda58 --- /dev/null +++ b/database/migrations/2026_01_22_003308_add_deleted_at_to_users_table.php @@ -0,0 +1,28 @@ +softDeletes(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('users', function (Blueprint $table) { + $table->dropSoftDeletes(); + }); + } +}; diff --git a/resources/views/family/create.blade.php b/resources/views/family/create.blade.php index b49c9cc..fe1af84 100644 --- a/resources/views/family/create.blade.php +++ b/resources/views/family/create.blade.php @@ -28,6 +28,28 @@ @enderror +
Comprehensive member information and analytics
-"{{ $relationship->dependent->motto }}"
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 7f996c4..00df68f 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -178,15 +178,15 @@ border-color: hsl(var(--primary-hover)); } .user-avatar { - width: 32px; - height: 32px; + width: 40px; + height: 40px; border-radius: 50%; object-fit: cover; margin-right: 8px; } .user-avatar-placeholder { - width: 32px; - height: 32px; + width: 40px; + height: 40px; border-radius: 50%; background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); @@ -196,6 +196,23 @@ margin-right: 8px; font-weight: 600; } + .avatar-container { + position: relative; + display: inline-block; + } + .online-indicator { + position: absolute; + bottom: -2px; + right: -2px; + width: 10px; + height: 10px; + background-color: #28a745; + border-radius: 50%; + border: 2px solid white; + } + .dropdown-toggle::after { + display: none; + } .dropdown-toggle { display: flex; align-items: center; @@ -205,10 +222,13 @@ padding: 0.5rem; margin: 0 0.25rem; border-radius: 50%; - transition: background-color 0.2s; + transition: transform 0.2s; + display: flex; + align-items: center; + justify-content: center; } .nav-icon-btn:hover { - background-color: #f8f9fa; + transform: scale(1.1); } .notification-badge { position: absolute; @@ -234,15 +254,21 @@ padding: 0.75rem 1rem; border-bottom: 1px solid hsl(var(--border)); transition: background-color 0.2s; + cursor: pointer; + background-color: white; } .notification-item:hover { - background-color: hsl(var(--muted)); + background-color: hsl(var(--primary)) !important; + color: hsl(var(--primary-foreground)) !important; + } + .notification-item:hover .text-muted { + color: hsl(var(--primary-foreground)) !important; } .notification-item:last-child { border-bottom: none; } .notification-item.unread { - background-color: hsl(var(--accent)); + background-color: white; } .dropdown-item:hover { @@ -330,34 +356,24 @@ 2d