mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-05 15:10:16 +02:00
18a6090366
* Add Penalty Seconds on tests * Refactors and start of candidate answer relation * Add breadcrumbs and UI consistency updates across backoffice templates * Add breadcrumbs and UI consistency updates across backoffice templates * Add Dutch translations for email verification and security messages * Rector * Refactor for code consistency and type safety assertions across repositories and entities * Refactor candidate-related logic to optimize queries, improve template separation, and add "Answer Mapping" functionality. * Cleanup * Update Symfony * Add coderabbit config * Fixes from coderabbit
51 lines
2.2 KiB
Twig
51 lines
2.2 KiB
Twig
<h4 class="mb-3">{{ 'Candidates'|trans }}</h4>
|
|
<table class="table table-hover mb-3">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{{ 'Name'|trans }}</th>
|
|
<th scope="col">{{ 'Quiz Status'|trans }}</th>
|
|
<th scope="col">{{ 'Candidate Status'|trans }}</th>
|
|
<th scope="col">{{ 'Actions'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for data in candidateData %}
|
|
{% set candidate = data.candidate %}
|
|
{% set quizCandidate = data.quizCandidate %}
|
|
{% set givenAnswersCount = data.givenAnswersCount %}
|
|
|
|
<tr>
|
|
<td>{{ candidate.name }}</td>
|
|
<td>
|
|
{% if quizCandidate and quizCandidate.started %}
|
|
{% if givenAnswersCount >= quiz.questions|length %}
|
|
<span class="badge text-bg-success">{{ 'Completed'|trans }}</span>
|
|
{% else %}
|
|
<span class="badge text-bg-warning">{{ 'In Progress'|trans }} ({{ givenAnswersCount }}/{{ quiz.questions|length }})</span>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="badge text-bg-secondary">{{ 'Not Started'|trans }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if quizCandidate == null or quizCandidate.active %}
|
|
<span class="badge text-bg-success">{{ 'Active'|trans }}</span>
|
|
{% else %}
|
|
<span class="badge text-bg-secondary">{{ 'Inactive'|trans }}</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a href="{{ path('tvdt_backoffice_toggle_candidate', {quiz: quiz.id, candidate: candidate.id}) }}"
|
|
class="btn btn-sm btn-outline-secondary">
|
|
{% if quizCandidate == null or quizCandidate.active %}
|
|
{{ 'Deactivate'|trans }}
|
|
{% else %}
|
|
{{ 'Activate'|trans }}
|
|
{% endif %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|