feat: İhaleist - Akıllı İhale Takip ve Analiz Platformu (Full PRD + 7 Enterprise Modül)

This commit is contained in:
2026-08-07 16:30:24 +03:00
commit ece74feefe
35 changed files with 7820 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
import React from 'react';
import { useApp } from '../context/AppContext';
import { Layers, CalendarPlus, Star, BellRing, EyeOff } from 'lucide-react';
export const SummaryCards = () => {
const { tenders, quickFilter, setQuickFilter, setActiveTab } = useApp();
const activeCount = tenders.filter(t => t.durum === 'Aktif').length;
const todayCount = tenders.filter(t => t.eklenmeZamani.includes('önce') || t.eklenmeZamani.includes('az')).length;
const trackedCount = tenders.filter(t => t.takipte).length;
const sinceLastLoginCount = 14; // Mocked counter
const unreadCount = tenders.filter(t => !t.incelendi).length;
const cards = [
{
id: 'all',
label: 'AKTİF İHALELER',
count: activeCount,
icon: Layers,
color: 'blue'
},
{
id: 'bugun_eklenenler',
label: 'BUGÜN EKLENENLER',
count: todayCount,
icon: CalendarPlus,
color: 'emerald'
},
{
id: 'takiptekiler',
label: 'TAKİP ETTİKLERİM',
count: trackedCount,
icon: Star,
color: 'amber'
},
{
id: 'son_giris',
label: 'SON GİRİŞTEN BERİ',
count: sinceLastLoginCount,
icon: BellRing,
color: 'purple'
},
{
id: 'incelenmedi',
label: 'İNCELENMEMİŞ',
count: unreadCount,
icon: EyeOff,
color: 'rose'
}
];
return (
<div className="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3.5 my-4">
{cards.map(card => {
const Icon = card.icon;
const isSelected = quickFilter === card.id;
return (
<div
key={card.id}
onClick={() => {
setQuickFilter(card.id);
setActiveTab('list');
}}
className={`bg-white rounded-xl p-4 border transition-all cursor-pointer select-none shadow-xs flex items-center justify-between group hover:shadow-md ${
isSelected
? 'border-blue-600 ring-2 ring-blue-500/20 bg-blue-50/20'
: 'border-slate-200 hover:border-slate-300'
}`}
>
<div>
<p className="text-[11px] font-bold tracking-wider text-slate-500 uppercase">{card.label}</p>
<p className="text-2xl font-black text-slate-900 mt-1">{card.count}</p>
</div>
<div className={`w-11 h-11 rounded-xl flex items-center justify-center transition-transform group-hover:scale-105 ${
card.color === 'blue' ? 'bg-blue-100 text-blue-600' :
card.color === 'emerald' ? 'bg-emerald-100 text-emerald-600' :
card.color === 'amber' ? 'bg-amber-100 text-amber-600' :
card.color === 'purple' ? 'bg-purple-100 text-purple-600' :
'bg-rose-100 text-rose-600'
}`}>
<Icon className="w-5 h-5" />
</div>
</div>
);
})}
</div>
);
};