fix bug sidcount

This commit is contained in:
hamid zarghami
2025-04-23 16:43:14 +03:30
parent 0226a4a992
commit 36c5ca0680
3 changed files with 11 additions and 32 deletions
+3 -1
View File
@@ -467,7 +467,9 @@
"service": "سرویس",
"status": "وضعیت",
"active": "فعال",
"deactive": "غیرفعال"
"deactive": "غیرفعال",
"0": "درصد",
"1": "تومان"
},
"empty": {
"empty_my_service": "سرویسی یافت نشد.",
+2 -5
View File
@@ -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>
)
+6 -26
View File
@@ -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;
};