82 lines
2.1 KiB
HTML
82 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Recruitment Dashboard</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
padding: 2rem;
|
|
background: #f8f9fa;
|
|
}
|
|
.stats {
|
|
display: flex;
|
|
gap: 2rem;
|
|
margin-bottom: 3rem;
|
|
}
|
|
.card {
|
|
background: white;
|
|
padding: 1.5rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
|
flex: 1;
|
|
text-align: center;
|
|
}
|
|
h2 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
canvas {
|
|
background: white;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 0 10px rgba(0,0,0,0.05);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>Recruitment Dashboard</h1>
|
|
|
|
<div class="stats">
|
|
<div class="card">
|
|
<h2>Total Jobs</h2>
|
|
<p>{{ total_jobs }}</p>
|
|
</div>
|
|
<div class="card">
|
|
<h2>Total Candidates</h2>
|
|
<p>{{ total_candidates }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Applications per Job</h2>
|
|
<canvas id="applicationsChart" width="800" height="400"></canvas>
|
|
|
|
<script>
|
|
const ctx = document.getElementById('applicationsChart').getContext('2d');
|
|
const chart = new Chart(ctx, {
|
|
type: 'bar',
|
|
data: {
|
|
labels: {{ job_titles|safe }},
|
|
datasets: [{
|
|
label: 'Applications',
|
|
data: {{ job_app_counts|safe }},
|
|
backgroundColor: 'rgba(54, 162, 235, 0.7)',
|
|
borderColor: 'rgba(54, 162, 235, 1)',
|
|
borderWidth: 1
|
|
}]
|
|
},
|
|
options: {
|
|
responsive: true,
|
|
scales: {
|
|
y: {
|
|
beginAtZero: true,
|
|
precision: 0
|
|
}
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html> |