|
|
@@ -13,13 +13,13 @@ interface PageProps {
|
|
|
export default async function LayoutConfigurationDetailPage({ params }: PageProps) {
|
|
|
const p = await params;
|
|
|
const id = parseInt(p.id);
|
|
|
-
|
|
|
+
|
|
|
if (isNaN(id)) {
|
|
|
notFound();
|
|
|
}
|
|
|
|
|
|
const result = await getLayoutConfiguration(id);
|
|
|
-
|
|
|
+
|
|
|
if (!result.success || !result.data) {
|
|
|
notFound();
|
|
|
}
|
|
|
@@ -40,11 +40,11 @@ export default async function LayoutConfigurationDetailPage({ params }: PageProp
|
|
|
...configuration,
|
|
|
createdAt: configuration.createdAt,
|
|
|
updatedAt: configuration.updatedAt,
|
|
|
- sections: configuration.sections.map(section => ({
|
|
|
+ sections: configuration.sections.map((section: any) => ({
|
|
|
...section,
|
|
|
startingRow: section.startingRow ?? undefined,
|
|
|
endingRow: section.endingRow ?? undefined,
|
|
|
- fields: section.fields.map(field => ({
|
|
|
+ fields: section.fields.map((field: any) => ({
|
|
|
...field,
|
|
|
dataTypeFormat: field.dataTypeFormat ?? null
|
|
|
}))
|