prevent modal buttons from implicit submit
This commit is contained in:
@@ -101,7 +101,7 @@ export const TenderDetailModal = () => {
|
||||
{savingCount > 0 && <p role="status" className="p-2 bg-blue-50">Kaydediliyor…</p>}
|
||||
{/* Top Header Controls */}
|
||||
<div className="bg-[#1f2937] text-white px-6 py-3.5 flex items-center justify-between border-b border-slate-700 shrink-0">
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={() => setActiveTenderDetail(null)}
|
||||
className="flex items-center gap-2 text-xs font-semibold text-slate-300 hover:text-white transition-colors bg-slate-800 px-3 py-1.5 rounded-lg border border-slate-700"
|
||||
>
|
||||
@@ -115,7 +115,7 @@ export const TenderDetailModal = () => {
|
||||
className="text-xs px-3 py-1.5 rounded-lg border border-slate-500 disabled:opacity-50">
|
||||
{tender.incelendi ? 'İncelendi — yeniden aç' : 'İncelendi olarak işaretle'}
|
||||
</button>
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={() => toggleTrackTender(tender.id)}
|
||||
className={`flex items-center gap-1.5 font-bold px-3 py-1.5 rounded-lg text-xs transition-colors ${
|
||||
tender.takipte ? 'bg-amber-400 text-slate-900' : 'bg-slate-700 text-white hover:bg-slate-600'
|
||||
@@ -140,7 +140,7 @@ export const TenderDetailModal = () => {
|
||||
🗂 Hazırlık Görevi Aç
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={() => setActiveTenderDetail(null)}
|
||||
aria-label="İhale detayını kapat"
|
||||
className="text-slate-400 hover:text-white p-1"
|
||||
@@ -209,7 +209,7 @@ export const TenderDetailModal = () => {
|
||||
const Icon = tab.icon;
|
||||
const isActive = activeTab === tab.id;
|
||||
return (
|
||||
<button
|
||||
<button type="button"
|
||||
key={tab.id}
|
||||
onClick={() => setActiveTab(tab.id)}
|
||||
className={`flex items-center gap-2 px-4 py-2.5 rounded-lg text-xs font-bold transition-all whitespace-nowrap ${
|
||||
@@ -394,13 +394,13 @@ export const TenderDetailModal = () => {
|
||||
{/* Downloads & Calendar */}
|
||||
<div className="bg-white p-5 rounded-xl border border-slate-200 space-y-3">
|
||||
<h4 className="font-bold text-xs uppercase tracking-wider text-slate-800">İhale Dosyaları & Takvim</h4>
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={() => setActiveTab('pdf_stamp')}
|
||||
className="w-full bg-blue-600 hover:bg-blue-500 text-white font-bold py-2.5 px-3 rounded-lg text-xs flex items-center justify-center gap-2 shadow-2xs"
|
||||
>
|
||||
<Download className="w-4 h-4" /> Teklif Dosyası Hazırla (PDF / Excel)
|
||||
</button>
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={handleExportICS}
|
||||
className="w-full bg-slate-100 hover:bg-slate-200 text-slate-700 font-bold py-2.5 px-3 rounded-lg text-xs flex items-center justify-center gap-2 border border-slate-300"
|
||||
>
|
||||
@@ -479,7 +479,7 @@ export const TenderDetailModal = () => {
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end pt-2">
|
||||
<button
|
||||
<button type="button"
|
||||
onClick={() => setIsAiSpecAnalyzerOpen(true)}
|
||||
className="bg-amber-400 hover:bg-amber-300 text-slate-950 font-black px-4 py-2.5 rounded-xl text-xs flex items-center gap-2 transition-colors shadow-md cursor-pointer"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user