diff --git a/atst/domain/csp/reports.py b/atst/domain/csp/reports.py index 683c1139..2d42fede 100644 --- a/atst/domain/csp/reports.py +++ b/atst/domain/csp/reports.py @@ -1,7 +1,7 @@ from itertools import groupby -from atst.utils.localization import translate import pendulum from decimal import Decimal +from collections import OrderedDict class ReportingInterface: @@ -295,13 +295,16 @@ class MockReportingProvider(ReportingInterface): portfolio.active_clins, lambda clin: clin.jedi_clin_type ): obligated_funds = sum(clin.obligated_amount for clin in clins) - return_dict[translate(f"JEDICLINType.{jedi_clin.value}")] = { + return_dict[jedi_clin.value] = { "obligated_funds": obligated_funds, "expended_funds": ( obligated_funds * Decimal(self.MOCK_PERCENT_EXPENDED_FUNDS) ), } - return return_dict + return OrderedDict( + # 0 index for dict item, -1 for last digit of 4 digit CLIN, e.g. 0001 + sorted(return_dict.items(), key=lambda clin: clin[0][-1]) + ) return {} def get_expired_task_orders(self, portfolio): diff --git a/atst/forms/data.py b/atst/forms/data.py index 9bf88cd7..7b1b4a40 100644 --- a/atst/forms/data.py +++ b/atst/forms/data.py @@ -117,8 +117,8 @@ ENV_ROLES = [(role.value, role.value) for role in CSPRole] + [ ] JEDI_CLIN_TYPES = [ - ("JEDI_CLIN_1", translate("forms.task_order.clin_01_label")), - ("JEDI_CLIN_2", translate("forms.task_order.clin_02_label")), - ("JEDI_CLIN_3", translate("forms.task_order.clin_03_label")), - ("JEDI_CLIN_4", translate("forms.task_order.clin_04_label")), + ("JEDI_CLIN_1", translate("JEDICLINType.JEDI_CLIN_1")), + ("JEDI_CLIN_2", translate("JEDICLINType.JEDI_CLIN_2")), + ("JEDI_CLIN_3", translate("JEDICLINType.JEDI_CLIN_3")), + ("JEDI_CLIN_4", translate("JEDICLINType.JEDI_CLIN_4")), ] diff --git a/templates/components/clin_fields.html b/templates/components/clin_fields.html index 6d79dc08..1117b89c 100644 --- a/templates/components/clin_fields.html +++ b/templates/components/clin_fields.html @@ -92,10 +92,10 @@ diff --git a/templates/portfolios/reports/obligated_funds.html b/templates/portfolios/reports/obligated_funds.html index a774c0f9..c8d6ff22 100644 --- a/templates/portfolios/reports/obligated_funds.html +++ b/templates/portfolios/reports/obligated_funds.html @@ -11,7 +11,7 @@ {% set remaining_funds = (funds["obligated_funds"] - funds["expended_funds"]) %}
Total obligated amount: {{ funds["obligated_funds"] | dollars }}