Skip to content
Snippets Groups Projects
Commit 6649f07a authored by Théo BOYER's avatar Théo BOYER
Browse files

Fix suite au merge

- MAJ Conformité des traitements
- MAJ Conformité de la structure
- MAJ Référentiels
- MAJ Complex Choice Group (traitements / logiciels et supports)
parent e372d7ba
No related branches found
No related tags found
No related merge requests found
Pipeline #62638 failed
...@@ -145,7 +145,7 @@ a:focus { ...@@ -145,7 +145,7 @@ a:focus {
display: flex; display: flex;
align-items: start; align-items: start;
.checkbox { .checkbox {
margin: 0.5rem 0; margin: 0;
} }
} }
.question-no-margin { .question-no-margin {
...@@ -153,6 +153,9 @@ a:focus { ...@@ -153,6 +153,9 @@ a:focus {
margin-bottom: 0; margin-bottom: 0;
} }
} }
td div.bootstrap-select {
max-width: 450px;
}
.delay-group { .delay-group {
.one-line { .one-line {
vertical-align: middle; vertical-align: middle;
......
...@@ -51,6 +51,7 @@ class ConformiteType extends AbstractType ...@@ -51,6 +51,7 @@ class ConformiteType extends AbstractType
'title' => 'placeholder.multiple_select', 'title' => 'placeholder.multiple_select',
'data-live-search' => true, 'data-live-search' => true,
'aria-label' => 'Actions de protection', 'aria-label' => 'Actions de protection',
'data-width' => 'calc(100% - 40px)',
], ],
'choice_attr' => function (Mesurement $choice) { 'choice_attr' => function (Mesurement $choice) {
$name = $choice->getName(); $name = $choice->getName();
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
{% do form.questions.setRendered() %} {% do form.questions.setRendered() %}
{% do form.referentiel.setRendered() %} {% do form.referentiel.setRendered() %}
{{ form_errors(form) }} {{ form_errors(form) }}
<div class="row"> <div class="row" style="display: flex;flex-wrap: wrap;">
{% set colors = ['box-info','box-success','box-primary','box-warning'] %} {% set colors = ['box-info','box-success','box-primary','box-warning'] %}
<input type="hidden" name="referentiel" value="{{ form.vars.value.referentiel ? form.vars.value.referentiel.id : '' }}" /> <input type="hidden" name="referentiel" value="{{ form.vars.value.referentiel ? form.vars.value.referentiel.id : '' }}" />
{% set domains = form.vars.value.referentiel ? form.vars.value.referentiel.domains|sort((a, b) => a.position > b.position) : [] %} {% set domains = form.vars.value.referentiel ? form.vars.value.referentiel.domains|sort((a, b) => a.position > b.position) : [] %}
......
...@@ -73,38 +73,42 @@ ...@@ -73,38 +73,42 @@
<div class="col-md-12"> <div class="col-md-12">
<h2>Préconisations</h2> <h2>Préconisations</h2>
</div> </div>
{% set colors = ['box-info','box-success','box-primary','box-warning'] %} <div class="col-md-12">
{% for domain in object.referentiel.domains|sort((a, b) => a.position > b.position) %} <div class="row" style="display: flex;flex-wrap: wrap;">
{% set domainAnswers = form.answerSurveys|filter(as => as.vars.value.answer.question.domain.id == domain.id and as.vars.value.answer.recommendation) %} {% set colors = ['box-info','box-success','box-primary','box-warning'] %}
{% set colorSection = 0 %} {% for domain in object.referentiel.domains|sort((a, b) => a.position > b.position) %}
{% if loop.index matches '/^\\d+$/' %} {% set domainAnswers = form.answerSurveys|filter(as => as.vars.value.answer.question.domain.id == domain.id and as.vars.value.answer.recommendation) %}
{% set colorSection = (loop.index - 1) % 4 %} {% set colorSection = 0 %}
{% endif %} {% if loop.index matches '/^\\d+$/' %}
{% if domainAnswers|length > 0 %} {% set colorSection = (loop.index - 1) % 4 %}
<div class="col-md-6"> {% endif %}
<div class="box box-solid {{ colors[colorSection] }}"> {% if domainAnswers|length > 0 %}
<div class="box-header with-border"> <div class="col-md-6">
<h3 class="box-title">{{ domain.name }}</h3> <div class="box box-solid {{ colors[colorSection] }}">
</div> <div class="box-header with-border">
<div class="box-body"> <h3 class="box-title">{{ domain.name }}</h3>
{% for answerSurvey in domainAnswers %} </div>
<div class="form-group answer-preco"> <div class="box-body">
<label for="{{ answerSurvey.mesurements.vars.id }}"> {% for answerSurvey in domainAnswers %}
{{ answerSurvey.vars.value.answer.recommendation }} <div class="form-group answer-preco">
</label> <label for="{{ answerSurvey.mesurements.vars.id }}">
<div style="display: flex;"> {{ answerSurvey.vars.value.answer.recommendation }}
{{ form_widget(answerSurvey.mesurements) }} </label>
<button id="{{ answerSurvey.mesurements.vars.id }}_add_button" aria-label="Ajouter une action de protection" type="button" class="btn reponse-modal-button" data-toggle="modal" data-target="#mesurement-modal" data-select-id="{{ answerSurvey.mesurements.vars.id }}"> <div style="display: flex;">
<span class="fa fa-plus-circle"></span> {{ form_widget(answerSurvey.mesurements) }}
</button> <button id="{{ answerSurvey.mesurements.vars.id }}_add_button" aria-label="Ajouter une action de protection" type="button" class="btn reponse-modal-button" data-toggle="modal" data-target="#mesurement-modal" data-select-id="{{ answerSurvey.mesurements.vars.id }}">
<span class="fa fa-plus-circle"></span>
</button>
</div>
</div> </div>
</div> {% endfor %}
{% endfor %} </div>
</div> </div>
</div> </div>
</div> {% endif %}
{% endif %} {% endfor %}
{% endfor %} </div>
</div>
{% endif %} {% endif %}
<div class="col-md-12"> <div class="col-md-12">
......
...@@ -78,7 +78,9 @@ ...@@ -78,7 +78,9 @@
</div> </div>
</div> </div>
{% include 'Registry/Conformite_organisation/_form_conformites.html.twig' with {'form': form.conformites} %} <div class="col-md-12">
{% include 'Registry/Conformite_organisation/_form_conformites.html.twig' with {'form': form.conformites} %}
</div>
<div class="col-md-12"> <div class="col-md-12">
<div class="box box-solid"> <div class="box box-solid">
......
<div class="row" style="display: flex;flex-wrap: wrap;">
{% for conformitesArray in getConformitesWithProcessusAndQuestions(form) %} {% for conformitesArray in getConformitesWithProcessusAndQuestions(form) %}
<div class="col-md-6"> <div class="col-md-6">
{% set processus = (conformitesArray|first).vars.value.processus %} {% set processus = (conformitesArray|first).vars.value.processus %}
...@@ -28,3 +29,4 @@ ...@@ -28,3 +29,4 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment