Add saved bid preparation overview with actionable missing checks
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { bidFirmFields as ALANLAR } from '../services/bidFirmFields';
|
||||
import { preparationAnalysisSource, preparationConditionSections, conditionText } from '../services/preparationAnalysis';
|
||||
import { preparationDeadlineProblem } from '../services/preparationDeadline';
|
||||
import { bidValidityForForm, bidTypeForForm } from '../services/bidTerms';
|
||||
@@ -29,23 +30,13 @@ import {
|
||||
* Firma bilgileri localStorage'da tutulur — her ihalede yeniden sorulmasın.
|
||||
*/
|
||||
|
||||
const ALANLAR = [
|
||||
{ k: 'firmaUnvan', l: 'Firma ticaret unvanı', zorunlu: true, genis: true },
|
||||
{ k: 'adres', l: 'Tebligata esas adres', zorunlu: true, genis: true },
|
||||
{ k: 'vergiDairesi', l: 'Vergi dairesi', zorunlu: true },
|
||||
{ k: 'vergiNo', l: 'Vergi numarası', zorunlu: true },
|
||||
{ k: 'sicilNo', l: 'Ticaret sicil / MERSİS no', zorunlu: false },
|
||||
{ k: 'yetkiliAd', l: 'Yetkili ad soyad', zorunlu: true },
|
||||
{ k: 'yetkiliGorev', l: 'Yetkilinin görevi', zorunlu: true, ph: 'Örn. Genel Müdür' },
|
||||
{ k: 'telefon', l: 'Telefon', zorunlu: true },
|
||||
{ k: 'eposta', l: 'E-posta', zorunlu: true },
|
||||
];
|
||||
|
||||
|
||||
const FIRMA_ANAHTAR = 'ihaleist_firma_bilgi';
|
||||
|
||||
const bosFirma = () => Object.fromEntries(ALANLAR.map((a) => [a.k, '']));
|
||||
|
||||
export const BidPackageBuilder = ({ results, tender: selectedTender }) => {
|
||||
export const BidPackageBuilder = ({ results, tender: selectedTender, initialFocus }) => {
|
||||
const { userProfile, mutateTender, savingCount, authUser, tenders } = useApp();
|
||||
const tender = {...selectedTender, ...tenders.find(t => t.id === selectedTender?.id)};
|
||||
const storedDraft = tender?.bidDraft || {};
|
||||
@@ -67,6 +58,11 @@ export const BidPackageBuilder = ({ results, tender: selectedTender }) => {
|
||||
target.scrollIntoView({block:'center'});
|
||||
target.focus({preventScroll:true});
|
||||
};
|
||||
useEffect(()=>{
|
||||
if(!initialFocus)return;
|
||||
const frame=requestAnimationFrame(()=>goToMissing(initialFocus));
|
||||
return ()=>cancelAnimationFrame(frame);
|
||||
},[initialFocus]);
|
||||
const [dirty, setDirty] = useState(false);
|
||||
const [acik, setAcik] = useState(true);
|
||||
const [hata, setHata] = useState(null);
|
||||
|
||||
Reference in New Issue
Block a user