Files
asan-installer-front/src/utility/subscription.tsx
T
2024-08-11 14:39:02 +03:30

31 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { createColumns } from "../components/common/create-col";
import { colConfig } from "../types";
import { filterNumber } from "./status";
const columnConfigs: colConfig[] | [] = [
{
accessor: "imei_number", header: "شماره IMEI",
},
{ accessor: "renewal_date", header: "تاریخ تمدید", cellRenderer: (info) => info.getValue() && <p style={{ direction: "ltr" }}>{info.getValue()}</p> },
{ accessor: "renewal_type", header: "نوع تمدید" },
{
accessor: "amount", header: "مبلغ",
cellRenderer: (info) => info.getValue() && <div className="w-full justify-center flex flex-row gap-2 items-end">
<p className="text-primary-text-color text-base font-normal">{filterNumber(info.getValue())}</p>
<p className="text-primary-text-color font-normal text-xs">تومان</p>
</div>
},
{
accessor: "contribution", header: "سهم شما",
cellRenderer: (info) => info.getValue() && <div className="w-full justify-center flex flex-row gap-2 items-end">
<p className="text-primary-text-color text-base font-normal">{filterNumber(info.getValue())}</p>
<p className="text-primary-text-color font-normal text-xs">تومان</p>
</div>
},
{ accessor: "percentage", header: "درصد" },
];
export const subscriptionsCol = createColumns<any>(columnConfigs);