From 819d5ea802fc8c3ea68100a0217f167e2b5d9e1e Mon Sep 17 00:00:00 2001 From: mouazkh Date: Tue, 26 May 2026 23:04:00 +0300 Subject: [PATCH] added a swicher on the properties --- app/reservations/page.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/app/reservations/page.js b/app/reservations/page.js index 19e4115..02e8d1a 100644 --- a/app/reservations/page.js +++ b/app/reservations/page.js @@ -115,7 +115,7 @@ function ReservationCard({ r, onViewDetails, onPay, payingId }) { const isExpired = deadline ? Date.now() > deadline : false; const isPaying = payingId === r.id; const [showRating, setShowRating] = useState(false); - const [ratingValue, setRatingValue] = useState(0); + const [ratings, setRatings] = useState({ clean: 0, services: 0, ownerBehavior: 0, experience: 0 }); const [ratingComment, setRatingComment] = useState(''); const [submittingRating, setSubmittingRating] = useState(false); @@ -167,26 +167,36 @@ function ReservationCard({ r, onViewDetails, onPay, payingId }) { قيّم هذا العقار } {canRate && showRating &&
-
- {[1,2,3,4,5].map(n => ( - - ))} +
+ {[ + { key: 'clean', label: 'النظافة' }, + { key: 'services', label: 'الخدمات' }, + { key: 'ownerBehavior', label: 'تعامل المالك' }, + { key: 'experience', label: 'التجربة العامة' }, + ].map(cat =>
+ {cat.label} +
+ {[1,2,3,4,5].map(n => ( + + ))} +
+
)}