185 lines
10 KiB
HTML
185 lines
10 KiB
HTML
{% extends "base.html" %}
|
|
{% load static humanize i18n %}
|
|
|
|
{% block title %}{{ candidate.name }} - {{ block.super }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<!-- Candidate Header Card -->
|
|
<div class="card mb-4" data-signals-stage="'{{ candidate.stage }}'">
|
|
<div class="card-header">
|
|
<div class="d-flex justify-content-between align-items-start">
|
|
<div>
|
|
<h1 class="h3 mb-2">{{ candidate.name }}</h1>
|
|
<div class="d-flex align-items-center gap-2 mb-2">
|
|
<span class="badge {% if candidate.applied %}bg-success{% else %}bg-warning{% endif %}">
|
|
{{ candidate.applied|yesno:"Applied,Pending" }}
|
|
</span>
|
|
<span id="stageDisplay" class="badge" data-class="{'bg-primary': $stage == 'Applied', 'bg-info': $stage == 'Exam', 'bg-warning': $stage == 'Interview', 'bg-success': $stage == 'Offer'}">
|
|
Stage: <span data-text="$stage"></span>
|
|
</span>
|
|
</div>
|
|
{% if user.is_staff %}
|
|
<div class="d-flex gap-2">
|
|
<button type="button" class="btn btn-outline-info btn-sm" data-bs-toggle="modal" data-bs-target="#stageUpdateModal" title="{% trans 'Update Stage' %}">
|
|
<i class="fas fa-exchange-alt"></i>
|
|
<span class="d-none d-sm-inline">{% trans "Update Stage" %}</span>
|
|
</button>
|
|
<a href="{% url 'candidate_update' candidate.slug %}" class="btn btn-outline-primary btn-sm" title="{% trans 'Edit' %}">
|
|
{% include "icons/edit.html" %}
|
|
<span class="d-none d-sm-inline">{% trans "Edit" %}</span>
|
|
</a>
|
|
<a href="{% url 'candidate_delete' candidate.slug %}" class="btn btn-outline-danger btn-sm" title="{% trans 'Delete' %}" onclick="return confirm('{% trans "Are you sure?" %}')">
|
|
{% include "icons/delete.html" %}
|
|
<span class="d-none d-sm-inline">{% trans "Delete" %}</span>
|
|
</a>
|
|
<a href="{% url 'candidate_list' %}" class="btn btn-outline-secondary btn-sm" title="{% trans 'Back to List' %}">
|
|
{% include "icons/back.html" %}
|
|
<span class="d-none d-sm-inline">{% trans "Back to List" %}</span>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Contact Information Card -->
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<h2 class="h5 mb-0">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Contact Information" %}
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-md-6 mb-3">
|
|
<div class="d-flex align-items-center">
|
|
<svg class="heroicon icon-sm text-muted me-3" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M22 6l-10 7L2 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
<div>
|
|
<small class="text-muted d-block">{% trans "Email" %}</small>
|
|
<strong>{{ candidate.email }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 mb-3">
|
|
<div class="d-flex align-items-center">
|
|
<svg class="heroicon icon-sm text-muted me-3" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M3.27 6.96L12 12.01l8.73-5.05" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M3 16v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
<div>
|
|
<small class="text-muted d-block">{% trans "Job Position" %}</small>
|
|
<strong>{{ candidate.job.title }}</strong>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12">
|
|
<div class="d-flex align-items-center">
|
|
<svg class="heroicon icon-sm text-muted me-3" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
<div>
|
|
<small class="text-muted d-block">{% trans "Applied Date" %}</small>
|
|
<div class="d-flex align-items-center gap-2">
|
|
<strong>{{ candidate.created_at|date:"M d, Y H:i" }}</strong>
|
|
<span class="badge bg-light text-dark">
|
|
<svg class="heroicon icon-sm" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" stroke="currentColor" stroke-width="2"></path>
|
|
</svg>
|
|
{{ candidate.created_at|naturaltime }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Resume Card -->
|
|
{% if candidate.resume %}
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<h2 class="h5 mb-0">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M14 2v6h6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M16 13H8M16 17H8M10 9H8" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Resume" %}
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>
|
|
<p class="mb-1"><strong>{{ candidate.resume.name }}</strong></p>
|
|
<small class="text-muted">{{ candidate.resume }} • {{ candidate.resume.name|truncatechars:30 }}</small>
|
|
</div>
|
|
<a href="{{ candidate.resume.url }}" download class="btn btn-primary">
|
|
{% include "icons/download.html" %}
|
|
{% trans "Download Resume" %}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Parsed Summary Card -->
|
|
{% if candidate.parsed_summary %}
|
|
<div class="card mb-4">
|
|
<div class="card-header">
|
|
<h2 class="h5 mb-0">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Parsed Summary" %}
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="border-start border-primary ps-3">
|
|
<p class="mb-0">{{ candidate.parsed_summary|linebreaks }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Parsed Data Card -->
|
|
{% if parsed %}
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h2 class="h5 mb-0">
|
|
<svg class="heroicon" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
<path d="M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
</svg>
|
|
{% trans "Parsed Data" %}
|
|
</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row">
|
|
{% for key, value in parsed.items %}
|
|
<div class="col-md-6 col-lg-4 mb-3">
|
|
<div class="border rounded p-3 h-100">
|
|
<h6 class="text-muted small text-uppercase mb-1">{{ key|title }}</h6>
|
|
<p class="mb-0">{{ value }}</p>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Stage Update Modal -->
|
|
{% if user.is_staff %}
|
|
{% include "recruitment/partials/stage_update_modal.html" with candidate=candidate form=stage_form %}
|
|
{% endif %}
|
|
{% endblock %}
|