This commit is contained in:
hamid zarghami
2025-12-03 11:23:06 +03:30
parent 0cd6bce59a
commit 3173def1d9
+10 -4
View File
@@ -9,12 +9,18 @@ const columnConfigs: colConfig[] | [] = [
cellRenderer: (info) => info.getValue() === 1 ? <ShieldTick color="#11212D" className="flex w-full" /> : <ShieldCross color="#E51717" className="flex w-full" />
},
{
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() && <p style={{ direction: "ltr" }}>{formatDateToPersian(info.getValue())}</p> },
{ accessor: "deviceType", header: "مدل دستگاه" },
{ accessor: "IMEI", header: "شماره IMEI" },
{ accessor: "installationDate", header: "تاریخ نصب", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{formatDateToPersian(info.getValue())}</p> },
{ accessor: "registerDate", header: "تاریخ ثبت IMEI", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{formatDateToPersian(info.getValue())}</p> },
];