Commit Graph

12 Commits

Author SHA1 Message Date
dwindown
89f881e7cf feat: reorganize admin settings with tabbed interface and documentation
- Reorganized admin settings into tabbed interface (General, Security, Payment Methods)
- Vertical tabs on desktop, horizontal scrollable on mobile
- Moved Payment Methods from separate menu to Settings tab
- Fixed admin profile reuse and dashboard blocking
- Fixed maintenance mode guard to use AppConfig model
- Added admin auto-redirect after login (admins → /admin, users → /)
- Reorganized documentation into docs/ folder structure
- Created comprehensive README and documentation index
- Added PWA and Web Push notifications to to-do list
2025-10-13 09:28:12 +07:00
dwindown
49d60676d0 feat: Add FAB with asset price update, mobile optimizations, and localized financial trend
- Add Floating Action Button (FAB) with 3 quick actions
- Implement Asset Price Update dialog for bulk price updates
- Add bulk price update API endpoint with transaction support
- Optimize multiselect, calendar, and dropdown options for mobile (44px touch targets)
- Add custom date range popover to save space in Overview header
- Localize number format suffixes (k/m/b for EN, rb/jt/m for ID)
- Localize date format in Financial Trend (Oct 8 vs 8 Okt)
- Fix negative values in trend line chart (domain auto)
- Improve Asset Price Update dialog layout (compact horizontal)
- Add mobile-optimized calendar with responsive cells
- Fix FAB overlay and close button position
- Add translations for FAB and asset price updates
2025-10-12 23:30:54 +07:00
dwindown
c0df4a7c2a feat: Add Sonner toast notifications to all CRUD operations
- Install sonner package and create Toaster component
- Add toast notifications to all admin dashboard operations:
  * AdminPlans: create, update, delete, reorder, toggle visibility
  * AdminPaymentMethods: create, update, delete, reorder, toggle active
  * AdminUsers: suspend, unsuspend, grant pro access
  * AdminPayments: verify, reject
  * AdminSettings: save settings
- Add toast notifications to all member dashboard operations:
  * Wallets: create, update, delete
  * Transactions: create, update, delete
  * Profile: update name, avatar, phone, password, delete account
  * OTP: enable/disable email, WhatsApp, authenticator
- Replace all alert() calls with toast.success/error/warning
- Add proper success/error messages in Bahasa Indonesia
- Implement smart plan deletion (permanent if no subscriptions, soft delete if has subscriptions)
- Fix admin redirect after login (admin goes to /admin, users to /)
- Exclude admin accounts from subscription distribution chart
- Show inactive plans with visual indicators
- Add real revenue data to admin dashboard charts
- Use formatLargeNumber for consistent number formatting
2025-10-12 08:43:50 +07:00
dwindown
50ce884a43 fix: apply theme colors to all admin pages
AdminDashboard:
- Replace all gray colors with theme variables
- Indonesian text: 'Selamat datang', 'Kelola Plans', etc.
- Loading: 'Memuat...'

AdminPlans:
- bg-card, text-foreground, border-border
- text-muted-foreground for secondary text
- bg-muted for sections
- text-primary for links/icons
- text-destructive for delete
- Indonesian: 'Kelola Plans', 'Tambah Plan', 'Tidak ada plan'

AdminUsers:
- Same theme color replacements
- Indonesian: 'Kelola Users', 'Tidak ada user'
- bg-primary for avatars
- Consistent hover states

All pages now:
 Respect light/dark mode
 Use @theme colors from index.css
 Indonesian text (keeping English tech terms)
 Consistent with member layout styling
2025-10-11 20:18:10 +07:00
dwindown
4bd95e50e8 fix: include role field in all auth responses
- Add role to login response
- Add role to register response
- Add role to Google login response
- Add role to OTP verification response
- Add role to getUserProfile response
- Fixes admin panel access denied issue
2025-10-11 18:42:23 +07:00
dwindown
ddca073610 fix: await async generateToken in auth service
- Add await to all generateToken() calls
- Fixes empty token issue in login/register responses
- Token now properly includes user role for admin access
2025-10-11 18:08:01 +07:00
dwindown
1c28e51b53 docs: update implementation plan and add backend completion summary
- Mark backend as complete in IMPLEMENTATION_PLAN.md
- Create ADMIN_BACKEND_COMPLETE.md with full documentation
- Document all API endpoints
- Add testing instructions
- Add deployment notes
2025-10-11 14:37:18 +07:00
dwindown
12850ab12d feat: complete admin backend controllers and services
- AdminPlansController & Service (CRUD, reorder)
- AdminPaymentMethodsController & Service (CRUD, reorder)
- AdminPaymentsController & Service (verify, reject, pending count)
- AdminUsersController & Service (search, suspend, grant pro access, stats)
- AdminConfigController & Service (dynamic config management)
- Wire all controllers into AdminModule
- Import AdminModule in AppModule

Admin API Routes:
- GET/POST/PUT/DELETE /admin/plans
- GET/POST/PUT/DELETE /admin/payment-methods
- GET /admin/payments (with status filter)
- POST /admin/payments/:id/verify
- POST /admin/payments/:id/reject
- GET /admin/users (with search)
- POST /admin/users/:id/grant-pro
- GET/POST/DELETE /admin/config

All routes protected by AuthGuard + AdminGuard
2025-10-11 14:32:45 +07:00
dwindown
9b789b333f feat: add admin guard and JWT role support
- Create AdminGuard to check user role
- Update JWT strategy to include role in payload
- Update auth service to include role in token generation
- Prepare admin module structure
- TypeScript will resolve lint errors after server restart
2025-10-11 14:15:34 +07:00
dwindown
c3bc181063 feat: add admin dashboard schema and seeder
- Add Plan, Subscription, Payment, PaymentMethod, Coupon models
- Add ApiKey, Webhook models for API access
- Add AppConfig model for dynamic configuration
- Add role, suspendedAt fields to User model
- Create comprehensive seeder with:
  - Admin user (dwindi.ramadhana@gmail.com)
  - Default plans (Free, Pro Monthly, Pro Yearly)
  - Payment methods (BCA, Mandiri, GoPay)
  - App config (maintenance mode)
- Zero data loss migration strategy
2025-10-11 14:06:55 +07:00
dwindown
249f3a9d7d feat: remove OTP gate from transactions, fix categories auth, add implementation plan
- Remove OtpGateGuard from transactions controller (OTP verified at login)
- Fix categories controller to use authenticated user instead of TEMP_USER_ID
- Add comprehensive implementation plan document
- Update .env.example with WEB_APP_URL
- Prepare for admin dashboard development
2025-10-11 14:00:11 +07:00
dwindown
0da6071eb3 first commit 2025-10-09 12:52:41 +07:00