File size: 4,441 Bytes
ce04e48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b5d3943
ce04e48
 
b5d3943
ce04e48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b5d3943
 
 
 
 
 
 
 
 
 
 
 
 
ce04e48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b5d3943
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ce04e48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{% extends "base.html" %}

{% block title %}Recruiter Dashboard - Codingo{% endblock %}

{#
   This dashboard lists all candidates who have applied to jobs posted by the
   currently logged in recruiter.  Candidates are sorted from highest to
   lowest matching score.  The score is calculated on the fly by comparing
   the candidate's self‑reported skills to the job's required skills.  A
   placeholder button is provided for downloading a PDF report; the
   functionality will be implemented in a future iteration.
#}

{% block content %}
<section class="content-section">
    <!-- <ul class="breadcrumbs">
        <li><a href="{{ url_for('index') }}">Home</a></li>
        <li>Dashboard</li>
    </ul> -->

    <div class="section-title">
        <h2>Interviewed Candidates</h2>
        <p>Review candidates who have applied to your job postings</p>
    </div>

    {% if candidates %}
    <div class="card">
        <div class="card-body" style="overflow-x: auto;">
            <table class="dashboard-table" style="width: 100%; border-collapse: collapse;">
                <thead>
                    <tr style="background-color: var(--primary); color: white; text-align: left;">
                        <th style="padding: 0.75rem;">Name</th>
                        <th style="padding: 0.75rem;">Email</th>
                        <th style="padding: 0.75rem;">Job Applied</th>
                        <th style="padding: 0.75rem;">Interview Score</th>
                        <th style="padding: 0.75rem;">Action</th>
                    </tr>
                </thead>
                <tbody>
                    {% for item in candidates %}
                    <tr style="border-bottom: 1px solid #ddd;">
                        <td style="padding: 0.75rem;">{{ item.application.name }}</td>
                        <td style="padding: 0.75rem;">{{ item.application.email }}</td>
                        <td style="padding: 0.75rem;">{{ item.application.job.role }}</td>
                        <td style="padding: 0.75rem; font-weight: 600; color: var(--secondary);">{{ item.score_label }}</td>
                        <td style="padding: 0.75rem;">
                            {#
                                Provide a link to download the candidate's interview report.  The
                                ``url_for`` call targets the API endpoint defined in
                                ``backend/routes/interview_api.py``.  It passes the application ID
                                (used as the interview identifier) so that the backend knows which
                                candidate to generate a report for.  Styling is handled via the
                                ``download-report-btn`` class defined below.
                            #}
                            <a href="{{ url_for('interview_api.download_report', application_id=item.application.id) }}"
                               class="download-report-btn"
                               title="Download interview report as PDF">
                                Download Report (PDF)
                            </a>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
    {% else %}
    <div class="card">
        <div class="card-body">
            <p>No candidate applications found for your job postings.</p>
        </div>
    </div>
    {% endif %}
</section>

<style>
.dashboard-table th, .dashboard-table td {
    text-align: left;
}

.dashboard-table th {
    font-weight: 600;
}

.dashboard-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.dashboard-table tr:hover {
    background-color: #eef5ff;
}
</style>
<style>
/*
 * Custom styling for the download report link.  The default button styles
 * blend into the table background, making the report action hard to see.  A
 * subtle border and hover effect improve visibility without altering the
 * overall aesthetic of the dashboard.
 */
.download-report-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    background-color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.download-report-btn:hover {
    background-color: var(--primary);
    color: #fff;
}
</style>
{% endblock %}