Add complete ScoutIQ system: Crawler (RSS+AI), CRUD Controllers (Organizations, Contacts, Opportunities, Sources), dynamic Views, API routes, CLI collector
This commit is contained in:
115
resources/views/admin/organizations/index.php
Normal file
115
resources/views/admin/organizations/index.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<div class="page-header">
|
||||
<div>
|
||||
<h1>Organizations</h1>
|
||||
<p>Manage VCs, accelerators, incubators and investors</p>
|
||||
</div>
|
||||
<a href="/admin/organizations/create" class="btn btn-primary">+ Add Organization</a>
|
||||
</div>
|
||||
|
||||
<?php if ($flashSuccess = $this->session->getFlash('success')): ?>
|
||||
<div class="alert alert-success"><span><?= $this->escape($flashSuccess) ?></span></div>
|
||||
<?php endif; ?>
|
||||
<?php if ($flashError = $this->session->getFlash('error')): ?>
|
||||
<div class="alert alert-error"><span><?= $this->escape($flashError) ?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- Filters -->
|
||||
<div class="filters-bar">
|
||||
<form method="GET" class="filters-form">
|
||||
<input type="text" name="search" class="form-control" placeholder="Search organizations..." value="<?= $this->escape($search) ?>">
|
||||
<select name="type" class="form-control">
|
||||
<option value="">All Types</option>
|
||||
<?php foreach ($types as $t): ?>
|
||||
<option value="<?= $t ?>" <?= $type === $t ? 'selected' : '' ?>><?= ucfirst($t) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-secondary">Filter</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Stats Summary -->
|
||||
<div class="metrics-grid" style="margin-bottom: 20px;">
|
||||
<div class="glass-panel metric-card">
|
||||
<span class="metric-title">Total Organizations</span>
|
||||
<span class="metric-value"><?= $total ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Table -->
|
||||
<div class="glass-panel" style="overflow-x: auto;">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th>Country</th>
|
||||
<th>CRM Status</th>
|
||||
<th>Opportunities</th>
|
||||
<th>Updated</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($organizations)): ?>
|
||||
<tr><td colspan="7" style="text-align: center; padding: 40px; color: var(--text-muted);">No organizations found. Run the collector or add one manually.</td></tr>
|
||||
<?php else: ?>
|
||||
<?php foreach ($organizations as $org): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/admin/organizations/<?= $org['id'] ?>" style="font-weight: 600;">
|
||||
<?= $this->escape($org['name']) ?>
|
||||
</a>
|
||||
<?php if ($org['domain']): ?>
|
||||
<br><small style="color: var(--text-muted);"><?= $this->escape($org['domain']) ?></small>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><span class="badge badge-<?= $org['type'] ?>"><?= $this->escape($org['type']) ?></span></td>
|
||||
<td><?= $this->escape($org['country'] ?? '-') ?></td>
|
||||
<td><span class="badge badge-status-<?= strtolower(str_replace(' ', '-', $org['crm_status'])) ?>"><?= $this->escape($org['crm_status']) ?></span></td>
|
||||
<td><?= $org['opportunities_count'] ?? 0 ?></td>
|
||||
<td><?= date('M j', strtotime($org['updated_at'])) ?></td>
|
||||
<td>
|
||||
<a href="/admin/organizations/<?= $org['id'] ?>" class="btn btn-sm btn-secondary">View</a>
|
||||
<a href="/admin/organizations/<?= $org['id'] ?>/edit" class="btn btn-sm btn-secondary">Edit</a>
|
||||
<a href="/admin/contacts/create?organization_id=<?= $org['id'] ?>" class="btn btn-sm btn-secondary">+ Contact</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Pagination -->
|
||||
<?php if ($total > $perPage): ?>
|
||||
<div class="pagination">
|
||||
<?php for ($i = 1; $i <= ceil($total / $perPage); $i++): ?>
|
||||
<a href="?page=<?= $i ?>&type=<?= $type ?>&search=<?= urlencode($search) ?>" class="btn btn-sm <?= $i === $page ? 'btn-primary' : 'btn-secondary' ?>"><?= $i ?></a>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
|
||||
.filters-bar { margin-bottom: 20px; }
|
||||
.filters-form { display: flex; gap: 12px; flex-wrap: wrap; }
|
||||
.filters-form .form-control { min-width: 200px; }
|
||||
.data-table { width: 100%; border-collapse: collapse; }
|
||||
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
|
||||
.data-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 600; }
|
||||
.data-table tr:hover { background: rgba(255,255,255,0.02); }
|
||||
.badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.78rem; font-weight: 600; }
|
||||
.badge-vc { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
|
||||
.badge-angel { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
|
||||
.badge-accelerator { background: rgba(52, 211, 153, 0.2); color: #34d399; }
|
||||
.badge-incubator { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
|
||||
.badge-venture_studio { background: rgba(248, 113, 113, 0.2); color: #f87171; }
|
||||
.badge-partner { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
|
||||
.badge-status-new { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
|
||||
.badge-status-researching { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }
|
||||
.badge-status-contacted { background: rgba(52, 211, 153, 0.2); color: #34d399; }
|
||||
.badge-status-invested { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
|
||||
.badge-status-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
|
||||
.pagination { display: flex; gap: 8px; margin-top: 20px; justify-content: center; }
|
||||
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user