import React, {useState} from 'react'; import {HEALTH_CHECKS, documentKey, documentRevision, documentScopeProblem} from '../services/preparationChecks'; const fieldClass = 'w-full border border-slate-300 rounded-lg p-2 text-xs bg-white'; const Status = ({value, onChange, optional = true}) => ; export function PreparationChecks({rows, documents, manualDocuments, setManualDocuments, checks, setChecks, vault, refreshVault, downloadFile}) { const eligibleFiles = vault.documents.filter(file => !documentScopeProblem(file,vault.tenderIkn)); const [name,setName] = useState(''); const [clause,setClause] = useState(''); const updateDocument = (key, patch) => setChecks(old => ({...old,documents:{...old.documents,[key]:{...old.documents?.[key],...patch}}})); const updateProduct = (key, patch) => setChecks(old => ({...old,products:{...old.products,[key]:{...old.products?.[key],...patch}}})); return
Belge ve ürün uygunluğu

Her kontrol için belge adı/sürümü ve kaynak maddeyi yazın. ÜTS, numune ve servis koşulları her ihalede zorunlu değildir; uygulanmıyorsa gerekçesini belirtin. Bu kayıtlar kullanıcı kontrolüdür; resmi uygunluk onayı değildir.

Firma belgelerini veya bu İKN için yüklenmiş ihale dokümanlarını ilgili gereksinime bağlayın. Başka ihale dokümanları seçilemez.

{vault.loading &&

Belge deposu yükleniyor…

} {vault.error &&

Belge deposu yüklenemedi: {vault.error}

} {documents.map(d => { const key = documentKey(d), c = checks.documents?.[key] || {}; return
{d.document} {d.mandatory === false ? '(isteğe bağlı)' : '(zorunlu)'}

{d.note}

{manualDocuments.some(item => documentKey(item) === key) && } {vault.documents.some(f=>f.id===c.documentId) && } updateDocument(key,{status})}/>
; })}

Resmi dokümandan eksik belge gereksinimi ekle

{rows.map(row => { const c=checks.products?.[row.priceKey] || {}; return
{row.name} — ürün/hizmet ve yükümlülük kontrolü
{HEALTH_CHECKS.map(([key,label])=>
{label} updateProduct(row.priceKey,{[key]:{...c[key],status}})}/>
)}
; })}
; }