305 lines
13 KiB
HTML
305 lines
13 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 }} <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 }}">
|
|
</div>
|
|
<div class="form-group">
|
|
<button type="submit" name="update_tiers" class="btn btn-primary">
|
|
<i class="fas fa-sync-alt me-1"></i> {% trans "Update Tiers" %}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- Tier Display -->
|
|
<h2 class="h4 mb-3 mt-5">{% trans "Candidate Tiers" %}</h2>
|
|
<div class="candidate-table-responsive" data-signals__ifmissing="{_fetching: false, selections: Array({{ candidates|length }}).fill(false)}">
|
|
{% url "bulk_candidate_move_to_exam" as move_to_exam_url %}
|
|
{% if candidates %}
|
|
<button class="btn btn-primary"
|
|
data-attr="{disabled: !$selections.filter(Boolean).length}"
|
|
data-on-click="@post('{{move_to_exam_url}}',{
|
|
contentType: 'form',
|
|
selector: '#myform',
|
|
headers: {'X-CSRFToken': '{{ csrf_token }}'}})"
|
|
>Bulk Move To Exam</button>
|
|
{% endif %}
|
|
<form id="myform" action="{{move_to_exam_url}}" method="post">
|
|
<table class="candidate-table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
{% if candidates %}
|
|
<div class="form-check">
|
|
<input
|
|
data-bind-_all
|
|
data-on-change="$selections = Array({{ candidates|length }}).fill($_all)"
|
|
data-effect="$selections; $_all = $selections.every(Boolean)"
|
|
data-attr-disabled="$_fetching"
|
|
type="checkbox" class="form-check-input" id="candidate-{{ candidate.id }}">
|
|
</div>
|
|
{% endif %}
|
|
</th>
|
|
<th>{% trans "Name" %}</th>
|
|
<th>{% trans "Contact" %}</th>
|
|
<th>{% trans "AI Score" %}</th>
|
|
<th>{% trans "Status" %}</th>
|
|
<th>{% trans "Stage" %}</th>
|
|
<th>{% trans "Actions" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for candidate in candidates %}
|
|
<tr>
|
|
<td>
|
|
<div class="form-check">
|
|
<input
|
|
data-bind-selections
|
|
data-attr-disabled="$_fetching"
|
|
name="{{ candidate.id }}"
|
|
|
|
type="checkbox" class="form-check-input" id="candidate-{{ candidate.id }}">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="candidate-name">{{ candidate.name }}</div>
|
|
</td>
|
|
<td>
|
|
<div class="candidate-details">
|
|
Email: {{ candidate.email }}<br>
|
|
Phone: {{ candidate.phone }}<br>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<span class="badge bg-success">{{ candidate.match_score|default:"0" }}</span>
|
|
</td>
|
|
<td>
|
|
<span class="badge {% if candidate.applicant_status == 'Candidate' %}bg-success{% else %}bg-secondary{% endif %}">
|
|
{{ candidate.get_applicant_status_display }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<span class="stage-badge stage-{{ candidate.stage }}">
|
|
{{ candidate.get_stage_display }}
|
|
</span>
|
|
{% if candidate.stage == "Exam" and candidate.exam_status %}
|
|
<br>
|
|
<span class="badge bg-info">{{ candidate.get_exam_status_display }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<button class="btn btn-primary"
|
|
data-bs-toggle="modal"
|
|
data-bs-target="#candidateviewModal"
|
|
hx-get="{% url 'candidate_criteria_view_htmx' candidate.pk %}"
|
|
hx-target="#candidateviewModalBody"
|
|
>
|
|
{% include "icons/view.html" %}
|
|
{% trans "View" %}</button>
|
|
{% if candidate.stage != "Exam" %}
|
|
<button hx-post="{% url 'candidate_move_to_exam' candidate.pk %}"
|
|
hx-target=".candidate-table"
|
|
hx-select=".candidate-table"
|
|
hx-swap="outerHTML"
|
|
class="btn btn-primary"> {% trans "Move to Exam" %} {% include "icons/right.html" %}</button>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
<!-- Tab Content -->
|
|
|
|
<div class="modal fade modal-lg" id="candidateviewModal" tabindex="-1" aria-labelledby="candidateviewModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="candidateviewModalLabel">Form Settings</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div id="candidateviewModalBody" class="modal-body">
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |