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
This commit is contained in:
54
apps/api/dist/seed.js
vendored
54
apps/api/dist/seed.js
vendored
@@ -107,10 +107,22 @@ async function main() {
|
||||
features: {
|
||||
wallets: { limit: null, label: 'Unlimited wallets' },
|
||||
goals: { limit: null, label: 'Unlimited goals' },
|
||||
team: { enabled: true, maxMembers: 10, label: 'Team feature (10 members)' },
|
||||
api: { enabled: true, rateLimit: 1000, label: 'API access (1000 req/hr)' },
|
||||
team: {
|
||||
enabled: true,
|
||||
maxMembers: 10,
|
||||
label: 'Team feature (10 members)',
|
||||
},
|
||||
api: {
|
||||
enabled: true,
|
||||
rateLimit: 1000,
|
||||
label: 'API access (1000 req/hr)',
|
||||
},
|
||||
support: { level: 'priority', label: 'Priority support' },
|
||||
export: { enabled: true, formats: ['csv', 'excel', 'pdf'], label: 'All export formats' },
|
||||
export: {
|
||||
enabled: true,
|
||||
formats: ['csv', 'excel', 'pdf'],
|
||||
label: 'All export formats',
|
||||
},
|
||||
},
|
||||
badge: 'Popular',
|
||||
badgeColor: 'blue',
|
||||
@@ -141,10 +153,22 @@ async function main() {
|
||||
features: {
|
||||
wallets: { limit: null, label: 'Unlimited wallets' },
|
||||
goals: { limit: null, label: 'Unlimited goals' },
|
||||
team: { enabled: true, maxMembers: 10, label: 'Team feature (10 members)' },
|
||||
api: { enabled: true, rateLimit: 1000, label: 'API access (1000 req/hr)' },
|
||||
team: {
|
||||
enabled: true,
|
||||
maxMembers: 10,
|
||||
label: 'Team feature (10 members)',
|
||||
},
|
||||
api: {
|
||||
enabled: true,
|
||||
rateLimit: 1000,
|
||||
label: 'API access (1000 req/hr)',
|
||||
},
|
||||
support: { level: 'priority', label: 'Priority support' },
|
||||
export: { enabled: true, formats: ['csv', 'excel', 'pdf'], label: 'All export formats' },
|
||||
export: {
|
||||
enabled: true,
|
||||
formats: ['csv', 'excel', 'pdf'],
|
||||
label: 'All export formats',
|
||||
},
|
||||
discount: { value: '17%', label: 'Save 17% (2 months free)' },
|
||||
},
|
||||
badge: 'Best Value',
|
||||
@@ -161,7 +185,11 @@ async function main() {
|
||||
apiRateLimit: 1000,
|
||||
},
|
||||
});
|
||||
console.log('✅ Plans created:', [freePlan.name, proMonthly.name, proYearly.name]);
|
||||
console.log('✅ Plans created:', [
|
||||
freePlan.name,
|
||||
proMonthly.name,
|
||||
proYearly.name,
|
||||
]);
|
||||
console.log('\n💳 Creating default payment methods...');
|
||||
const bcaMethod = await prisma.paymentMethod.upsert({
|
||||
where: { id: 'bca-method' },
|
||||
@@ -211,7 +239,11 @@ async function main() {
|
||||
sortOrder: 3,
|
||||
},
|
||||
});
|
||||
console.log('✅ Payment methods created:', [bcaMethod.displayName, mandiriMethod.displayName, gopayMethod.displayName]);
|
||||
console.log('✅ Payment methods created:', [
|
||||
bcaMethod.displayName,
|
||||
mandiriMethod.displayName,
|
||||
gopayMethod.displayName,
|
||||
]);
|
||||
console.log('\n⚙️ Creating app config...');
|
||||
await prisma.appConfig.upsert({
|
||||
where: { key: 'MAINTENANCE_MODE' },
|
||||
@@ -253,7 +285,11 @@ async function main() {
|
||||
console.log(' Admin Email:', ADMIN_EMAIL);
|
||||
console.log(' Admin Password:', ADMIN_PASSWORD);
|
||||
console.log(' Plans:', [freePlan.name, proMonthly.name, proYearly.name].join(', '));
|
||||
console.log(' Payment Methods:', [bcaMethod.displayName, mandiriMethod.displayName, gopayMethod.displayName].join(', '));
|
||||
console.log(' Payment Methods:', [
|
||||
bcaMethod.displayName,
|
||||
mandiriMethod.displayName,
|
||||
gopayMethod.displayName,
|
||||
].join(', '));
|
||||
console.log('\n⚠️ IMPORTANT: Change admin password after first login!');
|
||||
console.log('\n🔗 Login at: http://localhost:5174/auth/login');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user