guard calendar links when source time is missing
This commit is contained in:
@@ -140,8 +140,9 @@ const ui=await createServer({server:{host:'127.0.0.1',port:0,proxy:{'/api':{targ
|
||||
</script></body></html>`;
|
||||
res.setHeader('Content-Type','text/html; charset=utf-8');res.end(await server.transformIndexHtml('/qa-overview-frame',html));return;
|
||||
}
|
||||
if(req.url==='/qa-calendar-links'){
|
||||
const calendarTender={...tenders[0],ikn:'2026/1582991',tarih:'10.09.2026',saat:'10:00',baslik:'QA Giresun mikroskop',kurum:'Giresun TEST KURUMU',ihaleYeri:'QA toplantı salonu'};
|
||||
if(req.url==='/qa-calendar-links'||req.url?.startsWith('/qa-calendar-links?')){
|
||||
const missingTime=new URL(req.url,'http://localhost').searchParams.has('missing');
|
||||
const calendarTender={...tenders[0],id:missingTime?'qa-calendar-missing':'qa-calendar-valid',ikn:'2026/1582991',tarih:'10.09.2026',saat:missingTime?'':'10:00',aciklama:missingTime?'':'Kaynak tarihi doğrulama',baslik:'QA Giresun mikroskop',kurum:'Giresun TEST KURUMU',ihaleYeri:'QA toplantı salonu'};
|
||||
const html=`<html lang="tr"><head><meta name="viewport" content="width=device-width,initial-scale=1"></head><body><div id="root"></div><script type="module">
|
||||
import React from '/node_modules/.vite/deps/react.js';
|
||||
import ReactDOM from '/node_modules/.vite/deps/react-dom_client.js';
|
||||
@@ -152,7 +153,7 @@ const ui=await createServer({server:{host:'127.0.0.1',port:0,proxy:{'/api':{targ
|
||||
function Probe(){const {setActiveTenderDetail,authUser}=useApp();React.useEffect(()=>{if(!authUser?.email)return;const timer=setTimeout(()=>setActiveTenderDetail(selected),0);return()=>clearTimeout(timer);},[authUser?.email]);return React.createElement(TenderDetailModal);}
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(React.createElement(AppProvider,{},React.createElement(Probe)));
|
||||
</script></body></html>`;
|
||||
res.setHeader('Content-Type','text/html; charset=utf-8');res.end(await server.transformIndexHtml('/qa-calendar-links',html));return;
|
||||
res.setHeader('Content-Type','text/html; charset=utf-8');res.end(await server.transformIndexHtml(missingTime?'/qa-calendar-links-missing':'/qa-calendar-links',html));return;
|
||||
}
|
||||
if(req.url==='/qa-source-update'||req.url==='/qa-source-update?ready=1'||req.url==='/qa-source-update?ready=1&file=1') {
|
||||
const query=new URL(req.url,'http://localhost').searchParams;
|
||||
|
||||
Reference in New Issue
Block a user