generated sotries
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
# Story 7.4: My Profile View
|
||||
|
||||
## Epic Reference
|
||||
**Epic 7:** Client Dashboard
|
||||
|
||||
## User Story
|
||||
As a **client**,
|
||||
I want **to view my profile information**,
|
||||
So that **I can verify my account details are correct**.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
### Individual Client Profile
|
||||
- [ ] Full name
|
||||
- [ ] National ID
|
||||
- [ ] Email address
|
||||
- [ ] Phone number
|
||||
- [ ] Preferred language
|
||||
- [ ] Account created date
|
||||
|
||||
### Company Client Profile
|
||||
- [ ] Company name
|
||||
- [ ] Registration number
|
||||
- [ ] Contact person name
|
||||
- [ ] Contact person ID
|
||||
- [ ] Email address
|
||||
- [ ] Phone number
|
||||
- [ ] Preferred language
|
||||
- [ ] Account created date
|
||||
|
||||
### Features
|
||||
- [ ] Account type indicator
|
||||
- [ ] No edit capabilities (read-only)
|
||||
- [ ] Message: "Contact admin to update your information"
|
||||
- [ ] Logout button
|
||||
|
||||
## Technical Notes
|
||||
|
||||
```php
|
||||
new class extends Component {
|
||||
public function with(): array
|
||||
{
|
||||
return [
|
||||
'user' => auth()->user(),
|
||||
];
|
||||
}
|
||||
|
||||
public function logout(): void
|
||||
{
|
||||
auth()->logout();
|
||||
session()->invalidate();
|
||||
session()->regenerateToken();
|
||||
|
||||
$this->redirect(route('login'));
|
||||
}
|
||||
}; ?>
|
||||
|
||||
<div class="max-w-2xl mx-auto">
|
||||
<flux:heading>{{ __('client.my_profile') }}</flux:heading>
|
||||
|
||||
<div class="bg-cream rounded-lg p-6 mt-6">
|
||||
@if($user->user_type === 'individual')
|
||||
<dl class="space-y-4">
|
||||
<div>
|
||||
<dt class="text-sm text-charcoal/70">{{ __('profile.full_name') }}</dt>
|
||||
<dd class="text-lg font-medium">{{ $user->name }}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt class="text-sm text-charcoal/70">{{ __('profile.national_id') }}</dt>
|
||||
<dd>{{ $user->national_id }}</dd>
|
||||
</div>
|
||||
<!-- More fields... -->
|
||||
</dl>
|
||||
@else
|
||||
<!-- Company fields -->
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<flux:callout class="mt-6">
|
||||
{{ __('client.contact_admin_to_update') }}
|
||||
</flux:callout>
|
||||
|
||||
<flux:button wire:click="logout" variant="danger" class="mt-6">
|
||||
{{ __('auth.logout') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
```
|
||||
|
||||
## Definition of Done
|
||||
- [ ] Individual profile displays correctly
|
||||
- [ ] Company profile displays correctly
|
||||
- [ ] No edit functionality
|
||||
- [ ] Contact admin message shown
|
||||
- [ ] Logout works
|
||||
- [ ] Tests pass
|
||||
|
||||
## Estimation
|
||||
**Complexity:** Low | **Effort:** 2 hours
|
||||
Reference in New Issue
Block a user