Álvaro Valenzuela Valdes commited on
Commit ·
2fc224f
1
Parent(s): eaf5970
fix: decouple portfolio toggle from row click and add explicit view button
Browse files
frontend/components/TenderSearch.tsx
CHANGED
|
@@ -160,32 +160,44 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
|
|
| 160 |
<thead className="bg-white/5 text-slate-500 uppercase text-[10px] font-bold border-b border-white/5">
|
| 161 |
<tr>
|
| 162 |
<th className="px-6 py-5 w-[60px] text-center"></th>
|
| 163 |
-
<th className="px-6 py-5 w-[
|
| 164 |
-
<th className="px-6 py-5
|
| 165 |
<th className="px-6 py-5 w-[200px]">Buyer</th>
|
| 166 |
<th className="px-6 py-5 text-center w-[120px]">Status</th>
|
|
|
|
| 167 |
</tr>
|
| 168 |
</thead>
|
| 169 |
<tbody className="divide-y divide-white/5">
|
| 170 |
{filteredTenders.map((item) => (
|
| 171 |
-
<tr key={item.code} className="hover:bg-white/[0.04] transition-colors group
|
| 172 |
<td className="px-4 py-5 text-center">
|
| 173 |
<button
|
| 174 |
-
|
| 175 |
e.stopPropagation();
|
|
|
|
| 176 |
toggleFollow(item);
|
| 177 |
}}
|
| 178 |
-
className={`text-xl transition-all hover:scale-125 active:scale-90 ${followedCodes.includes(item.code) ? 'text-amber-400 drop-shadow-[0_0_10px_rgba(251,191,36,0.
|
| 179 |
>
|
| 180 |
{followedCodes.includes(item.code) ? "★" : "☆"}
|
| 181 |
</button>
|
| 182 |
</td>
|
| 183 |
<td className="px-6 py-5 font-mono text-purple-400 text-[10px]">{item.code}</td>
|
| 184 |
-
<td className="px-6 py-5">
|
|
|
|
|
|
|
| 185 |
<td className="px-6 py-5 text-slate-400 text-[11px] truncate">{item.buyer}</td>
|
| 186 |
<td className="px-6 py-5 text-center">
|
| 187 |
<span className={`inline-block rounded-full px-3 py-1 text-[9px] font-black uppercase ${item.status.toLowerCase().includes('publicada') ? 'bg-green-500/10 text-green-400' : 'bg-slate-800 text-slate-500'}`}>{item.status}</span>
|
| 188 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
</tr>
|
| 190 |
))}
|
| 191 |
</tbody>
|
|
|
|
| 160 |
<thead className="bg-white/5 text-slate-500 uppercase text-[10px] font-bold border-b border-white/5">
|
| 161 |
<tr>
|
| 162 |
<th className="px-6 py-5 w-[60px] text-center"></th>
|
| 163 |
+
<th className="px-6 py-5 w-[120px]">ID</th>
|
| 164 |
+
<th className="px-6 py-5">Opportunity</th>
|
| 165 |
<th className="px-6 py-5 w-[200px]">Buyer</th>
|
| 166 |
<th className="px-6 py-5 text-center w-[120px]">Status</th>
|
| 167 |
+
<th className="px-6 py-5 w-[100px] text-center">Action</th>
|
| 168 |
</tr>
|
| 169 |
</thead>
|
| 170 |
<tbody className="divide-y divide-white/5">
|
| 171 |
{filteredTenders.map((item) => (
|
| 172 |
+
<tr key={item.code} className="hover:bg-white/[0.04] transition-colors group">
|
| 173 |
<td className="px-4 py-5 text-center">
|
| 174 |
<button
|
| 175 |
+
onPointerDown={(e) => {
|
| 176 |
e.stopPropagation();
|
| 177 |
+
console.log("[Portfolio] Toggling follow for:", item.code);
|
| 178 |
toggleFollow(item);
|
| 179 |
}}
|
| 180 |
+
className={`text-xl transition-all hover:scale-125 active:scale-90 p-2 cursor-pointer relative z-50 ${followedCodes.includes(item.code) ? 'text-amber-400 drop-shadow-[0_0_10px_rgba(251,191,36,0.6)]' : 'text-white/30 hover:text-white/60'}`}
|
| 181 |
>
|
| 182 |
{followedCodes.includes(item.code) ? "★" : "☆"}
|
| 183 |
</button>
|
| 184 |
</td>
|
| 185 |
<td className="px-6 py-5 font-mono text-purple-400 text-[10px]">{item.code}</td>
|
| 186 |
+
<td className="px-6 py-5">
|
| 187 |
+
<div className="font-bold text-white truncate text-xs max-w-[400px]" title={item.name}>{item.name}</div>
|
| 188 |
+
</td>
|
| 189 |
<td className="px-6 py-5 text-slate-400 text-[11px] truncate">{item.buyer}</td>
|
| 190 |
<td className="px-6 py-5 text-center">
|
| 191 |
<span className={`inline-block rounded-full px-3 py-1 text-[9px] font-black uppercase ${item.status.toLowerCase().includes('publicada') ? 'bg-green-500/10 text-green-400' : 'bg-slate-800 text-slate-500'}`}>{item.status}</span>
|
| 192 |
</td>
|
| 193 |
+
<td className="px-6 py-5 text-center">
|
| 194 |
+
<button
|
| 195 |
+
onClick={() => setSelectedTenderForModal(item)}
|
| 196 |
+
className="px-4 py-2 rounded-xl bg-purple-500/10 border border-purple-500/20 text-[10px] font-black text-purple-400 hover:bg-purple-500 hover:text-white transition-all uppercase tracking-widest"
|
| 197 |
+
>
|
| 198 |
+
View
|
| 199 |
+
</button>
|
| 200 |
+
</td>
|
| 201 |
</tr>
|
| 202 |
))}
|
| 203 |
</tbody>
|