# Story 7.4: My Profile View ## Epic Reference **Epic 7:** Client Dashboard ## Dependencies - **Epic 2:** User Management (user model with all client profile fields must exist) - **Story 7.1:** Client Dashboard Overview (layout and navigation context) ## User Story As a **client**, I want **to view my profile information**, So that **I can verify my account details are correct**. ## Prerequisites ### Required User Model Fields The `users` table must include these columns (from Epic 2): | Column | Type | Description | |--------|------|-------------| | `user_type` | enum('individual','company') | Distinguishes client type | | `name` | string | Full name (individual) or company name | | `national_id` | string | National ID for individuals | | `email` | string | Email address | | `phone` | string | Phone number | | `preferred_language` | enum('ar','en') | User's language preference | | `company_name` | string, nullable | Company name (company clients) | | `company_cert_number` | string, nullable | Company registration number | | `contact_person_name` | string, nullable | Contact person (company clients) | | `contact_person_id` | string, nullable | Contact person's ID | | `created_at` | timestamp | Account creation date | ## Acceptance Criteria ### Individual Client Profile - [x] Full name displayed - [x] National ID displayed - [x] Email address displayed - [x] Phone number displayed - [x] Preferred language displayed - [x] Account created date displayed ### Company Client Profile - [x] Company name displayed - [x] Company certificate/registration number displayed - [x] Contact person name displayed - [x] Contact person ID displayed - [x] Email address displayed - [x] Phone number displayed - [x] Preferred language displayed - [x] Account created date displayed ### Features - [x] Account type indicator (Individual/Company badge) - [x] No edit capabilities (read-only view) - [x] Message: "Contact admin to update your information" - [x] Logout button with confirmation redirect ## Technical Notes ### File Location ``` resources/views/livewire/client/profile.blade.php ``` ### Route ```php // In routes/web.php (client authenticated routes) Route::get('/client/profile', \Livewire\Volt\Volt::route('client.profile'))->name('client.profile'); ``` ### Component Implementation ```php auth()->user(), ]; } public function logout(): void { auth()->logout(); session()->invalidate(); session()->regenerateToken(); $this->redirect(route('login')); } }; ?>