feat: Remove enabled checkbox + group payments by provider
1. Remove Enable/Disable Checkbox ✅ - Already controlled by toggle in main UI - Skip rendering 'enabled' field in GenericGatewayForm - Cleaner form, less redundancy 2. Use Field Default as Default Value ✅ - Already working: field.value ?? field.default - Backend sends current value, falls back to default - No changes needed 3. Group Online Payments by Provider ✅ - Installed @radix-ui/react-accordion - Created accordion.tsx component - Group by gateway.title (provider name) - Show provider with method count - Expand to see individual methods Structure: TriPay (3 payment methods) ├─ BNI Virtual Account ├─ Mandiri Virtual Account └─ BCA Virtual Account PayPal (1 payment method) └─ PayPal Benefits: - Cleaner UI with less clutter - Easy to find specific provider - Shows method count at a glance - Multiple providers can be expanded - Better organization for many gateways Files Modified: - GenericGatewayForm.tsx: Skip enabled field - Payments.tsx: Accordion grouping by provider - accordion.tsx: New component (shadcn pattern) Next: Dialog/Drawer responsive pattern
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint . --ext ts,tsx --report-unused-disable-directives"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-accordion": "^1.2.12",
|
||||
"@radix-ui/react-avatar": "^1.1.10",
|
||||
"@radix-ui/react-checkbox": "^1.3.3",
|
||||
"@radix-ui/react-dialog": "^1.1.15",
|
||||
|
||||
Reference in New Issue
Block a user