From 3173def1d96d964e2c77c5ea6b00a5c62f5614df Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Wed, 3 Dec 2025 11:23:06 +0330 Subject: [PATCH] report --- src/utility/reports.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/utility/reports.tsx b/src/utility/reports.tsx index 9b39e86..ac6e3d5 100644 --- a/src/utility/reports.tsx +++ b/src/utility/reports.tsx @@ -9,12 +9,18 @@ const columnConfigs: colConfig[] | [] = [ cellRenderer: (info) => info.getValue() === 1 ? : }, { - accessor: "deviceId.profit", header: "سود تومانی" + accessor: "profit", header: "سود تومانی", + cellRenderer: (info) => { + const rowData = info.row.original; + const deviceIdProfit = rowData?.deviceId?.profit; + const profit = rowData?.profit; + return deviceIdProfit ?? profit ?? ""; + } }, { accessor: "deviceId.score", header: "امتیاز" }, - { accessor: "deviceId.model", header: "مدل دستگاه" }, - { accessor: "deviceId.IMEI", header: "شماره IMEI" }, - { accessor: "deviceId.created_at", header: "تاریخ نصب", cellRenderer: (info) => info.getValue() &&

{formatDateToPersian(info.getValue())}

}, + { accessor: "deviceType", header: "مدل دستگاه" }, + { accessor: "IMEI", header: "شماره IMEI" }, + { accessor: "installationDate", header: "تاریخ نصب", cellRenderer: (info) => info.getValue() &&

{formatDateToPersian(info.getValue())}

}, { accessor: "registerDate", header: "تاریخ ثبت IMEI", cellRenderer: (info) => info.getValue() &&

{formatDateToPersian(info.getValue())}

}, ];