Spaces:
Build error
Build error
Álvaro Valenzuela Valdes commited on
Commit ·
e1d119c
1
Parent(s): 81b5c96
style: Final layout polish, independent profile seeding, and detail view optimization
Browse files- backend/app/main.py +3 -1
- frontend/app/page.tsx +1 -1
- frontend/components/TenderSearch.tsx +22 -15
backend/app/main.py
CHANGED
|
@@ -43,8 +43,9 @@ async def startup_event():
|
|
| 43 |
print(f"Current tender count: {count}")
|
| 44 |
if count == 0:
|
| 45 |
print("Auto-seeding database...")
|
| 46 |
-
# Basic Company Profile
|
| 47 |
if not db.query(CompanyProfileModel).first():
|
|
|
|
| 48 |
db.add(CompanyProfileModel(
|
| 49 |
name="Andes Digital Solutions",
|
| 50 |
industry="Software Engineering",
|
|
@@ -53,6 +54,7 @@ async def startup_event():
|
|
| 53 |
regions="Nacional",
|
| 54 |
documents_available="RUT, Portfolio"
|
| 55 |
))
|
|
|
|
| 56 |
|
| 57 |
# Software Tenders
|
| 58 |
tenders_to_add = [
|
|
|
|
| 43 |
print(f"Current tender count: {count}")
|
| 44 |
if count == 0:
|
| 45 |
print("Auto-seeding database...")
|
| 46 |
+
# Basic Company Profile - Independent check
|
| 47 |
if not db.query(CompanyProfileModel).first():
|
| 48 |
+
print("Seeding Company Profile...")
|
| 49 |
db.add(CompanyProfileModel(
|
| 50 |
name="Andes Digital Solutions",
|
| 51 |
industry="Software Engineering",
|
|
|
|
| 54 |
regions="Nacional",
|
| 55 |
documents_available="RUT, Portfolio"
|
| 56 |
))
|
| 57 |
+
db.commit()
|
| 58 |
|
| 59 |
# Software Tenders
|
| 60 |
tenders_to_add = [
|
frontend/app/page.tsx
CHANGED
|
@@ -146,7 +146,7 @@ export default function HomePage() {
|
|
| 146 |
</button>
|
| 147 |
</div>
|
| 148 |
|
| 149 |
-
<div className="flex flex-col md:flex-row min-h-screen gap-
|
| 150 |
{/* Sidebar Container */}
|
| 151 |
<div className={`${isMobileMenuOpen ? "fixed inset-0 z-[60] flex" : "hidden"} md:block md:w-72 md:shrink-0 md:sticky md:top-8 md:h-[calc(100vh-4rem)]`}>
|
| 152 |
{isMobileMenuOpen && (
|
|
|
|
| 146 |
</button>
|
| 147 |
</div>
|
| 148 |
|
| 149 |
+
<div className="flex flex-col md:flex-row min-h-screen gap-8 p-6 md:p-10">
|
| 150 |
{/* Sidebar Container */}
|
| 151 |
<div className={`${isMobileMenuOpen ? "fixed inset-0 z-[60] flex" : "hidden"} md:block md:w-72 md:shrink-0 md:sticky md:top-8 md:h-[calc(100vh-4rem)]`}>
|
| 152 |
{isMobileMenuOpen && (
|
frontend/components/TenderSearch.tsx
CHANGED
|
@@ -232,29 +232,36 @@ export default function TenderSearch({ tenders, onSearch, onAnalyze, forceShowFo
|
|
| 232 |
</tr>
|
| 233 |
{expandedTenderCodes.includes(tender.code) && (
|
| 234 |
<tr className="bg-white/[0.01] animate-in fade-in duration-500">
|
| 235 |
-
<td colSpan={6} className="px-
|
| 236 |
-
<div className="grid gap-
|
| 237 |
-
<div className="space-y-
|
| 238 |
<div>
|
| 239 |
-
<h4 className="text-[10px] font-
|
| 240 |
-
|
|
|
|
|
|
|
|
|
|
| 241 |
</div>
|
| 242 |
-
<div className="grid grid-cols-2 gap-
|
| 243 |
-
<div className="p-
|
| 244 |
-
<div className="text-[9px] uppercase text-slate-500 font-
|
| 245 |
-
<div className="text-
|
| 246 |
{tender.estimated_amount ? new Intl.NumberFormat("es-CL", { style: "currency", currency: "CLP" }).format(tender.estimated_amount) : "Not Disclosed"}
|
| 247 |
</div>
|
| 248 |
</div>
|
| 249 |
-
<div className="p-
|
| 250 |
-
<div className="text-[9px] uppercase text-slate-500 font-
|
| 251 |
-
<div className="text-
|
| 252 |
</div>
|
| 253 |
</div>
|
| 254 |
</div>
|
| 255 |
-
<div className="space-y-
|
| 256 |
-
<
|
| 257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
{tender.attachments?.map((att, i) => (
|
| 259 |
<a key={i} href={att.url} target="_blank" className="flex items-center justify-between p-4 rounded-2xl bg-white/[0.03] hover:bg-white/[0.08] border border-white/5 transition-all group/file">
|
| 260 |
<div className="flex items-center gap-4">
|
|
|
|
| 232 |
</tr>
|
| 233 |
{expandedTenderCodes.includes(tender.code) && (
|
| 234 |
<tr className="bg-white/[0.01] animate-in fade-in duration-500">
|
| 235 |
+
<td colSpan={6} className="px-8 md:px-12 py-10">
|
| 236 |
+
<div className="grid gap-10 lg:grid-cols-5 items-start">
|
| 237 |
+
<div className="lg:col-span-3 space-y-8">
|
| 238 |
<div>
|
| 239 |
+
<h4 className="text-[10px] font-black uppercase tracking-[0.2em] text-purple-400 mb-4 flex items-center gap-2">
|
| 240 |
+
<span className="w-4 h-[1px] bg-purple-500/50" />
|
| 241 |
+
Project Description
|
| 242 |
+
</h4>
|
| 243 |
+
<p className="text-slate-300 leading-relaxed text-sm bg-white/[0.02] p-5 rounded-2xl border border-white/5">{tender.description}</p>
|
| 244 |
</div>
|
| 245 |
+
<div className="grid grid-cols-2 gap-6">
|
| 246 |
+
<div className="p-5 rounded-2xl bg-white/[0.03] border border-white/5 shadow-inner">
|
| 247 |
+
<div className="text-[9px] uppercase text-slate-500 font-black mb-1">Estimated Amount</div>
|
| 248 |
+
<div className="text-sm text-white font-bold">
|
| 249 |
{tender.estimated_amount ? new Intl.NumberFormat("es-CL", { style: "currency", currency: "CLP" }).format(tender.estimated_amount) : "Not Disclosed"}
|
| 250 |
</div>
|
| 251 |
</div>
|
| 252 |
+
<div className="p-5 rounded-2xl bg-white/[0.03] border border-white/5 shadow-inner">
|
| 253 |
+
<div className="text-[9px] uppercase text-slate-500 font-black mb-1">Market Sector</div>
|
| 254 |
+
<div className="text-sm text-white font-bold">{tender.sector || "General"}</div>
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
</div>
|
| 258 |
+
<div className="lg:col-span-2 space-y-8">
|
| 259 |
+
<div>
|
| 260 |
+
<h4 className="text-[10px] font-black uppercase tracking-[0.2em] text-purple-400 mb-4 flex items-center gap-2">
|
| 261 |
+
<span className="w-4 h-[1px] bg-purple-500/50" />
|
| 262 |
+
Resources & Direct Links
|
| 263 |
+
</h4>
|
| 264 |
+
<div className="grid gap-3">
|
| 265 |
{tender.attachments?.map((att, i) => (
|
| 266 |
<a key={i} href={att.url} target="_blank" className="flex items-center justify-between p-4 rounded-2xl bg-white/[0.03] hover:bg-white/[0.08] border border-white/5 transition-all group/file">
|
| 267 |
<div className="flex items-center gap-4">
|