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