added online and trigger
This commit is contained in:
@@ -57,42 +57,31 @@ export const cols: BaseTableColumn[] = [
|
||||
type: 'Text'
|
||||
},*/
|
||||
{
|
||||
title: 'وضعیت کاربر',
|
||||
title: 'وضعیت',
|
||||
dataIndex: 'active',
|
||||
key: 'active',
|
||||
key: 'status',
|
||||
type: 'Boolean',
|
||||
width: 132,
|
||||
filterable: false,
|
||||
sortable: false,
|
||||
customRender: ({ record }) => {
|
||||
return record.active ? (
|
||||
<div class="flex justify-center">
|
||||
<CustomTag textColor="#25855A" bgColor="#E3F4E9" class={'font-bold px-6'}>
|
||||
فعال
|
||||
const userOk = Boolean(record.active)
|
||||
const tradeOk = Boolean(record.trade_active)
|
||||
return (
|
||||
<div class="flex flex-col items-center gap-1">
|
||||
<CustomTag
|
||||
textColor={userOk ? '#25855A' : '#C53030'}
|
||||
bgColor={userOk ? '#E3F4E9' : '#FECACA'}
|
||||
class="m-0 font-bold !px-2.5 !py-0 text-xs leading-6 whitespace-nowrap"
|
||||
>
|
||||
{userOk ? 'حساب فعال' : 'حساب غیرفعال'}
|
||||
</CustomTag>
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex justify-center">
|
||||
<CustomTag textColor="#C53030" bgColor="#FECACA" class={'font-bold px-6'}>
|
||||
غیر فعال
|
||||
</CustomTag>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'وضعیت سفارش دهی',
|
||||
dataIndex: 'trade_active',
|
||||
key: 'trade_active',
|
||||
type: 'Boolean',
|
||||
customRender: ({ record }) => {
|
||||
return record.trade_active ? (
|
||||
<div class="flex justify-center">
|
||||
<CustomTag textColor="#25855A" bgColor="#E3F4E9" class={'font-bold px-6'}>
|
||||
مجاز
|
||||
</CustomTag>
|
||||
</div>
|
||||
) : (
|
||||
<div class="flex justify-center">
|
||||
<CustomTag textColor="#C53030" bgColor="#FECACA" class={'font-bold px-6'}>
|
||||
غیر مجاز
|
||||
<CustomTag
|
||||
textColor={tradeOk ? '#25855A' : '#C53030'}
|
||||
bgColor={tradeOk ? '#E3F4E9' : '#FECACA'}
|
||||
class="m-0 font-bold !px-2.5 !py-0 text-xs leading-6 whitespace-nowrap"
|
||||
>
|
||||
{tradeOk ? 'سفارش مجاز' : 'سفارش غیرمجاز'}
|
||||
</CustomTag>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user