summaryrefslogtreecommitdiff
path: root/lib/form-list/table/formLists-table.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-04-08 03:08:19 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-04-08 03:08:19 +0000
commit9ceed79cf32c896f8a998399bf1b296506b2cd4a (patch)
treef84750fa6cac954d5e31221fc47a54c655fc06a9 /lib/form-list/table/formLists-table.tsx
parent230ce796836c25df26c130dbcd616ef97d12b2ec (diff)
로그인 및 미들웨어 처리. 구조 변경
Diffstat (limited to 'lib/form-list/table/formLists-table.tsx')
-rw-r--r--lib/form-list/table/formLists-table.tsx22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/form-list/table/formLists-table.tsx b/lib/form-list/table/formLists-table.tsx
index be252655..58ac4671 100644
--- a/lib/form-list/table/formLists-table.tsx
+++ b/lib/form-list/table/formLists-table.tsx
@@ -12,17 +12,17 @@ import { DataTable } from "@/components/data-table/data-table"
import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-advanced-toolbar"
import { useFeatureFlags } from "./feature-flags-provider"
-import { TagTypeClassFormMappings } from "@/db/schema/vendorData"
import { getFormLists } from "../service"
import { getColumns } from "./formLists-table-columns"
import { FormListsTableToolbarActions } from "./formLists-table-toolbar-actions"
import { ViewMetas } from "./meta-sheet"
+import { ExtendedFormMappings } from "../validation"
interface ItemsTableProps {
promises: Promise<
[
Awaited<ReturnType<typeof getFormLists>>,
- ]
+ ]
>
}
@@ -34,7 +34,7 @@ export function FormListsTable({ promises }: ItemsTableProps) {
const [rowAction, setRowAction] =
- React.useState<DataTableRowAction<TagTypeClassFormMappings> | null>(null)
+ React.useState<DataTableRowAction<ExtendedFormMappings> | null>(null)
const columns = React.useMemo(
() => getColumns({ setRowAction }),
@@ -52,7 +52,7 @@ export function FormListsTable({ promises }: ItemsTableProps) {
* @prop {React.ReactNode} [icon] - An optional icon to display next to the label.
* @prop {boolean} [withCount] - An optional boolean to display the count of the filter option.
*/
- const filterFields: DataTableFilterField<TagTypeClassFormMappings>[] = [
+ const filterFields: DataTableFilterField<ExtendedFormMappings>[] = [
]
@@ -67,18 +67,26 @@ export function FormListsTable({ promises }: ItemsTableProps) {
* 3. Used with DataTableAdvancedToolbar: Enables a more sophisticated filtering UI.
* 4. Date and boolean types: Adds support for filtering by date ranges and boolean values.
*/
- const advancedFilterFields: DataTableAdvancedFilterField<TagTypeClassFormMappings>[] = [
+ const advancedFilterFields: DataTableAdvancedFilterField<ExtendedFormMappings>[] = [
+ {
+ id: "projectCode",
+ label: "Project Code",
+ type: "text",
+ },
+ {
+ id: "projectName",
+ label: "Project Name",
+ type: "text",
+ },
{
id: "formCode",
label: "Form Code",
type: "text",
-
},
{
id: "formName",
label: "Form Name",
type: "text",
-
},
{
id: "tagTypeLabel",