fix: separate private company documents from shared tender item imports

This commit is contained in:
2026-09-06 09:30:37 +03:00
parent 5e9f17969c
commit ece623d86c
8 changed files with 52 additions and 14 deletions
+3 -3
View File
@@ -64,13 +64,13 @@ export const DocumentVault = () => {
metin = (await extractText(f)).text;
ikn = iknCikar(metin);
}
const cevap = await uploadDocument(f, 'İhale Dokümanı', ikn, { otoIkn: true });
const cevap = await uploadDocument(f, 'İhale Dokümanı', ikn, { otoIkn: true, documentType:'ihale' });
ikn = cevap?.ikn || ikn;
let kalem = cevap?.kalem?.sayi || null;
if (ikn && !kalem && metin) {
try {
const { kalemCikar } = await import('../../services/kalem');
kalem = (await kalemCikar({ ikn, metin, dosya: f.name })).sayi || null;
kalem = (await kalemCikar({ ikn, metin, dosya: f.name, documentId:cevap.id })).sayi || null;
} catch { /* kalem çıkmazsa yükleme yine başarılı */ }
}
guncelle(i, { durum: 'tamam', ikn, kalem });
@@ -250,7 +250,7 @@ export const DocumentVault = () => {
<div className="min-w-0">
<p className="text-xs font-bold text-slate-900 truncate">{d.ad}</p>
<p className="text-[11px] text-slate-500 mt-0.5">
{d.kategori || 'Diğer'} · <strong>{formatBayt(d.boyut)}</strong>
{d.tur === 'ihale' ? 'İhale dokümanı' : 'Özel firma belgesi'} · {d.kategori || 'Diğer'} · <strong>{formatBayt(d.boyut)}</strong>
</p>
<p className="text-[10px] text-slate-400 mt-0.5">
{new Date(d.olusturma).toLocaleString('tr-TR')}