reuse shared publication date model

This commit is contained in:
2026-09-06 19:19:22 +03:00
parent e56b9a87be
commit 7869657dd6
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -2,6 +2,7 @@ import React from 'react';
import { useApp } from '../../context/AppContext';
import { Newspaper, Calendar, Building2, Package, ArrowRight } from 'lucide-react';
import { istanbulDateKey } from '../../services/tenderCalendar';
import { bugunEklendi } from '../../services/ihaleTarih';
export const DailyBulletin = () => {
const { tenders, setActiveTenderDetail } = useApp();
@@ -10,9 +11,8 @@ export const DailyBulletin = () => {
const isoBugun = istanbulDateKey();
const [bugunYil, bugunAy, bugunGun] = isoBugun.split('-');
const todayStr = `${bugunGun}.${bugunAy}.${bugunYil}`;
const bugunMu = (v) => !!v && (String(v).startsWith(isoBugun) || String(v).slice(0, 10) === todayStr);
const todayTenders = tenders.filter(t =>
bugunMu(t.ilanTarihi) || (!t.ilanTarihi && ((t.eklenmeZamani || '').includes('az') || (t.eklenmeZamani || '').includes('saat')))
bugunEklendi(t) || (!t.ilanTarihi && ((t.eklenmeZamani || '').includes('az') || (t.eklenmeZamani || '').includes('saat')))
);
return (