Add health product portfolio and explicit tender item selection
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import {HealthPortfolioEditor} from './HealthPortfolioEditor';
|
||||
import React,{useState,useEffect,useRef,useId} from 'react';
|
||||
import {useApp} from '../context/AppContext';
|
||||
import {getToken} from '../services/auth';
|
||||
@@ -24,7 +25,7 @@ function ProfileEditor(){
|
||||
const scan=e=>{e.preventDefault();void run('scan',async()=>{
|
||||
controller.current=new AbortController();
|
||||
const proposal=await scanCompanyWebsite(url,{signal:controller.current.signal});
|
||||
if(alive.current){setCaps(proposal);setMessage('Tarama önerileri alındı. Alanları kontrol edip düzenleyin; henüz profilinize kaydedilmedi.');}
|
||||
if(alive.current){setCaps(previous=>({...proposal,healthPortfolio:previous.healthPortfolio || []}));setMessage('Tarama önerileri alındı. Alanları kontrol edip düzenleyin; henüz profilinize kaydedilmedi.');}
|
||||
});};
|
||||
const save=()=>run('save',async()=>{
|
||||
await updateCompanyCapabilities(caps,{website:url,threshold});
|
||||
@@ -61,6 +62,7 @@ function ProfileEditor(){
|
||||
<ul className="space-y-2">{(caps[key] || []).map((value,index)=><li key={`${value}:${index}`} className="flex justify-between gap-2 text-sm break-words"><span>{value}</span><button type="button" aria-label={`${label}: ${value} kaldır`} onClick={()=>edit(key,caps[key].filter((_,i)=>i!==index))} className="text-red-700 shrink-0">Kaldır</button></li>)}</ul>
|
||||
</section>)}
|
||||
</fieldset>
|
||||
<HealthPortfolioEditor items={caps.healthPortfolio || []} disabled={!!busy} onChange={items=>edit('healthPortfolio',items)}/>
|
||||
<label className="block text-sm">Uyum eşiği: %{threshold}<input aria-label="Uyum eşiği" type="range" min={30} max={95} step={5} disabled={!!busy} value={threshold} onChange={e=>{setThreshold(Number(e.target.value));setMessage('Kaydedilmemiş değişiklikler var.');}} className="block w-full"/></label>
|
||||
<p className="text-xs text-slate-500">Uyum skoru terim eşleşmesi ve varsa anlamsal yakınlık girdisidir; başvuru yeterliliği değildir.</p>
|
||||
<button type="button" onClick={save} disabled={!!busy} className="bg-blue-700 text-white px-4 py-2 rounded disabled:opacity-50">Profili kaydet</button>
|
||||
|
||||
Reference in New Issue
Block a user