feat(default): reorganize system settings pricing UI
Refine the default system settings structure and model pricing editor so pricing configuration is easier to scan and edit.
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router'
|
||||
import { OperationsSettings } from '@/features/system-settings/operations'
|
||||
import {
|
||||
OPERATIONS_DEFAULT_SECTION,
|
||||
OPERATIONS_SECTION_IDS,
|
||||
} from '@/features/system-settings/operations/section-registry.tsx'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticated/system-settings/operations/$section'
|
||||
)({
|
||||
beforeLoad: ({ params }) => {
|
||||
const validSections = OPERATIONS_SECTION_IDS as unknown as string[]
|
||||
if (!validSections.includes(params.section)) {
|
||||
throw redirect({
|
||||
to: '/system-settings/operations/$section',
|
||||
params: { section: OPERATIONS_DEFAULT_SECTION },
|
||||
})
|
||||
}
|
||||
},
|
||||
component: OperationsSettings,
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router'
|
||||
import { OPERATIONS_DEFAULT_SECTION } from '@/features/system-settings/operations/section-registry.tsx'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticated/system-settings/operations/'
|
||||
)({
|
||||
beforeLoad: () => {
|
||||
throw redirect({
|
||||
to: '/system-settings/operations/$section',
|
||||
params: { section: OPERATIONS_DEFAULT_SECTION },
|
||||
})
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user