From 557df21a30d410804678f44f80b0924b5eef20c7 Mon Sep 17 00:00:00 2001 From: Patrick Smith Date: Wed, 5 Sep 2018 13:15:46 -0400 Subject: [PATCH] Add initial Reports object --- atst/domain/reports.py | 9 +++++++++ templates/workspace_reports.html | 11 +++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 atst/domain/reports.py diff --git a/atst/domain/reports.py b/atst/domain/reports.py new file mode 100644 index 00000000..1d14e006 --- /dev/null +++ b/atst/domain/reports.py @@ -0,0 +1,9 @@ +class Reports: + + @classmethod + def workspace_totals(cls, workspace): + return { + 'budget': 100_000_000, + 'spent': 40_000_000, + } + diff --git a/templates/workspace_reports.html b/templates/workspace_reports.html index af72b3cf..f5469514 100644 --- a/templates/workspace_reports.html +++ b/templates/workspace_reports.html @@ -19,24 +19,27 @@

Workspace Total Spend

+ {% set budget = workspace_totals['budget'] %} + {% set spent = workspace_totals['spent'] %} + {% set remaining = budget - spent %}
Budget
-
$100,000,000
+
{{ budget | dollars }}
Remaining
-
$60,000,000
+
{{ remaining | dollars }}
- +
Total spend to date
-
$40,000,00
+
{{ spent | dollars }}