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": "سرویس", "service": "سرویس",
"status": "وضعیت", "status": "وضعیت",
"active": "فعال", "active": "فعال",
"deactive": "غیرفعال" "deactive": "غیرفعال",
"0": "درصد",
"1": "تومان"
}, },
"empty": { "empty": {
"empty_my_service": "سرویسی یافت نشد.", "empty_my_service": "سرویسی یافت نشد.",
+2 -5
View File
@@ -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>
) )
+6 -26
View File
@@ -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;
};
}[];
}; };