make header action button types explicit
This commit is contained in:
+11
-11
@@ -106,7 +106,7 @@ export const Header = () => {
|
|||||||
<div className="ml-auto flex items-center gap-1 sm:gap-3 shrink-0">
|
<div className="ml-auto flex items-center gap-1 sm:gap-3 shrink-0">
|
||||||
|
|
||||||
{/* Real Live EKAP Mode Badge */}
|
{/* Real Live EKAP Mode Badge */}
|
||||||
<button
|
<button type="button"
|
||||||
onClick={refreshLiveEKAPData}
|
onClick={refreshLiveEKAPData}
|
||||||
disabled={isRefreshingLive}
|
disabled={isRefreshingLive}
|
||||||
className="bg-emerald-600 hover:bg-emerald-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs hidden md:hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0 disabled:opacity-50"
|
className="bg-emerald-600 hover:bg-emerald-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs hidden md:hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0 disabled:opacity-50"
|
||||||
@@ -117,7 +117,7 @@ export const Header = () => {
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* AI Şartname Analizi */}
|
{/* AI Şartname Analizi */}
|
||||||
<button
|
<button type="button"
|
||||||
onClick={() => setIsAiSpecAnalyzerOpen(true)}
|
onClick={() => setIsAiSpecAnalyzerOpen(true)}
|
||||||
className="bg-purple-600 hover:bg-purple-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
|
className="bg-purple-600 hover:bg-purple-500 text-white font-extrabold px-3 py-1.5 rounded-lg text-xs flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
|
||||||
title="Teknik şartnameyi AI ile analiz edin"
|
title="Teknik şartnameyi AI ile analiz edin"
|
||||||
@@ -127,7 +127,7 @@ export const Header = () => {
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
{/* Company Web Scanner Button */}
|
{/* Company Web Scanner Button */}
|
||||||
<button
|
<button type="button"
|
||||||
onClick={() => setIsCompanyScannerOpen(true)}
|
onClick={() => setIsCompanyScannerOpen(true)}
|
||||||
className="bg-blue-600 hover:bg-blue-500 text-white font-bold px-3 py-1.5 rounded-lg text-xs hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
|
className="bg-blue-600 hover:bg-blue-500 text-white font-bold px-3 py-1.5 rounded-lg text-xs hidden md:flex items-center gap-1.5 shadow-xs transition-colors shrink-0"
|
||||||
title="Web Sitenizi Tarayın & AI İhale Profiline İşleyin"
|
title="Web Sitenizi Tarayın & AI İhale Profiline İşleyin"
|
||||||
@@ -144,7 +144,7 @@ export const Header = () => {
|
|||||||
|
|
||||||
{/* Notifications Dropdown */}
|
{/* Notifications Dropdown */}
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<button
|
<button type="button"
|
||||||
aria-label="Bildirimler"
|
aria-label="Bildirimler"
|
||||||
onClick={() => {setShowNotifications(!showNotifications);if(!showNotifications)void refreshNotifications();}}
|
onClick={() => {setShowNotifications(!showNotifications);if(!showNotifications)void refreshNotifications();}}
|
||||||
className="relative p-2 text-slate-300 hover:text-white hover:bg-slate-700 rounded-lg transition-colors"
|
className="relative p-2 text-slate-300 hover:text-white hover:bg-slate-700 rounded-lg transition-colors"
|
||||||
@@ -159,9 +159,9 @@ export const Header = () => {
|
|||||||
<div className="absolute right-0 mt-2 w-80 bg-white text-slate-800 rounded-xl shadow-xl border border-slate-200 py-2 z-50 animate-fade-in">
|
<div className="absolute right-0 mt-2 w-80 bg-white text-slate-800 rounded-xl shadow-xl border border-slate-200 py-2 z-50 animate-fade-in">
|
||||||
<div className="px-4 py-2 border-b border-slate-100 flex items-center justify-between">
|
<div className="px-4 py-2 border-b border-slate-100 flex items-center justify-between">
|
||||||
<h4 className="font-bold text-sm">Bildirimler</h4>
|
<h4 className="font-bold text-sm">Bildirimler</h4>
|
||||||
<button disabled={notificationBusy || !notifications.some(n=>!n.read)} onClick={markNotificationsRead} className="text-xs text-blue-600 hover:underline disabled:opacity-50">Tümünü Okundu İşaretle</button>
|
<button type="button" disabled={notificationBusy || !notifications.some(n=>!n.read)} onClick={markNotificationsRead} className="text-xs text-blue-600 hover:underline disabled:opacity-50">Tümünü Okundu İşaretle</button>
|
||||||
</div>
|
</div>
|
||||||
{notificationError&&<p role="alert" className="px-3 py-2 text-xs text-red-700">{notificationError} <button className="underline" onClick={refreshNotifications}>Bildirimleri yeniden yükle</button></p>}
|
{notificationError&&<p role="alert" className="px-3 py-2 text-xs text-red-700">{notificationError} <button type="button" className="underline" onClick={refreshNotifications}>Bildirimleri yeniden yükle</button></p>}
|
||||||
{notificationBusy&&<p role="status" className="px-3 text-xs">Okundu bilgisi kaydediliyor…</p>}
|
{notificationBusy&&<p role="status" className="px-3 text-xs">Okundu bilgisi kaydediliyor…</p>}
|
||||||
<div className="max-h-64 overflow-y-auto divide-y divide-slate-100">
|
<div className="max-h-64 overflow-y-auto divide-y divide-slate-100">
|
||||||
{notifications.map(n => (
|
{notifications.map(n => (
|
||||||
@@ -180,7 +180,7 @@ export const Header = () => {
|
|||||||
|
|
||||||
{/* User Profile */}
|
{/* User Profile */}
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<button
|
<button type="button"
|
||||||
aria-label="Hesap menüsü"
|
aria-label="Hesap menüsü"
|
||||||
onClick={() => setShowUserMenu(!showUserMenu)}
|
onClick={() => setShowUserMenu(!showUserMenu)}
|
||||||
className="bg-slate-700 hover:bg-slate-600 text-white px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-2 transition-colors border border-slate-600"
|
className="bg-slate-700 hover:bg-slate-600 text-white px-3 py-1.5 rounded-lg text-xs font-semibold flex items-center gap-2 transition-colors border border-slate-600"
|
||||||
@@ -206,13 +206,13 @@ export const Header = () => {
|
|||||||
<p className="text-xs text-slate-500 truncate">{authUser?.email || userProfile.company}</p>
|
<p className="text-xs text-slate-500 truncate">{authUser?.email || userProfile.company}</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="py-1 text-xs">
|
<div className="py-1 text-xs">
|
||||||
<button
|
<button type="button"
|
||||||
onClick={() => { setShowUserMenu(false); setActiveTab('list'); }}
|
onClick={() => { setShowUserMenu(false); setActiveTab('list'); }}
|
||||||
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
||||||
>
|
>
|
||||||
<User className="w-4 h-4 text-slate-400" /> Firma Bilgileri & Üyeler
|
<User className="w-4 h-4 text-slate-400" /> Firma Bilgileri & Üyeler
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button type="button"
|
||||||
onClick={() => { setShowUserMenu(false); setActiveTab('planlar'); }}
|
onClick={() => { setShowUserMenu(false); setActiveTab('planlar'); }}
|
||||||
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
||||||
>
|
>
|
||||||
@@ -222,7 +222,7 @@ export const Header = () => {
|
|||||||
{planAdi}
|
{planAdi}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button type="button"
|
||||||
onClick={() => { setShowUserMenu(false); setActiveTab('pwa_settings'); }}
|
onClick={() => { setShowUserMenu(false); setActiveTab('pwa_settings'); }}
|
||||||
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
className="w-full text-left px-4 py-2 hover:bg-slate-50 flex items-center gap-2 text-slate-700"
|
||||||
>
|
>
|
||||||
@@ -230,7 +230,7 @@ export const Header = () => {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="border-t border-slate-100 pt-1 text-xs">
|
<div className="border-t border-slate-100 pt-1 text-xs">
|
||||||
<button
|
<button type="button"
|
||||||
onClick={handleLogout}
|
onClick={handleLogout}
|
||||||
className="w-full text-left px-4 py-2 text-red-600 hover:bg-red-50 flex items-center gap-2"
|
className="w-full text-left px-4 py-2 text-red-600 hover:bg-red-50 flex items-center gap-2"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user