diff --git a/src/langs/fa.json b/src/langs/fa.json
index b9ef1ad..d65f2e8 100644
--- a/src/langs/fa.json
+++ b/src/langs/fa.json
@@ -467,7 +467,9 @@
"service": "سرویس",
"status": "وضعیت",
"active": "فعال",
- "deactive": "غیرفعال"
+ "deactive": "غیرفعال",
+ "0": "درصد",
+ "1": "تومان"
},
"empty": {
"empty_my_service": "سرویسی یافت نشد.",
diff --git a/src/pages/discounts/List.tsx b/src/pages/discounts/List.tsx
index 194072f..9005c53 100644
--- a/src/pages/discounts/List.tsx
+++ b/src/pages/discounts/List.tsx
@@ -29,8 +29,6 @@ const MyDiscountList: FC = () => {
|
|
|
- |
- |
@@ -44,10 +42,9 @@ const MyDiscountList: FC = () => {
|
|
|
- |
- |
- {item.isActive ? {t('discount.active')} : {t('discount.inactive')}}
+ {item.value}
+ {item.type === 0 ? 'درصد' : 'تومان'}
|
)
diff --git a/src/pages/discounts/types/DiscountTypes.ts b/src/pages/discounts/types/DiscountTypes.ts
index ab41620..12f1684 100644
--- a/src/pages/discounts/types/DiscountTypes.ts
+++ b/src/pages/discounts/types/DiscountTypes.ts
@@ -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;
};