From 620c82043ffee6d0778ebc84ee1925dbf8fe1ea3 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sat, 28 Feb 2026 20:44:35 +0000 Subject: [PATCH] v40 --- seed_data.php | 28 ++++++++++++++++++++-------- startup_details.php | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 17 deletions(-) diff --git a/seed_data.php b/seed_data.php index 26d8b40..5e725b9 100644 --- a/seed_data.php +++ b/seed_data.php @@ -9,11 +9,24 @@ function hash_pass($p) { // Clear existing data to avoid conflicts during re-seed $db->exec("SET FOREIGN_KEY_CHECKS = 0"); -$db->exec("TRUNCATE TABLE messages"); -$db->exec("TRUNCATE TABLE startup_followers"); -$db->exec("TRUNCATE TABLE funding_rounds"); -$db->exec("TRUNCATE TABLE startups"); -$db->exec("TRUNCATE TABLE users"); +$tables = [ + 'ai_chats', + 'blocked_users', + 'faqs', + 'funding_rounds', + 'investments', + 'matches', + 'messages', + 'notifications', + 'startup_followers', + 'startup_updates', + 'startups', + 'swipes', + 'users' +]; +foreach ($tables as $table) { + $db->exec("TRUNCATE TABLE $table"); +} $db->exec("SET FOREIGN_KEY_CHECKS = 1"); $founders = [ @@ -158,8 +171,7 @@ $stmt_startup = $db->prepare("INSERT INTO startups ( :cofounder_equity_pct, :cofounder_equity_type, :cofounder_responsibilities, :desired_cofounder_experience, :cofounder_commitment, :other_partnership_details, :current_cash_balance, :burn_rate, :outstanding_debt, :accounts_receivable_payable, 'assets/docs/financials/placeholder.pdf', 'assets/docs/financials/placeholder.pdf', 'assets/docs/financials/placeholder.pdf', 'assets/docs/financials/placeholder.pdf', 'assets/docs/financials/placeholder.pdf', 'assets/docs/financials/placeholder.pdf', - :recommended_return_rate, :founder_return_rate -)"); + :recommended_return_rate, :founder_return_rate"); $stmt_round = $db->prepare("INSERT INTO funding_rounds (startup_id, funding_goal, status) VALUES (:startup_id, :funding_goal, 'Active')"); @@ -240,4 +252,4 @@ foreach ($investors as $i) { } } -echo "Done!\n"; \ No newline at end of file +echo "Done!\n"; diff --git a/startup_details.php b/startup_details.php index 6b14f29..0d706bd 100644 --- a/startup_details.php +++ b/startup_details.php @@ -44,7 +44,13 @@ if (!$isFounder && $startup['status'] === 'private' && !$isInvestor) { $canSeeHistory = $isFounder || $isInvestor; $fundingHistory = []; if ($canSeeHistory) { - $stmt = db()->prepare("SELECT i.*, u.full_name as investor_name, u.id as investor_user_id FROM investments i JOIN users u ON i.investor_id = u.id WHERE i.startup_id = ? AND i.status != 'rejected' ORDER BY i.created_at DESC"); + $stmt = db()->prepare(" + SELECT i.*, u.full_name as investor_name, u.id as investor_user_id + FROM investments i + LEFT JOIN users u ON i.investor_id = u.id + WHERE i.startup_id = ? AND i.status != 'rejected' + ORDER BY i.created_at DESC + "); $stmt->execute([$startupId]); $fundingHistory = $stmt->fetchAll(); } @@ -90,8 +96,7 @@ $progress = ($goal > 0) ? round(($raised / $goal) * 100) : 0; font-size: 20px; font-weight: 800; margin-bottom: 25px; - display: flex; - align-items: center; + display: flex; align-items: center; gap: 12px; } .data-label { @@ -347,16 +352,30 @@ $progress = ($goal > 0) ? round(($raised / $goal) * 100) : 0;
- +
- + + +
+ +
+
+
- +
- +
-
+
+ + + + + +
@@ -377,4 +396,4 @@ $progress = ($goal > 0) ? round(($raised / $goal) * 100) : 0; - + \ No newline at end of file