refactor: merge Upload CV into Candidates page with toggle button
This commit is contained in:
@@ -177,8 +177,13 @@ async function deleteCandidate(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================
|
// ============================================================
|
||||||
// UPLOAD
|
// UPLOAD (inline on Candidates page)
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
function showUploadZone() {
|
||||||
|
const area = document.getElementById('candidate-upload-area');
|
||||||
|
area.style.display = area.style.display === 'none' ? 'block' : 'none';
|
||||||
|
}
|
||||||
|
|
||||||
const uploadZone = document.getElementById('upload-zone');
|
const uploadZone = document.getElementById('upload-zone');
|
||||||
uploadZone?.addEventListener('dragover', e => { e.preventDefault(); uploadZone.classList.add('dragover'); });
|
uploadZone?.addEventListener('dragover', e => { e.preventDefault(); uploadZone.classList.add('dragover'); });
|
||||||
uploadZone?.addEventListener('dragleave', () => uploadZone.classList.remove('dragover'));
|
uploadZone?.addEventListener('dragleave', () => uploadZone.classList.remove('dragover'));
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><a href="#" class="nav-link active" data-page="dashboard">Dashboard</a></li>
|
<li><a href="#" class="nav-link active" data-page="dashboard">Dashboard</a></li>
|
||||||
<li><a href="#" class="nav-link" data-page="candidates">Candidates</a></li>
|
<li><a href="#" class="nav-link" data-page="candidates">Candidates</a></li>
|
||||||
<li><a href="#" class="nav-link" data-page="upload">Upload CV</a></li>
|
|
||||||
<li><a href="#" class="nav-link" data-page="templates">Templates</a></li>
|
<li><a href="#" class="nav-link" data-page="templates">Templates</a></li>
|
||||||
<li><a href="#" class="nav-link" data-page="batches">Batches</a></li>
|
<li><a href="#" class="nav-link" data-page="batches">Batches</a></li>
|
||||||
<li><a href="#" class="nav-link" data-page="requirements">Requirements</a></li>
|
<li><a href="#" class="nav-link" data-page="requirements">Requirements</a></li>
|
||||||
@@ -40,7 +39,20 @@
|
|||||||
|
|
||||||
<!-- CANDIDATES -->
|
<!-- CANDIDATES -->
|
||||||
<div id="page-candidates" class="page">
|
<div id="page-candidates" class="page">
|
||||||
<h2 style="margin-bottom:20px">Candidates</h2>
|
<div class="flex-between mb-16">
|
||||||
|
<h2>Candidates</h2>
|
||||||
|
<button class="btn" onclick="showUploadZone()">+ Upload CV</button>
|
||||||
|
</div>
|
||||||
|
<div id="candidate-upload-area" style="display:none;margin-bottom:16px">
|
||||||
|
<div class="card">
|
||||||
|
<div class="upload-zone" id="upload-zone" onclick="document.getElementById('file-input').click()">
|
||||||
|
<p style="font-size:16px; margin-bottom:8px">Drop CV file here or click to browse</p>
|
||||||
|
<p class="text-muted text-sm">Supports PDF, DOCX, TXT, DOC</p>
|
||||||
|
</div>
|
||||||
|
<input type="file" id="file-input" accept=".pdf,.docx,.doc,.txt,.rtf" style="display:none" onchange="uploadFile(this.files[0])">
|
||||||
|
<div id="upload-status" style="margin-top:12px"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="flex mb-16 gap-8">
|
<div class="flex mb-16 gap-8">
|
||||||
<input type="text" id="search-input" placeholder="Search by name, email, or keyword..." style="flex:1">
|
<input type="text" id="search-input" placeholder="Search by name, email, or keyword..." style="flex:1">
|
||||||
<button class="btn" onclick="searchCandidates()">Search</button>
|
<button class="btn" onclick="searchCandidates()">Search</button>
|
||||||
@@ -48,19 +60,6 @@
|
|||||||
<div id="candidates-list"></div>
|
<div id="candidates-list"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- UPLOAD -->
|
|
||||||
<div id="page-upload" class="page">
|
|
||||||
<h2 style="margin-bottom:20px">Upload CV</h2>
|
|
||||||
<div class="card">
|
|
||||||
<div class="upload-zone" id="upload-zone" onclick="document.getElementById('file-input').click()">
|
|
||||||
<p style="font-size:18px; margin-bottom:8px">Drop CV file here or click to browse</p>
|
|
||||||
<p class="text-muted text-sm">Supports PDF, DOCX, TXT, DOC</p>
|
|
||||||
</div>
|
|
||||||
<input type="file" id="file-input" accept=".pdf,.docx,.doc,.txt,.rtf" style="display:none" onchange="uploadFile(this.files[0])">
|
|
||||||
<div id="upload-status" style="margin-top:16px"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- TEMPLATES (Word/Carbone only) -->
|
<!-- TEMPLATES (Word/Carbone only) -->
|
||||||
<div id="page-templates" class="page">
|
<div id="page-templates" class="page">
|
||||||
<h2 style="margin-bottom:20px">CV Templates</h2>
|
<h2 style="margin-bottom:20px">CV Templates</h2>
|
||||||
@@ -151,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/app.js?v=16"></script>
|
<script src="/static/app.js?v=17"></script>
|
||||||
<script src="/static/carbone.js?v=16"></script>
|
<script src="/static/carbone.js?v=16"></script>
|
||||||
<script src="/static/batches.js?v=1"></script>
|
<script src="/static/batches.js?v=1"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user