Add coupon management, customer services, and update TASKS.md

Phase 5 (Admin Panel):
- Admin coupon management: full CRUD with create/edit/deactivate,
  auto-generate codes, plan restrictions multi-select, usage tracking,
  redemption history on edit page
- Add active flag migration for coupons table

Phase 4 (Customer Dashboard):
- Customer services list page with plan info and status
- Customer service detail page with network info, plan details,
  control panel links (VirtFusion/SynergyCP/Enhance), important dates
- Service status/type resolver utilities

Documentation:
- Update TASKS.md with all completed Phase 3/4/5/8 items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude Dev
2026-02-09 10:38:12 -05:00
parent 2061b1f3e3
commit d9ec414264
18 changed files with 1639 additions and 54 deletions

108
TASKS.md
View File

@@ -64,40 +64,40 @@
- [x] All 53 tests passing, build clean
## Phase 3: Provisioning Automation
- [ ] Create `ProvisioningServiceInterface` abstraction
- [ ] Build VirtFusion provisioning service:
- [ ] Create VPS via API
- [ ] Suspend/unsuspend VPS
- [ ] Terminate VPS
- [ ] Get status and resource usage
- [ ] Credential generation and secure storage
- [x] Create `ProvisioningServiceInterface` abstraction
- [x] Build VirtFusion provisioning service:
- [x] Create VPS via API
- [x] Suspend/unsuspend VPS
- [x] Terminate VPS
- [x] Get status and resource usage
- [x] Credential generation and secure storage
- [ ] Build Pterodactyl provisioning service:
- [ ] Create game server via API
- [ ] Suspend/unsuspend server
- [ ] Delete server
- [ ] Get server status and resources
- [ ] Build SynergyCP provisioning service:
- [ ] Provision dedicated server
- [ ] Suspend/unsuspend server
- [ ] Terminate server
- [ ] Get server details
- [ ] Handle limited hardware inventory (waitlist/semi-auto)
- [ ] Build Enhance provisioning service:
- [ ] Create web hosting account
- [ ] Suspend/delete account
- [ ] Get account status
- [ ] Implement event-driven provisioning (listen to `PaymentSucceeded` events)
- [x] Build SynergyCP provisioning service:
- [x] Provision dedicated server
- [x] Suspend/unsuspend server
- [x] Terminate server
- [x] Get server details
- [x] Handle limited hardware inventory (waitlist/semi-auto)
- [x] Build Enhance provisioning service:
- [x] Create web hosting account
- [x] Suspend/delete account
- [x] Get account status
- [x] Implement event-driven provisioning (listen to `PaymentSucceeded` events)
- [ ] Build provisioning failure handling and retry logic
- [ ] Send credentials email on successful provisioning
- [ ] Log all provisioning actions to `provisioning_logs` table
- [x] Log all provisioning actions to `provisioning_logs` table
## Phase 4: Customer Dashboard (account.ezscale.cloud)
- [ ] Build service overview dashboard:
- [ ] Active services list with status indicators
- [x] Build service overview dashboard:
- [x] Active services list with status indicators
- [ ] Resource usage widgets (CPU, RAM, disk, bandwidth)
- [ ] Next invoice and payment due date
- [x] Next invoice and payment due date
- [ ] Recent support tickets
- [ ] Quick actions (renew, upgrade, create ticket)
- [x] Quick actions (renew, upgrade, create ticket)
- [ ] Build service detail pages:
- [ ] VPS details (IP, credentials, resource graphs, control buttons)
- [ ] Game server details (connect info, resource usage, restart button)
@@ -111,61 +111,61 @@
- [ ] Upcoming renewals
- [ ] Plan upgrade/downgrade flow (self-service with proration)
- [ ] Subscription cancellation flow (with optional survey)
- [ ] Profile and account settings:
- [ ] Contact information
- [ ] Billing/shipping addresses
- [ ] Tax ID
- [ ] Password change
- [ ] 2FA setup (TOTP, passkeys)
- [x] Profile and account settings:
- [x] Contact information
- [x] Billing/shipping addresses
- [x] Tax ID
- [x] Password change
- [x] 2FA setup (TOTP, passkeys)
- [ ] SupportPal integration:
- [ ] SSO to SupportPal
- [ ] View recent tickets widget
- [ ] Create ticket button (opens SupportPal or API)
## Phase 5: Admin Panel (admin.ezscale.cloud)
- [ ] Analytics dashboard:
- [ ] MRR (Monthly Recurring Revenue) graph
- [x] Analytics dashboard:
- [x] MRR (Monthly Recurring Revenue) graph
- [ ] ARR (Annual Recurring Revenue)
- [ ] Churn rate calculation and graph
- [ ] Customer growth chart
- [ ] Revenue trends (daily, monthly, yearly)
- [ ] Popular plans and conversion rates
- [ ] Outstanding invoices total
- [x] Popular plans and conversion rates
- [x] Outstanding invoices total
- [ ] Overdue accounts list
- [ ] Customer management:
- [ ] Customer list (searchable, filterable)
- [ ] Customer detail view (profile, services, billing history, notes)
- [x] Customer management:
- [x] Customer list (searchable, filterable)
- [x] Customer detail view (profile, services, billing history, notes)
- [ ] Edit customer information
- [ ] Impersonate customer (with audit logging)
- [ ] Add admin notes to customer account
- [ ] View customer audit log
- [ ] Service management:
- [ ] All services list (filter by type, status, platform)
- [x] Service management:
- [x] All services list (filter by type, status, platform)
- [ ] Manually provision service
- [ ] Suspend/unsuspend service
- [ ] Terminate service
- [x] Suspend/unsuspend service
- [x] Terminate service
- [ ] Modify service (change plan, extend expiry)
- [ ] View provisioning logs
- [x] View provisioning logs
- [ ] Order management:
- [ ] Pending orders list
- [ ] Approve/reject orders (for semi-automated provisioning)
- [ ] View order details
- [ ] Invoice management:
- [ ] All invoices list (filter by status, date, customer)
- [x] Invoice management:
- [x] All invoices list (filter by status, date, customer)
- [ ] Create manual invoice
- [ ] Edit invoice (before sending)
- [ ] Void/refund invoice
- [x] Void/refund invoice
- [ ] Resend invoice email
- [ ] Coupon management:
- [ ] Create coupon (percentage, fixed, applies to plans)
- [ ] Edit coupon details
- [ ] View redemption history
- [ ] Deactivate/delete coupon
- [ ] Plan management:
- [ ] Create new plan (set pricing, features, billing cycle)
- [ ] Edit existing plan
- [ ] Archive/hide plan
- [ ] Set stock quantity (for limited dedicated servers)
- [x] Plan management:
- [x] Create new plan (set pricing, features, billing cycle)
- [x] Edit existing plan
- [x] Archive/hide plan
- [x] Set stock quantity (for limited dedicated servers)
- [ ] System configuration:
- [ ] Email template editor
- [ ] Tax rate configuration (by region)
@@ -248,11 +248,11 @@
- [ ] Tutorials
- [ ] Troubleshooting
- [ ] API documentation
- [ ] Legal pages:
- [ ] Terms of Service
- [ ] Privacy Policy
- [ ] Acceptable Use Policy
- [ ] SLA (Service Level Agreement)
- [x] Legal pages:
- [x] Terms of Service
- [x] Privacy Policy
- [x] Acceptable Use Policy
- [x] SLA (Service Level Agreement)
- [ ] Signup flow:
- [ ] Plan selection
- [ ] Account creation