From 7e18228d46485604e079a2921774a4f0ad79e590 Mon Sep 17 00:00:00 2001 From: Alihaghighattalab Date: Sat, 10 Aug 2024 18:05:12 +0330 Subject: [PATCH] fix status value --- src/components/common/create-col.tsx | 3 ++- src/utility/reports.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/common/create-col.tsx b/src/components/common/create-col.tsx index ac15d9d..acbc6ec 100644 --- a/src/components/common/create-col.tsx +++ b/src/components/common/create-col.tsx @@ -1,4 +1,5 @@ import { createColumnHelper } from "@tanstack/react-table"; +import { ShieldCross, ShieldTick } from "iconsax-react"; type ColumnConfig = { accessor: any; @@ -11,7 +12,7 @@ export const createColumns = (columnConfigs: ColumnConfig[]) => { return columnConfigs.map(config => columnHelper.accessor(config.accessor, { header: () => config.header, - cell: (info) => info.getValue(), + cell: (info) => config.header === "وضعیت" ? info.getValue() ? : : info.getValue(), enableSorting: config.enableSorting ?? true, }) ); diff --git a/src/utility/reports.tsx b/src/utility/reports.tsx index 927df9f..13abed7 100644 --- a/src/utility/reports.tsx +++ b/src/utility/reports.tsx @@ -6,7 +6,7 @@ type colConfig = { } const columnConfigs: colConfig[] | [] = [ - { accessor: "device_model", header: "وضعیت" }, + { accessor: "status", header: "وضعیت" }, { accessor: "dollar", header: "دلار" }, { accessor: "score", header: "امتیاز" }, { accessor: "device_model", header: "مدل دستگاه" },