diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/evaluation-check-list/page.tsx | 63 | ||||
| -rw-r--r-- | app/[lng]/spreadTest/page.tsx | 17 | ||||
| -rw-r--r-- | app/layout.tsx | 2 |
3 files changed, 81 insertions, 1 deletions
diff --git a/app/[lng]/evcp/(evcp)/evaluation-check-list/page.tsx b/app/[lng]/evcp/(evcp)/evaluation-check-list/page.tsx new file mode 100644 index 00000000..398005fa --- /dev/null +++ b/app/[lng]/evcp/(evcp)/evaluation-check-list/page.tsx @@ -0,0 +1,63 @@ +/* IMPORT */
+import { DataTableSkeleton } from '@/components/data-table/data-table-skeleton';
+import { getRegEvalCriteria } from '@/lib/evaluation-criteria/service';
+import { getValidFilters } from '@/lib/data-table';
+import RegEvalCriteriaTable from '@/lib/evaluation-criteria/table/reg-eval-criteria-table';
+import { searchParamsCache } from '@/lib/evaluation-criteria/validations';
+import { Shell } from '@/components/shell';
+import { Skeleton } from '@/components/ui/skeleton';
+import { Suspense } from 'react';
+import { type SearchParams } from '@/types/table';
+
+// ----------------------------------------------------------------------------------------------------
+
+/* TYPES */
+interface EvaluationCriteriaPageProps {
+ searchParams: Promise<SearchParams>
+}
+
+// ----------------------------------------------------------------------------------------------------
+
+/* REGULAR EVALUATION CRITERIA PAGE */
+async function EvaluationCriteriaPage(props: EvaluationCriteriaPageProps) {
+ const searchParams = await props.searchParams;
+ const search = searchParamsCache.parse(searchParams);
+ const validFilters = getValidFilters(search.filters);
+ const promises = Promise.all([
+ getRegEvalCriteria({
+ ...search,
+ filters: validFilters,
+ }),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <Suspense fallback={<Skeleton className="h-7 w-52" />}>
+ {/* <DateRangePicker
+ triggerSize="sm"
+ triggerClassName="ml-auto w-56 sm:w-60"
+ align="end"
+ shallow={false}
+ /> */}
+ </Suspense>
+ <Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={11}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["10rem", "40rem", "12rem", "12rem", "8rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <RegEvalCriteriaTable promises={promises} />
+ </Suspense>
+ </Shell>
+ )
+}
+
+// ----------------------------------------------------------------------------------------------------
+
+/* EXPORT */
+export default EvaluationCriteriaPage;
\ No newline at end of file diff --git a/app/[lng]/spreadTest/page.tsx b/app/[lng]/spreadTest/page.tsx new file mode 100644 index 00000000..2e10eeb8 --- /dev/null +++ b/app/[lng]/spreadTest/page.tsx @@ -0,0 +1,17 @@ +'use client' + + +import dynamic from "next/dynamic"; + +const SpreadSheet = dynamic( + () => { + return import("@/components/spread-js/testSheet"); + }, + { ssr: false } +); + +export default function SpreadTestPage() { + return ( + <div className='w-[100vw] h-[100vh]'><SpreadSheet /></div> + ) +} diff --git a/app/layout.tsx b/app/layout.tsx index c83c1a7e..4923aa22 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -74,7 +74,7 @@ export default async function RootLayout({ } catch (_) {} `, }} - /> + /> </head> <body |
