feat: add visual indicators for Paulin and Agathe feedback in apartment cards

This commit is contained in:
2026-02-13 17:59:12 +01:00
parent b7b0f5ed1f
commit e796e57e34

View File

@@ -99,6 +99,9 @@ export default function AppartCard({ annonce, onDelete, onUpdated }) {
commentP !== (annonce.COMMENTAIRE_P || "") ||
commentA !== (annonce.COMMENTAIRE_A || "");
const hasPaulinFeedback = (noteP ?? 0) > 0 || !!commentP?.trim();
const hasAgatheFeedback = (noteA ?? 0) > 0 || !!commentA?.trim();
const handleSave = async () => {
setSaving(true);
await updateAnnonce(annonce.id, {
@@ -204,8 +207,19 @@ export default function AppartCard({ annonce, onDelete, onUpdated }) {
<span className="flex items-center gap-1.5">
<MessageSquare size={14} />
Notes et commentaires
{hasChanges && (
<span className="w-1.5 h-1.5 rounded-full bg-warm-500" />
{(hasPaulinFeedback || hasAgatheFeedback) && (
<span className="flex items-center gap-1">
{hasPaulinFeedback && (
<span className="w-4 h-4 rounded-full bg-warm-500 text-white text-[9px] font-semibold flex items-center justify-center">
P
</span>
)}
{hasAgatheFeedback && (
<span className="w-4 h-4 rounded-full bg-pink-500 text-white text-[9px] font-semibold flex items-center justify-center">
A
</span>
)}
</span>
)}
</span>
{expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}