currrent thing

This commit is contained in:
asaki222 2024-10-18 12:33:08 -04:00
parent 5cd0a34b3b
commit 436809f711
No known key found for this signature in database
GPG key ID: 2C4F802060E06EA4
6 changed files with 24 additions and 7 deletions

View file

@ -1694,14 +1694,15 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
"last_submitted_date",
"last_status_update",
"status",
"generic_org_type",
"federal_type",
"federal_agency",
"organization_name",
"custom_election_board",
"city",
"state_territory",
"investigator",
"get_generic_org_type",
"get_organization_name",
"organization_name"
]
orderable_fk_fields = [

View file

@ -1334,3 +1334,19 @@ class DomainRequest(TimeStampedModel):
if not is_complete or not self._is_general_form_complete(request):
return False
return True
@property
def get_organization_name(self):
""""returns the organization field if the domain request is in a portfolio
otherwise it returns the organization name from the domain request object itself"""
if self.portfolio:
return self.portfolio.organization_name
return self.organization_name
@property
def get_generic_org_type(self):
""""returns the organization type if the domain request is in a portfolio
otherwise it returns the organization type from the domain request object itself"""
if self.portfolio:
return self.portfolio.organization_type
return self.generic_org_type

View file

@ -173,7 +173,7 @@
{% endwith %}
{% endif %}
{% if DomainRequest.organization_name %}
{% if DomainRequest.get_organization_name %}
{% include "includes/summary_item.html" with title='Organization' value=DomainRequest address='true' heading_level=heading_level %}
{% endif %}

View file

@ -2,8 +2,8 @@
{% if organization.federal_agency %}
{{ organization.federal_agency }}<br />
{% endif %}
{% if organization.organization_name %}
{{ organization.organization_name }}
{% if organization.get_organization_name %}
{{ organization.get_organization_name }}
{% endif %}
{% if organization.address_line1 %}
<br />{{ organization.address_line1 }}

View file

@ -41,7 +41,7 @@
{% endif %}
{% if step == Step.ORGANIZATION_CONTACT %}
{% if domain_request.organization_name %}
{% if domain_request.get_organization_name %}
{% with title=form_titles|get_item:step value=domain_request %}
{% include "includes/summary_item.html" with title=title value=value heading_level=heading_level editable=is_editable edit_link=domain_request_url address='true' %}
{% endwith %}

View file

@ -173,7 +173,7 @@
{% endwith %}
{% endif %}
{% if DomainRequest.organization_name %}
{% if DomainRequest.get_organization_name %}
{% include "includes/summary_item.html" with title='Organization' value=DomainRequest address='true' heading_level=heading_level %}
{% endif %}