fix: geçmiş arşiv kayıtları ana ekranı çökertiyordu

- SummaryCards/TenderList/DailyBulletin/ResultSearch/TenderCalendar:
  eklenmeZamani, baslik, kurum, ikn, tarih alanlarına güvenli erişim
  (arşiv kayıtlarında bu alanlar bulunmuyordu → TypeError, boş ekran)
- history-store: arşiv kayıtlarına arayüzün beklediği varsayılan alanlar
This commit is contained in:
2026-08-28 10:46:54 +03:00
parent d606d55e41
commit daf5c2c117
6 changed files with 25 additions and 11 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ export const DailyBulletin = () => {
const { tenders, setActiveTenderDetail } = useApp();
const todayStr = '10.08.2026';
const todayTenders = tenders.filter(t => t.tarih === todayStr || t.eklenmeZamani.includes('az') || t.eklenmeZamani.includes('önce'));
const todayTenders = tenders.filter(t => t.tarih === todayStr || (t.eklenmeZamani || '').includes('az') || (t.eklenmeZamani || '').includes('önce'));
return (
<div className="space-y-4 my-4 animate-fade-in">
+3 -3
View File
@@ -12,9 +12,9 @@ export const ResultSearch = () => {
if (!query) return true;
const q = query.toLowerCase();
return (
t.baslik.toLowerCase().includes(q) ||
t.ikn.toLowerCase().includes(q) ||
t.kurum.toLowerCase().includes(q) ||
(t.baslik || '').toLowerCase().includes(q) ||
(t.ikn || '').toLowerCase().includes(q) ||
(t.kurum || '').toLowerCase().includes(q) ||
(t.kazananFirma && t.kazananFirma.toLowerCase().includes(q))
);
});
+1 -1
View File
@@ -15,7 +15,7 @@ export const TenderCalendar = () => {
{ date: '15.08.2026', label: 'Cumartesi', count: 1 }
];
const dayTenders = tenders.filter(t => t.tarih === selectedDay || (selectedDay === '10.08.2026' && t.tarih.includes('10')));
const dayTenders = tenders.filter(t => t.tarih === selectedDay || (selectedDay === '10.08.2026' && (t.tarih || '').includes('10')));
return (
<div className="space-y-4 my-4 animate-fade-in">