diff --git a/src/components/table/CTHead.tsx b/src/components/table/CTHead.tsx index 849e09f..8a0f960 100644 --- a/src/components/table/CTHead.tsx +++ b/src/components/table/CTHead.tsx @@ -18,35 +18,28 @@ const CTHead = ({ }: Tprops) => { const tableHeader = table.getHeaderGroups().map((headerGroup) => ( - {headerGroup.headers.map((header) => { - return ( - - - {hFilter && - header.column.getCanFilter() && - // block filter for Index column - header.id.toLocaleLowerCase() !== "index" ? ( -
- -
- ) : null} -
- ); - })} + {headerGroup.headers.map((header) => ( + + + {hFilter && header.column.getCanFilter() ? ( +
+ +
+ ) : null} +
+ ))} )); return ( diff --git a/src/configs/columnDefs/defService.tsx b/src/configs/columnDefs/defService.tsx deleted file mode 100644 index a8eec59..0000000 --- a/src/configs/columnDefs/defService.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { ColumnDef, CellContext } from "@tanstack/react-table"; -import i18n from "@/configs/i18n"; -import { Tservice } from "../schema/settingSchema"; -import { rangeFilterFn } from "./filterFn"; -import { formMoney } from "@/lib/literals"; - -const useServiceColumnsDef = () => { - const serviceColumns: ColumnDef[] = [ - { - id: "Index", - header: i18n.t("label.index"), - accessorFn: (_, index) => index, - cell: (info: CellContext) => { - return {info.row.index + 1}; - }, - }, - { - header: i18n.t("label.serviceName"), - accessorKey: "name", - cell: (info: CellContext) => { - return {info.getValue()}; - }, - }, - { - header: i18n.t("label.servicePrice"), - accessorKey: "price", - cell: (info: CellContext) => { - return {formMoney(info.getValue())}; - }, - filterFn: rangeFilterFn, - meta: { - filterVariant: "range", - }, - }, - ]; - return serviceColumns; -}; - -export default useServiceColumnsDef;