fix(feedback): past review in modal comes only from sent feedbacks

This commit is contained in:
dev
2026-10-08 11:30:32 +03:00
parent abecc94efd
commit a65d985f2b
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -433,8 +433,9 @@
const r = await fetch(`${API}/api/feedbacks/last?resident=${encodeURIComponent(resident)}`, { headers: hdr() });
if (r.ok) {
const row = await r.json();
if (row && row.text) document.getElementById('fbPastReview').value = row.text;
setPastReviewLabel(row && row.text ? row : null);
const found = row && row.text ? row : null;
document.getElementById('fbPastReview').value = found ? found.text : '';
setPastReviewLabel(found);
}
} catch (e) {}
}