feat: add visual indicators for Paulin and Agathe feedback in apartment cards
This commit is contained in:
@@ -99,6 +99,9 @@ export default function AppartCard({ annonce, onDelete, onUpdated }) {
|
|||||||
commentP !== (annonce.COMMENTAIRE_P || "") ||
|
commentP !== (annonce.COMMENTAIRE_P || "") ||
|
||||||
commentA !== (annonce.COMMENTAIRE_A || "");
|
commentA !== (annonce.COMMENTAIRE_A || "");
|
||||||
|
|
||||||
|
const hasPaulinFeedback = (noteP ?? 0) > 0 || !!commentP?.trim();
|
||||||
|
const hasAgatheFeedback = (noteA ?? 0) > 0 || !!commentA?.trim();
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
setSaving(true);
|
setSaving(true);
|
||||||
await updateAnnonce(annonce.id, {
|
await updateAnnonce(annonce.id, {
|
||||||
@@ -204,8 +207,19 @@ export default function AppartCard({ annonce, onDelete, onUpdated }) {
|
|||||||
<span className="flex items-center gap-1.5">
|
<span className="flex items-center gap-1.5">
|
||||||
<MessageSquare size={14} />
|
<MessageSquare size={14} />
|
||||||
Notes et commentaires
|
Notes et commentaires
|
||||||
{hasChanges && (
|
{(hasPaulinFeedback || hasAgatheFeedback) && (
|
||||||
<span className="w-1.5 h-1.5 rounded-full bg-warm-500" />
|
<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>
|
</span>
|
||||||
{expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
|
{expanded ? <ChevronUp size={14} /> : <ChevronDown size={14} />}
|
||||||
|
|||||||
Reference in New Issue
Block a user