diff --git a/frontend/admin/src/pages/PostCreatePage.vue b/frontend/admin/src/pages/PostCreatePage.vue
index 3af1037..b419c0c 100644
--- a/frontend/admin/src/pages/PostCreatePage.vue
+++ b/frontend/admin/src/pages/PostCreatePage.vue
@@ -238,9 +238,9 @@ const formatFileSize = (bytes) => {
-
-
+
+
diff --git a/frontend/admin/src/pages/PostEditPage.vue b/frontend/admin/src/pages/PostEditPage.vue
index c14560b..9abaabe 100644
--- a/frontend/admin/src/pages/PostEditPage.vue
+++ b/frontend/admin/src/pages/PostEditPage.vue
@@ -293,8 +293,7 @@ onMounted(() => {
router.push('/posts');
}
});
-
-
+
@@ -323,9 +322,9 @@ onMounted(() => {
-
-
+
+
diff --git a/frontend/admin/src/pages/PostPage.vue b/frontend/admin/src/pages/PostPage.vue
index 8007ddb..6c48232 100644
--- a/frontend/admin/src/pages/PostPage.vue
+++ b/frontend/admin/src/pages/PostPage.vue
@@ -130,8 +130,8 @@ const formatDateTime = (dateStr) => {
// Calculate price after discount
const calculateDiscountPrice = (price, discount) => {
- if (!discount) return price;
- return price * (1 - discount / 100);
+ if (!discount || discount >= 100) return price;
+ return price * discount / 100;
};
// Fetch posts data with pagination and search
@@ -154,6 +154,7 @@ const fetchPosts = async () => {
mediaTypes: getMediaTypes(post.assets),
price: post.price / 100,
publishedAt: formatDateTime(post.created_at),
+ editedAt: formatDateTime(post.updated_at),
viewCount: post.views,
likes: post.likes
}));
@@ -259,14 +260,14 @@ const formatMediaTypes = (mediaTypes) => {
-
+
{{ formatPrice(data.price) }}
-
+
{{ formatPrice(calculateDiscountPrice(data.price, data.discount)) }}
-
- (-{{ data.discount }}%)
+
+ ({{ data.discount }}%)
@@ -278,6 +279,12 @@ const formatMediaTypes = (mediaTypes) => {
+
+
+ {{ data.editedAt }}
+
+
+