Álvaro Valenzuela Valdes commited on
Commit
eaf5970
·
1 Parent(s): 437783a

fix: implement portfolio functionality with clickable star icon

Browse files
frontend/components/TenderSearch.tsx CHANGED
@@ -159,6 +159,7 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
159
  <table className="w-full text-left text-sm table-fixed">
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-[100px]">ID</th>
163
  <th className="px-6 py-5 w-[300px]">Opportunity</th>
164
  <th className="px-6 py-5 w-[200px]">Buyer</th>
@@ -168,6 +169,17 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
168
  <tbody className="divide-y divide-white/5">
169
  {filteredTenders.map((item) => (
170
  <tr key={item.code} className="hover:bg-white/[0.04] transition-colors group cursor-pointer" onClick={() => setSelectedTenderForModal(item)}>
 
 
 
 
 
 
 
 
 
 
 
171
  <td className="px-6 py-5 font-mono text-purple-400 text-[10px]">{item.code}</td>
172
  <td className="px-6 py-5"><div className="font-bold text-white truncate text-xs">{item.name}</div></td>
173
  <td className="px-6 py-5 text-slate-400 text-[11px] truncate">{item.buyer}</td>
 
159
  <table className="w-full text-left text-sm table-fixed">
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-[100px]">ID</th>
164
  <th className="px-6 py-5 w-[300px]">Opportunity</th>
165
  <th className="px-6 py-5 w-[200px]">Buyer</th>
 
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 cursor-pointer" onClick={() => setSelectedTenderForModal(item)}>
172
+ <td className="px-4 py-5 text-center">
173
+ <button
174
+ onClick={(e) => {
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.5)]' : 'text-white/10 hover:text-white/30'}`}
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"><div className="font-bold text-white truncate text-xs">{item.name}</div></td>
185
  <td className="px-6 py-5 text-slate-400 text-[11px] truncate">{item.buyer}</td>