fix: invalidate pending bid output when preparation changes

This commit is contained in:
2026-09-06 08:54:22 +03:00
parent 953d3b5c1e
commit 2dfd32aa9c
3 changed files with 35 additions and 10 deletions
+4 -2
View File
@@ -84,9 +84,11 @@ const STIL = `
`;
/** Belgeyi kendi penceresinde açıp yazdırma diyaloğunu tetikler. */
export function belgeYazdir(baslik, govde) {
const w = window.open('', '_blank', 'width=900,height=1000');
export function belgeYazdir(baslik, govde, existingWindow) {
const w = existingWindow || window.open('', '_blank', 'width=900,height=1000');
if (!w) throw new Error('Tarayıcı yeni pencereyi engelledi. Açılır pencere iznini verip tekrar deneyin.');
if(w.closed) throw new Error('Çıktı penceresi kapatıldı. Yeniden deneyin.');
w.document.open();
w.document.write(`<!doctype html><html lang="tr"><head><meta charset="utf-8">
<title>${kacir(baslik)}</title><style>${STIL}</style></head><body>${govde}
<div class="yazdirma" style="text-align:center;margin-top:10mm">