Implement admin ports and system settings management
- Port CRUD: list, create, update with branding, currency, timezone - System settings: upsert key-value pairs per port with known settings UI (AI feature flags, invoice discount, pipeline weights, berth rules) - Settings manager with toggle switches, number inputs, and JSON editors - Replace both stub pages with real implementations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
14
src/lib/validators/settings.ts
Normal file
14
src/lib/validators/settings.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const upsertSettingSchema = z.object({
|
||||
key: z.string().min(1).max(100),
|
||||
value: z.unknown(),
|
||||
});
|
||||
|
||||
export type UpsertSettingInput = z.infer<typeof upsertSettingSchema>;
|
||||
|
||||
export const deleteSettingSchema = z.object({
|
||||
key: z.string().min(1).max(100),
|
||||
});
|
||||
|
||||
export type DeleteSettingInput = z.infer<typeof deleteSettingSchema>;
|
||||
Reference in New Issue
Block a user