# Story 4.5: Client Timeline View ## Epic Reference **Epic 4:** Case Timeline System ## User Story As a **client**, I want **to view my case timelines and updates**, So that **I can track the progress of my legal matters**. ## Story Context ### Existing System Integration - **Integrates with:** timelines, timeline_updates tables - **Technology:** Livewire Volt (read-only) - **Follows pattern:** Client dashboard pattern - **Touch points:** Client portal navigation ## Acceptance Criteria ### Timeline List - [ ] Display all client's timelines - [ ] Active timelines prominently displayed - [ ] Archived timelines clearly separated - [ ] Visual distinction (color/icon) for status - [ ] Show for each: - Case name and reference - Status indicator - Last update date - Update count ### Individual Timeline View - [ ] Case name and reference - [ ] Status indicator - [ ] All updates in chronological order - [ ] Each update shows: - Date and time - Update content (formatted) ### Restrictions - [ ] Read-only (no edit/comment) - [ ] No ability to archive/delete - [ ] Only see own timelines ### UX Features - [ ] Recent updates indicator (new since last view, optional) - [ ] Responsive design for mobile - [ ] Bilingual labels and dates ## Technical Notes ### Volt Component for List ```php auth()->user() ->timelines() ->active() ->withCount('updates') ->with(['updates' => fn($q) => $q->latest()->limit(1)]) ->latest('updated_at') ->get(), 'archivedTimelines' => auth()->user() ->timelines() ->archived() ->withCount('updates') ->latest('updated_at') ->get(), ]; } }; ``` ### Timeline Detail View ```php user_id === auth()->id(), 403); $this->timeline = $timeline->load(['updates' => fn($q) => $q->oldest()]); } }; ``` ### Template ```blade
{{ $timeline->case_name }} @if($timeline->case_reference)

{{ __('client.reference') }}: {{ $timeline->case_reference }}

@endif
{{ __('client.' . $timeline->status) }}
@forelse($timeline->updates as $update)
{{ $update->created_at->translatedFormat('l, d M Y - g:i A') }}
{!! $update->update_text !!}
@empty

{{ __('client.no_updates_yet') }}

@endforelse
{{ __('client.back_to_cases') }}
``` ## Definition of Done - [ ] Client can view list of their timelines - [ ] Active/archived clearly separated - [ ] Can view individual timeline details - [ ] All updates displayed chronologically - [ ] Read-only (no edit capabilities) - [ ] Cannot view other clients' timelines - [ ] Mobile responsive - [ ] RTL support - [ ] Tests pass - [ ] Code formatted with Pint ## Dependencies - **Story 4.1-4.3:** Timeline management - **Epic 7:** Client dashboard structure ## Estimation **Complexity:** Medium **Estimated Effort:** 3-4 hours