diff --git a/backend/pb_migrations/1776793202_updated_review_votes.js b/backend/pb_migrations/1776793202_updated_review_votes.js
new file mode 100644
index 0000000..cd6ba68
--- /dev/null
+++ b/backend/pb_migrations/1776793202_updated_review_votes.js
@@ -0,0 +1,20 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_362615506")
+
+ // update collection data
+ unmarshal({
+ "listRule": ""
+ }, collection)
+
+ return app.save(collection)
+}, (app) => {
+ const collection = app.findCollectionByNameOrId("pbc_362615506")
+
+ // update collection data
+ unmarshal({
+ "listRule": "@request.auth.id != \"\""
+ }, collection)
+
+ return app.save(collection)
+})
diff --git a/backend/pb_migrations/1776793214_updated_review_votes.js b/backend/pb_migrations/1776793214_updated_review_votes.js
new file mode 100644
index 0000000..b388704
--- /dev/null
+++ b/backend/pb_migrations/1776793214_updated_review_votes.js
@@ -0,0 +1,20 @@
+///
+migrate((app) => {
+ const collection = app.findCollectionByNameOrId("pbc_362615506")
+
+ // update collection data
+ unmarshal({
+ "viewRule": ""
+ }, collection)
+
+ return app.save(collection)
+}, (app) => {
+ const collection = app.findCollectionByNameOrId("pbc_362615506")
+
+ // update collection data
+ unmarshal({
+ "viewRule": "@request.auth.id != \"\""
+ }, collection)
+
+ return app.save(collection)
+})
diff --git a/frontend/src/components/reviews/ReviewCard.astro b/frontend/src/components/reviews/ReviewCard.astro
index ec8d6aa..677312a 100644
--- a/frontend/src/components/reviews/ReviewCard.astro
+++ b/frontend/src/components/reviews/ReviewCard.astro
@@ -1,14 +1,16 @@
---
+type ColorKey = 'bg-gradient-1' | 'bg-gradient-2' | 'bg-gradient-3' | 'bg-gradient-4' | 'bg-gradient-5' | 'bg-gradient-6';
+
export interface Props {
name: string;
profession: string;
text: string;
rating: number;
initial: string;
- color: string;
+ color: ColorKey;
date: string;
- votesCount?: number;
- reviewId?: string;
+ reviewId: string;
+ initialLikes?: number;
}
const {
@@ -19,8 +21,8 @@ const {
initial,
color,
date,
- votesCount = 0,
- reviewId = ''
+ reviewId,
+ initialLikes = 0
} = Astro.props;
// Форматируем дату
@@ -32,14 +34,41 @@ const formatDate = (dateStr: string) => {
year: 'numeric'
});
};
+
+// Цвета для градиентов аватаров
+const gradientColors = {
+ 'bg-gradient-1': 'from-purple-500 to-pink-500',
+ 'bg-gradient-2': 'from-blue-500 to-cyan-500',
+ 'bg-gradient-3': 'from-green-500 to-emerald-500',
+ 'bg-gradient-4': 'from-orange-500 to-red-500',
+ 'bg-gradient-5': 'from-indigo-500 to-purple-500',
+ 'bg-gradient-6': 'from-rose-500 to-orange-500',
+};
---
-
+
+
+
+
+
+
+