fix: block ready bid exports once a winner is published

This commit is contained in:
2026-09-06 14:57:53 +03:00
parent 2353170c40
commit 528933aa1b
5 changed files with 28 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ export function bidSourceSnapshot(tender, results, rows = sourceRows(tender, res
announcement: tender?.aciklama || '',
deadline: [tender?.tarih || '', tender?.saat || ''],
status: tender?.durum || '',
...(tender?.kazananFirma ? {winner:tender.kazananFirma} : {}),
documentVersion: results?.documentVersion ?? tender?.documentVersion ?? null,
procurementTerms: results?.procurementTerms || null,
analysis: preparationAnalysisSource(results),
+1
View File
@@ -2,6 +2,7 @@ import {deadlineInfo} from './tenderCalendar.js';
/** Preparation may be saved, but a current bid needs a verified future deadline. */
export function preparationDeadlineProblem(tender, now = new Date()) {
if(tender?.kazananFirma)return 'İhalenin kazananı açıklanmış. Hazır teklif çıktısı oluşturulamaz; taslağınızı kaydedebilirsiniz.';
const status=String(tender?.durum || '').toLocaleLowerCase('tr-TR');
if (/iptal|sonuçlandı|sözleşme imzalandı/.test(status))
return 'İhale iptal edilmiş veya sonuçlanmış. Hazır teklif çıktısı oluşturulamaz; taslağınızı kaydedebilirsiniz.';