kaauh_ats/templates/recruitment/candidate_tier_management.html

232 lines
8.9 KiB
HTML

{% extends 'base.html' %}
{% load static i18n %}
{% block title %}Candidate Management - {{ job.title }} - University ATS{% endblock %}
{% block customCSS %}
<style>
/* KAAT-S UI Variables */
:root {
--kaauh-teal: #00636e;
--kaauh-teal-dark: #004a53;
--kaauh-border: #eaeff3;
--kaauh-primary-text: #343a40;
--kaauh-success: #28a745; /* Standard success for positive actions */
--kaauh-info: #17a2b8; /* Standard info/exam badge */
}
/* 1. Main Container & Card Styling */
.kaauh-card {
border: 1px solid var(--kaauh-border);
border-radius: 0.75rem;
box-shadow: 0 4px 12px rgba(0,0,0,0.06);
background-color: white;
}
.tier-controls {
background-color: var(--kaauh-border); /* Light background for control sections */
border-radius: 0.5rem;
padding: 1.25rem;
margin-bottom: 1.5rem;
}
/* 2. Button Styling (from reference) */
.btn-main-action {
background-color: var(--kaauh-teal);
border-color: var(--kaauh-teal);
color: white;
font-weight: 600;
transition: all 0.2s ease;
}
.btn-main-action:hover {
background-color: var(--kaauh-teal-dark);
border-color: var(--kaauh-teal-dark);
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-outline-secondary {
color: var(--kaauh-teal-dark);
border-color: var(--kaauh-teal);
}
.btn-outline-secondary:hover {
background-color: var(--kaauh-teal-dark);
color: white;
border-color: var(--kaauh-teal-dark);
}
/* 3. Tab Styles (View Switcher) */
.nav-pills .nav-link {
color: var(--kaauh-teal-dark);
font-weight: 500;
border-radius: 0.5rem;
transition: background-color 0.2s;
}
.nav-pills .nav-link.active {
background-color: var(--kaauh-teal);
color: white;
font-weight: 600;
}
/* 4. Candidate Table Styling (Aligned with KAAT-S) */
.candidate-table {
border-collapse: separate;
border-spacing: 0;
background-color: white;
border-radius: 0.5rem;
overflow: hidden;
}
.candidate-table thead {
background-color: var(--kaauh-border);
}
.candidate-table th {
padding: 0.75rem;
font-weight: 600;
color: var(--kaauh-teal-dark);
border-bottom: 2px solid var(--kaauh-teal);
}
.candidate-table td {
padding: 0.75rem;
border-bottom: 1px solid var(--kaauh-border);
vertical-align: middle;
}
.candidate-table tbody tr:hover {
background-color: #f1f3f4;
}
.candidate-name {
font-weight: 600;
color: var(--kaauh-primary-text);
}
.candidate-details {
font-size: 0.8rem;
color: #6c757d;
}
/* 5. Badges (Status/Score) */
.status-badge {
font-size: 0.8rem;
padding: 0.3em 0.7em;
border-radius: 0.35rem;
font-weight: 700;
text-transform: uppercase;
}
.bg-applicant { background-color: #6c757d; color: white; } /* Secondary */
.bg-candidate { background-color: var(--kaauh-success); color: white; } /* Success */
.bg-score { background-color: var(--kaauh-teal-dark); color: white; }
.bg-exam-status { background-color: var(--kaauh-info); color: white; }
/* 6. Stage Badges (More distinct from KAAT-S reference) */
.stage-badge {
font-size: 0.75rem;
padding: 0.25rem 0.6rem;
border-radius: 0.3rem;
font-weight: 600;
}
.stage-Applied { background-color: #e9ecef; color: #495057; }
.stage-Exam { background-color: #d1ecf1; color: #0c5460; } /* Light cyan/info */
.stage-Interview { background-color: #ffc107; color: #856404; } /* Yellow/warning */
.stage-Offer { background-color: #d4edda; color: #155724; } /* Light green/success */
/* Candidate Indicator (used for the single Potential Candidates list) */
.candidate-indicator-badge {
font-size: 0.7rem;
padding: 0.15rem 0.4rem;
border-radius: 0.25rem;
font-weight: 700;
margin-left: 0.5rem;
background-color: var(--kaauh-teal);
color: white;
}
</style>
{% endblock %}
{% block content %}
<div class="container py-4">
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<h1 class="h3 mb-1" style="color: var(--kaauh-teal-dark); font-weight: 700;">
<i class="fas fa-layer-group me-2"></i>
{% trans "Applicant Screening for Job:" %} - {{ job.title }}&nbsp;&nbsp;<small class="text-muted fs-6">{{job.internal_job_id}}<small>
</h1>
<p class="text-muted mb-0">
Total Applicants: <span class="fw-bold">{{ total_candidates }}</span>
</p>
</div>
<a href="{% url 'job_detail' job.slug %}" class="btn btn-outline-secondary">
<i class="fas fa-arrow-left me-1"></i> {% trans "Back to Job" %}
</a>
</div>
<div class="tier-controls kaauh-card shadow-sm">
<h4 class="h5 mb-3" style="color: var(--kaauh-teal-dark);">{% trans "Filter Potential Candidates" %}</h4>
<form method="post" class="mb-0">
{% csrf_token %}
<div class="row g-3 align-items-end">
<div class="col-md-3 col-sm-6">
<label for="min_ai_score" class="form-label small text-muted">
{% trans "Minimum AI Score" %}
</label>
<input type="number" name="min_ai_score" id="min_ai_score" class="form-control"
value="{{ min_ai_score|default:'0' }}" min="0" max="100" step="1"
placeholder="e.g., 75">
</div>
<div class="col-md-3 col-sm-6">
<label for="tier1_count" class="form-label small text-muted">
{% trans "Number of Potential Candidates (Top N)" %}
</label>
<input type="number" name="tier1_count" id="tier1_count" class="form-control"
value="{{ tier1_count }}" min="1" max="{{ total_candidates }}"
placeholder="Enter N for top candidates">
</div>
<div class="col-md-auto">
<button type="submit" name="update_tiers" class="btn btn-main-action">
<i class="fas fa-filter me-1"></i> {% trans "Apply Filter" %}
</button>
</div>
</div>
<p class="small text-muted mt-2 mb-0">
{% trans "The candidates list is filtered by either the minimum AI Score OR the Top N candidates, whichever criteria results in a smaller set." %}
</p>
</form>
</div>
<hr class="my-4">
<ul class="nav nav-pills mb-3 justify-content-center" id="candidateViewTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="all-applicants-tab" data-bs-toggle="tab" data-bs-target="#all-applicants" type="button"
role="tab" aria-controls="all-applicants" aria-selected="true">
<i class="fas fa-users me-1"></i> {% trans "All Applicants" %}
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="potential-candidates-tab" data-bs-toggle="tab" data-bs-target="#potential-candidates" type="button"
role="tab" aria-controls="potential-candidates" aria-selected="false">
<i class="fas fa-trophy me-1"></i> {% trans "Potential Candidates" %}
<span class="candidate-indicator-badge">{{ tier1_candidates|length }}</span>
</button>
</li>
</ul>
<div class="tab-content kaauh-card p-3 shadow-sm" id="candidateViewTabContent">
<div class="tab-pane fade show active" id="all-applicants" role="tabpanel" aria-labelledby="all-applicants-tab">
<h2 class="h5 mb-3" style="color: var(--kaauh-teal-dark);">{% trans "Complete List of All Submissions" %}</h2>
{% include "recruitment/partials/_candidate_table.html" with candidates=all_applicants_list is_potential_view=False only %}
</div>
<div class="tab-pane fade" id="potential-candidates" role="tabpanel" aria-labelledby="potential-candidates-tab">
<h2 class="h5 mb-3" style="color: var(--kaauh-teal-dark);">
{% trans "Top" %} {{ tier1_candidates|length }} {% trans "Candidates by AI Score" %}
</h2>
{% include "recruitment/partials/_candidate_table.html" with candidates=tier1_candidates is_potential_view=True only %}
</div>
</div>
</div>
{% comment %}
Modals for candidate view and exam status update should be included here,
e.g., {% include "includes/_modals_for_candidate_management.html" %}
{% endcomment %}
{% endblock %}