15 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
46488a09e2 feat: Add WhatsApp verification & responsive dialogs
 COMPLETED FEATURES:

1. WhatsApp Number Verification
   - Verify phone number is registered on WhatsApp before saving
   - Use OTP webhook with check_number mode
   - Show error if number not registered
   - Translated error messages

2. Responsive Dialog/Drawer System
   - Created ResponsiveDialog component
   - Desktop: Uses Dialog (modal)
   - Mobile: Uses Drawer (bottom sheet)
   - Applied to WalletDialog & TransactionDialog
   - Better UX on mobile devices

3. Translation Fixes
   - Fixed editProfile key placement
   - All translation keys now consistent
   - Build passing without errors

📱 MOBILE IMPROVEMENTS:
- Form dialogs now slide up from bottom on mobile
- Better touch interaction
- More native mobile feel

🔧 TECHNICAL:
- Added shadcn Drawer component
- Created useMediaQuery hook
- Responsive context wrapper
- Type-safe implementation
2025-10-12 17:07:16 +07:00
dwindown
d626c7d8de feat: Translate Overview and Transactions pages
- Add multi-language support to Overview page
- Add multi-language support to Transactions page
- Translate stats cards, buttons, and filters
- All UI text now supports ID/EN switching

Remaining: Profile page only
2025-10-12 08:57:57 +07:00
dwindown
bfd009368a feat: Translate Wallets page to multi-language
- Add useLanguage hook to Wallets page
- Translate all UI text (buttons, labels, table headers)
- Translate filter options and placeholders
- Translate delete confirmation dialog
- Support both Indonesian and English
2025-10-12 08:53:30 +07:00
dwindown
371b5e0a66 feat: Implement multi-language system (ID/EN) for member dashboard
- Create translation files (locales/id.ts, locales/en.ts)
- Add LanguageContext with useLanguage hook
- Add LanguageToggle component in sidebar
- Default language: Indonesian (ID)
- Translate WalletDialog and TransactionDialog
- Language preference persisted in localStorage
- Type-safe translations with autocomplete

Next: Translate remaining pages (Overview, Wallets, Transactions, Profile)
2025-10-12 08:51:48 +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
258d326909 feat: implement AdminPaymentMethods page with full CRUD
Features:
 Modern card grid layout (matches AdminPlans design)
 Payment method types: Bank Transfer, E-Wallet, QRIS
 Type-specific icons and colors
 Account number & name display
 Instructions section
 Toggle active/inactive status
 Toggle visibility
 Delete functionality
 Drag handle for reordering (UI ready)
 Animated status indicators
 Indonesian text throughout

Card Design:
- Same modern gradient cards as Plans
- Type badges with icons
- 2-column stats grid
- Action buttons (Active, Visibility, Edit, Delete)
- Hover effects and transitions

API Integration:
- GET /admin/payment-methods
- PATCH /admin/payment-methods/:id/visibility
- PATCH /admin/payment-methods/:id/status
- DELETE /admin/payment-methods/:id

TODO: Create/Edit modal (next step)
2025-10-11 22:05:27 +07:00
dwindown
1e3d320716 feat: complete redesign of admin plan cards
Major UI Overhaul:
 Modern card design with gradients
 Hover effects: lift up + shadow
 Inline layout: grip icon + title + badge
 No wasted vertical space
 Larger price display (text-4xl)
 Gradient price section with border
 2-column stats grid with cards
 Animated pulse dot for active status
 Full-width visibility button + icon actions
 Indonesian text throughout

Layout Changes:
- Grip icon inline with title (left side)
- Badge inline with title text
- Trial badge inline with duration
- Stats in grid layout
- Action buttons with hover fills

Design Elements:
- rounded-2xl cards
- Gradient backgrounds
- Border color changes on hover
- Smooth transitions (300ms)
- Better spacing and typography
- Consistent card heights
2025-10-11 21:59:13 +07:00
dwindown
bef2344ddc fix: remove dark: variants, use theme colors only
ISSUE: Tailwind v4 doesn't handle dark: variants the same way as v3
The dark: prefix wasn't working properly in light mode

SOLUTION: Replace all dark: variants with theme-aware colors

Admin Pages:
- AdminPlans: badges use bg-primary/20, bg-green-500/20, etc.
- AdminUsers: role/status badges use opacity-based colors
- AdminDashboard: stat cards use /20 opacity backgrounds

Member Pages:
- Overview: chart tooltips use text-foreground

Benefits:
 Works correctly in both light and dark mode
 Colors automatically adapt via CSS variables
 No more hardcoded dark: classes
 Consistent opacity-based approach

Technical:
- Tailwind v4 uses @theme and CSS variables
- dark: variants need proper configuration
- Using /20 opacity on colors works universally
2025-10-11 21:20:36 +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
7396cb5bd6 feat: add admin pages for plans, users, and placeholders
- AdminPlans: full CRUD UI with cards, visibility toggle
- AdminUsers: search, suspend/unsuspend, grant Pro access
- AdminPaymentMethods: placeholder
- AdminPayments: placeholder
- AdminSettings: placeholder
- All routes wired in App.tsx
- Admin panel fully navigable
2025-10-11 18:30:18 +07:00
dwindown
cd6b047d3f feat: add admin frontend layout and dashboard
- Add role field to User interface in AuthContext
- Create AdminLayout with responsive sidebar navigation
- Create AdminDashboard with stats cards
- Add admin routes to App.tsx
- Admin panel accessible at /admin
- Shows stats: total users, active subscriptions, pending payments
- Access control: only users with role=admin can access
2025-10-11 18:22:42 +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