Commit 93c5f4bd authored by Vincent Mazenod's avatar Vincent Mazenod
Browse files

display constraint in card

parent 12c1158f
......@@ -17,6 +17,8 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
use Enqueue\Client\ProducerInterface;
use App\Services\ConstraintMining;
class JobController extends AbstractController
{
......@@ -99,6 +101,7 @@ class JobController extends AbstractController
return $this->render('job/list.html.twig', [
'form' => $form->createView(),
'jobs' => $jobs,
'constraintMiningChoices' => array_flip(ConstraintMining::$constraintMiningChoices)
]);
}
......
......@@ -14,7 +14,7 @@
{% endif %}
</span>
{{ job.title }}
{{ job.title }}
{% if job.alert is defined and job.alert and not job.alert.readed %}
<span class="badge badge-success">new</span>
......@@ -48,12 +48,21 @@
<div class="container">
<div class="row">
<div class="col-sm-6">
<i class="fas fa-chart-bar"></i>
{{ constraintMiningChoices[job.constraintMining] }}
</div>
<div class="col-sm-2">
<i class="fab fa-font-awesome-flag"></i>
frequency {{ job.frequency }}
</div>
<div class="col-sm-2">
<span class="to-update"
......@@ -66,6 +75,7 @@
</span>
</div>
<div class="col-sm-2">
<span class="to-update"
......@@ -78,27 +88,33 @@
</span>
</div>
<div class="col-sm-2">
</div>
<div class="row">
<div class="col-sm-4">
<span class="to-update" {% if job.columns | length == 0 %}style="display: none;"{% endif %}>
<i class="fas fa-check-circle"></i> processed in <span class="processed-in" >
{% if job.endDate %}
{{ job.endDate.diff(job.startDate)|date("%I:%Ss") }}
{% endif %}
</span>
<i class="fas fa-check-circle"></i> processed in
<span class="processed-in" >
{% if job.endDate %}
{{ job.endDate.diff(job.startDate)|date("%I:%Ss") }}
{% endif %}
</span>
</span>
</div>
<div class="col-sm-4">
<i class="fas fa-calendar-check"></i>
submitted at {{ job.startDate|date("Y/m/d H:i:s") }}
</div>
</div>
<div class="row">
<div class="col-sm-12 mt-2">
<div class="float-right">
<div class="col-sm-4">
<div class="float-right">
<a class="btn btn-primary btn-circle btn-sm"
href="{{ path('job_datasheet_input', { 'id': job.id }) }}">
<i class="fas fa-file-csv"></i> input
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment