diff --git a/seed/lib/superperms/orgs/migrations/0029_auto_20240105_1257.py b/seed/lib/superperms/orgs/migrations/0029_auto_20240105_1257.py new file mode 100644 index 0000000000..cbf67fbbcb --- /dev/null +++ b/seed/lib/superperms/orgs/migrations/0029_auto_20240105_1257.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.23 on 2024-01-05 20:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('orgs', '0028_organization_audit_template_report_type'), + ] + + operations = [ + migrations.AlterField( + model_name='organization', + name='display_units_ghg', + field=models.CharField(choices=[('kgCO2e/year', 'kgCO2e/year'), ('MtCO2e/year', 'MtCO2e/year')], default='MtCO2e/year', max_length=32), + ), + migrations.AlterField( + model_name='organization', + name='display_units_ghg_intensity', + field=models.CharField(choices=[('kgCO2e/ft**2/year', 'kgCO2e/ft²/year'), ('MtCO2e/ft**2/year', 'MtCO2e/ft²/year'), ('kgCO2e/m**2/year', 'kgCO2e/m²/year'), ('MtCO2e/m**2/year', 'MtCO2e/m²/year')], default='kgCO2e/ft**2/year', max_length=32), + ), + ] diff --git a/seed/lib/superperms/orgs/models.py b/seed/lib/superperms/orgs/models.py index 0c0daf35f1..f42d5503a4 100644 --- a/seed/lib/superperms/orgs/models.py +++ b/seed/lib/superperms/orgs/models.py @@ -107,11 +107,15 @@ class Organization(models.Model): ) MEASUREMENT_CHOICES_GHG = ( + ('kgCO2e/year', 'kgCO2e/year'), ('MtCO2e/year', 'MtCO2e/year'), ) MEASUREMENT_CHOICES_GHG_INTENSITY = ( ('kgCO2e/ft**2/year', 'kgCO2e/ft²/year'), + ('MtCO2e/ft**2/year', 'MtCO2e/ft²/year'), + ('kgCO2e/m**2/year', 'kgCO2e/m²/year'), + ('MtCO2e/m**2/year', 'MtCO2e/m²/year'), ) US = 1 diff --git a/seed/static/seed/js/controllers/organization_settings_controller.js b/seed/static/seed/js/controllers/organization_settings_controller.js index 8dc3af7ee3..668a61496d 100644 --- a/seed/static/seed/js/controllers/organization_settings_controller.js +++ b/seed/static/seed/js/controllers/organization_settings_controller.js @@ -89,6 +89,36 @@ angular.module('BE.seed.controller.organization_settings', []).controller('organ } ]; + $scope.unit_options_ghg = [ + { + label: $translate.instant('kgCO2e/year'), + value: 'kgCO2e/year' + }, + { + label: $translate.instant('MtCO2e/year'), + value: 'MtCO2e/year' + }, + ] + + $scope.unit_options_ghg_intensity = [ + { + label: $translate.instant('kgCO2e/ft²/year'), + value: 'kgCO2e/ft**2/year' + }, + { + label: $translate.instant('kgCO2e/m²/year'), + value: 'kgCO2e/m**2/year' + }, + { + label: $translate.instant('MtCO2e/ft²/year'), + value: 'MtCO2e/ft**2/year' + }, + { + label: $translate.instant('MtCO2e/m²/year'), + value: 'MtCO2e/m**2/year' + }, + ] + // Ideally, these units and types for meters should be translatable. $scope.chosen_type_unit = { type: null, diff --git a/seed/static/seed/partials/organization_settings.html b/seed/static/seed/partials/organization_settings.html index dc8973c4a9..0071d32f39 100644 --- a/seed/static/seed/partials/organization_settings.html +++ b/seed/static/seed/partials/organization_settings.html @@ -938,6 +938,34 @@