--- id: 2-4 title: 2-4 Account Lifecycle Management status: QA Review date: 2026-09-27 parent: 2 --- ## Description As an admin, I want to deactivate, reactivate, and permanently delete client accounts, So that I can manage the full lifecycle of client relationships. Context: Integrates with: Users table, consultations, timelines, notifications, sessions; Technology: Livewire Volt (class-based), Flux UI modals, Pest tests; Follows pattern: Same admin action patterns as Story 2.1/2.2, soft deactivation via status field, hard deletion with cascade. Full implementation history: docs/stories/story-2.4-account-lifecycle-management.md ## Acceptance Criteria - [ ] "Deactivate" button on user profile and list - [ ] Confirmation dialog explaining consequences - [ ] Effects of deactivation: - [ ] Visual indicator in user list (grayed out, badge) - [ ] Audit log entry created - [ ] "Reactivate" button on deactivated profiles - [ ] Confirmation dialog - [ ] Effects of reactivation: - [ ] Email notification sent to user - [ ] Audit log entry created - [ ] "Delete" button (with danger styling) - [ ] Confirmation dialog with strong warning: - [ ] Effects of deletion: - [ ] Audit log entry preserved (for audit trail) - [ ] No email sent (user no longer exists) - [ ] "Reset Password" action on user profile - [ ] Options: - [ ] Email new credentials to client - [ ] Force password change on next login (optional) - Not implemented per simplified approach - [ ] Audit log entry created - [ ] All actions logged in admin_logs table - [ ] Bilingual confirmation messages - [ ] Clear visual states for account status - [ ] Tests for all lifecycle operations