diff --git a/components/Card.vue b/components/Card.vue
index 1bc6bd8..fe63e8c 100644
--- a/components/Card.vue
+++ b/components/Card.vue
@@ -3,7 +3,7 @@
- {{props.course?.price == 0 ? 'رایگان' : props.course?.price + ',000'}}
+ {{props.course?.price == 0 ? 'رایگان' : numberFormat(props.course?.price) }}
تومان
- 540,000
- تومان
+ {{ props.item?.price > 0 ? numberFormat(props.item?.price) + 'تومان' : 'رایگان' }}
+
-
@@ -20,11 +17,11 @@
-
- ترفند های کاربردی پایتون
-
+ {{ props.item?.name }}
+
-
+
\ No newline at end of file
diff --git a/pages/account/my-courses.vue b/pages/account/my-courses.vue
index f4d798b..ae8f6e1 100644
--- a/pages/account/my-courses.vue
+++ b/pages/account/my-courses.vue
@@ -3,9 +3,11 @@
@@ -24,6 +26,8 @@
\ No newline at end of file
diff --git a/server/api/user/payments.js b/server/api/user/payments.js
new file mode 100644
index 0000000..823a034
--- /dev/null
+++ b/server/api/user/payments.js
@@ -0,0 +1,19 @@
+export default defineEventHandler(async (event) => {
+ const { public: { apiBase } } = useRuntimeConfig();
+ const token = getCookie(event, 'token');
+ try {
+ const payments = await $fetch(`${apiBase}/user/payments`, {
+ method: 'GET',
+ headers: {
+ 'Accept': 'application/json',
+ 'Authorization': `Bearer ${token}`
+ },
+ });
+console.log('server', payments);
+ return payments;
+ } catch (error) {
+
+ return error;
+ }
+
+})
\ No newline at end of file
diff --git a/utils/jDate.js b/utils/jDate.js
new file mode 100644
index 0000000..b8e533f
--- /dev/null
+++ b/utils/jDate.js
@@ -0,0 +1 @@
+export const jDate = (d) => new Date(d).toLocaleDateString('fa-IR')
\ No newline at end of file
diff --git a/utils/numberFormat.js b/utils/numberFormat.js
new file mode 100644
index 0000000..f490379
--- /dev/null
+++ b/utils/numberFormat.js
@@ -0,0 +1,5 @@
+// export const numberFormat = (number) => new Intl.NumberFormat('en-IN', { maximumSignificantDigits: 3 }).format(number)
+
+export const numberFormat = (number) => {
+ return new Intl.NumberFormat().format(number)
+}
\ No newline at end of file