From dc6fcfd56f05144009dd28ab8d28c1a718bbe1b3 Mon Sep 17 00:00:00 2001 From: gaazzopa Date: Fri, 6 Nov 2020 17:46:04 +0100 Subject: [PATCH] Result format was not user friendly --- cara/apps/calculator/report_generator.py | 3 ++- cara/apps/calculator/templates/report.html.j2 | 26 ++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index 573f8bb0..dd487fb3 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -92,7 +92,8 @@ def build_report(model: models.Model, form: FormData): 'simulation_name': form.simulation_name, 'room_number': form.room_number, 'room_volume': form.room_volume, - 'ventilation_type': form.ventilation_type, + 'ventilation_type': form.ventilation_type, + 'mechanical_ventilation_type': form.mechanical_ventilation_type, 'air_supply': form.air_supply, 'air_changes': form.air_changes, 'windows_number': form.windows_number, diff --git a/cara/apps/calculator/templates/report.html.j2 b/cara/apps/calculator/templates/report.html.j2 index 607781c8..9a68f263 100644 --- a/cara/apps/calculator/templates/report.html.j2 +++ b/cara/apps/calculator/templates/report.html.j2 @@ -27,8 +27,13 @@ {% if ventilation_type == "mechanical"%} Yes

{% else %} No @@ -54,11 +59,7 @@

Event data:

Break data:

@@ -110,19 +110,15 @@

Mask wearing:

Results:

- In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ "{:#.2g}".format(prob_inf) }}% and the estimated basic reproduction rate (R0) is {{ "{:#.2g}".format(R0) }}. + In this scenario, the estimated probability of one exposed occupant getting infected P(i) is {{ "{0:.2f}".format(prob_inf) }}% and the estimated basic reproduction rate (R0) is {{ "{0:.2f}".format(R0) }}.

Exposure graph: