Files
thrilltrack-explorer/migration/PHASE_11_CONTACT_REPORTS.md

80 lines
2.1 KiB
Markdown

# PHASE 11: Contact & Reports
**Status:** ⬜ Not Started
**Estimated Time:** 4-6 hours
**Priority:** MEDIUM
**Depends On:** Phase 1 (Foundation)
**Blocks:** Phase 12 (Pages Migration)
---
## 🎯 Goal
Complete migration of contact form and reports system to Django (reports already partially migrated).
---
## 📋 Tasks
### Task 11.1: Contact Service (2 hours)
```typescript
class ContactService extends BaseService {
// POST /contact/
async submitContact(data: ContactFormData): Promise<ContactSubmission>
// GET /contact/ (moderators only)
async getContactSubmissions(filters?: ContactFilters): Promise<ContactSubmission[]>
// PATCH /contact/{id}/status/ (moderators only)
async updateContactStatus(id: string, status: string, notes?: string): Promise<ContactSubmission>
}
```
- [ ] Create `src/services/contact/contactService.ts`
- [ ] Create types and mappers
### Task 11.2: Update Contact Form (1 hour)
**File:** `src/components/contact/ContactForm.tsx`
- [ ] Replace `supabase.from('contact_submissions')` with `contactService`
- [ ] Update form submission
- [ ] Test contact form
- [ ] Verify confirmation emails
### Task 11.3: Verify Reports Service (1 hour)
**Note:** Reports service was already created in earlier work, but verify it's complete.
- [ ] Verify `src/services/reports/reportsService.ts` is complete
- [ ] Verify `src/components/moderation/ReportButton.tsx` uses service
- [ ] Verify `src/components/moderation/ReportsQueue.tsx` uses service
- [ ] Test report submission
- [ ] Test report management
### Task 11.4: Final Contact/Reports Testing (1-2 hours)
- [ ] Test contact form submission
- [ ] Test contact admin management
- [ ] Test report submission
- [ ] Test report moderation
- [ ] Verify emails are sent
---
## 🎯 Success Criteria
- [ ] Contact form works
- [ ] Contact emails sent
- [ ] Reports fully functional
- [ ] Admin can manage contacts/reports
- [ ] Zero `supabase.from('contact_submissions')` calls
- [ ] Zero `supabase.from('reports')` calls
---
## ⏭️ Next Phase
**Phase 12:** Pages Migration - THE BIG ONE