diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx | 10 | ||||
| -rw-r--r-- | app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx index cf0bf02e..194449a7 100644 --- a/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx +++ b/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx @@ -1,23 +1,23 @@ import * as React from "react"; +import { type SearchParams } from "@/types/table"; import { Shell } from "@/components/shell"; import { Skeleton } from "@/components/ui/skeleton"; import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; import { getComboBoxCodeGroups } from "@/lib/docu-list-rule/combo-box-settings/service"; import { ComboBoxSettingsTable } from "@/lib/docu-list-rule/combo-box-settings/table/combo-box-settings-table"; +import { searchParamsComboBoxSettingsCache } from "@/lib/docu-list-rule/combo-box-settings/validation"; import { InformationButton } from "@/components/information/information-button"; -import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation"; interface IndexPageProps { - searchParams: Promise<any>; + searchParams: Promise<SearchParams>; } export default async function IndexPage(props: IndexPageProps) { const searchParams = await props.searchParams; + const search = searchParamsComboBoxSettingsCache.parse(searchParams); const promises = Promise.all([ - getComboBoxCodeGroups( - searchParamsCodeGroupsCache.parse(searchParams) - ), + getComboBoxCodeGroups(search), ]); return ( diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx index 4195ba24..7fb7bd80 100644 --- a/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx +++ b/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx @@ -4,7 +4,9 @@ import { Skeleton } from "@/components/ui/skeleton"; import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"; import { NumberTypeConfigsTable } from "@/lib/docu-list-rule/number-type-configs/table/number-type-configs-table"; import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service"; +import { getNumberTypeConfigs } from "@/lib/docu-list-rule/number-type-configs/service"; import { InformationButton } from "@/components/information/information-button"; +import { searchParamsNumberTypeConfigsCache } from "@/lib/docu-list-rule/number-type-configs/validation"; interface IndexPageProps { searchParams: Promise<any>; @@ -12,6 +14,7 @@ interface IndexPageProps { export default async function IndexPage(props: IndexPageProps) { const searchParams = await props.searchParams; + const parsedSearchParams = await searchParamsNumberTypeConfigsCache.parse(searchParams); const promises = Promise.all([ getNumberTypes({ @@ -26,6 +29,8 @@ export default async function IndexPage(props: IndexPageProps) { description: "", isActive: "" }), + // Number Type Configs도 서버 사이드에서 가져오기 + parsedSearchParams.numberTypeId > 0 ? getNumberTypeConfigs(parsedSearchParams) : Promise.resolve({ success: true, data: [], pageCount: 0 }), ]); return ( @@ -53,7 +58,7 @@ export default async function IndexPage(props: IndexPageProps) { /> } > - <NumberTypeConfigsTable promises={promises} /> + <NumberTypeConfigsTable promises={promises} searchParams={parsedSearchParams} /> </React.Suspense> </Shell> ); |
