Added missing conditions to alternative scenarios and. bug fix

This commit is contained in:
Luis Aleixo 2022-06-14 16:16:26 +02:00
parent d0b5e9b2a7
commit e777a71d2a
2 changed files with 10 additions and 27 deletions

View file

@ -63,24 +63,6 @@ p.notes {
width: 100pt; width: 100pt;
} }
.red_bkg {
color: #000000;
background-color: #CD5C5C;
text-decoration: none;
}
.yellow_bkg {
color: #000000;
background-color: #FFFF00;
text-decoration: none;
}
.green_bkg {
color: #000000;
background-color: #90EE90;
text-decoration: none;
}
.icon_button { .icon_button {
border: none; border: none;
background: none; background: none;
@ -113,9 +95,6 @@ p.notes {
#rules, #rules,
#data { #data {
display: contents!important; display: contents!important;
.card {
page-break-inside: avoid!important;
break-inside: avoid!important;
} }
#link_reproduce_results { #link_reproduce_results {
display: none!important; display: none!important;
@ -144,6 +123,10 @@ p.notes {
.pi-box { .pi-box {
max-width: 260px!important; max-width: 260px!important;
} }
.card {
page-break-inside: avoid!important;
break-inside: avoid!important;
}
#link-results { #link-results {
display: none; display: none;
} }

View file

@ -135,12 +135,12 @@
</thead> </thead>
<tbody> <tbody>
{% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %} {% for scenario_name, scenario_stats in alternative_scenarios.stats.items() %}
{%if (( scenario_stats.probability_of_infection > 15) or (scenario_stats.expected_new_cases >= 1)) %} {%if (( scenario_stats.probability_of_infection > 10) or (scenario_stats.expected_new_cases >= 1)) %}
<tr class="red_bkg"> <tr class="alert-danger">
{% elif (5 <= scenario_stats.probability_of_infection <= 15) %} {% elif (2 <= scenario_stats.probability_of_infection <= 10) %}
<tr class="yellow_bkg"> <tr class="alert-warning">
{% elif (scenario_stats.probability_of_infection < 5) %} {% elif (scenario_stats.probability_of_infection < 2) %}
<tr class="green_bkg"> <tr class="alert-success">
{% endif%} {% endif%}
<td> {{ scenario_name }}</td> <td> {{ scenario_name }}</td>
<td> {{ scenario_stats.probability_of_infection | non_zero_percentage }}</td> <td> {{ scenario_stats.probability_of_infection | non_zero_percentage }}</td>