fix bug sidcount
This commit is contained in:
+3
-1
@@ -467,7 +467,9 @@
|
||||
"service": "سرویس",
|
||||
"status": "وضعیت",
|
||||
"active": "فعال",
|
||||
"deactive": "غیرفعال"
|
||||
"deactive": "غیرفعال",
|
||||
"0": "درصد",
|
||||
"1": "تومان"
|
||||
},
|
||||
"empty": {
|
||||
"empty_my_service": "سرویسی یافت نشد.",
|
||||
|
||||
@@ -29,8 +29,6 @@ const MyDiscountList: FC = () => {
|
||||
<Td text={t('discount.start_date')} />
|
||||
<Td text={t('discount.end_date')} />
|
||||
<Td text={t('discount.percent_ammount')} />
|
||||
<Td text={t('discount.service')} />
|
||||
<Td text={t('discount.status')} />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -44,10 +42,9 @@ const MyDiscountList: FC = () => {
|
||||
<Td text={item.code} />
|
||||
<Td text={moment(item.startDate).format('jYYYY-jMM-jDD')} />
|
||||
<Td text={moment(item.endDate).format('jYYYY-jMM-jDD')} />
|
||||
<Td text={item.type === 'CODE' ? item.amount + '%' : item.amount + 'تومان'} />
|
||||
<Td text={item.subscriptionPlans[0]?.service?.name} />
|
||||
<Td text={''}>
|
||||
{item.isActive ? <span className='text-green-400'>{t('discount.active')}</span> : <span className='text-gray-500'>{t('discount.inactive')}</span>}
|
||||
{item.value}
|
||||
{item.type === 0 ? 'درصد' : 'تومان'}
|
||||
</Td>
|
||||
</tr>
|
||||
)
|
||||
|
||||
@@ -1,30 +1,10 @@
|
||||
export type DiscountItemType = {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
title: string;
|
||||
type: string;
|
||||
calculationType: string;
|
||||
amount: number;
|
||||
isActive: boolean;
|
||||
code: string;
|
||||
startDate: string;
|
||||
createdAt: string;
|
||||
endDate: string;
|
||||
subscriptionPlans: {
|
||||
id: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
name: string;
|
||||
duration: number;
|
||||
price: number;
|
||||
isActive: boolean;
|
||||
service: {
|
||||
id: string;
|
||||
name: string;
|
||||
title: string;
|
||||
description: string;
|
||||
link: string;
|
||||
icon: string;
|
||||
};
|
||||
}[];
|
||||
id: string;
|
||||
startDate: string;
|
||||
title: string;
|
||||
type: number;
|
||||
value: number;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user