diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py index b80e063cd..9817824b8 100644 --- a/src/registrar/models/domain_request.py +++ b/src/registrar/models/domain_request.py @@ -1154,6 +1154,11 @@ class DomainRequest(TimeStampedModel): data[field.name] = field.value_from_object(self) return data + def get_formatted_cisa_rep_name(self): + """Returns the cisa representatives name in Western order.""" + names = [n for n in [self.cisa_representative_first_name, self.cisa_representative_last_name] if n] + return " ".join(names) if names else "Unknown" + def _is_federal_complete(self): # Federal -> "Federal government branch" page can't be empty + Federal Agency selection can't be None return not (self.federal_type is None or self.federal_agency is None) diff --git a/src/registrar/templates/domain_request_status.html b/src/registrar/templates/domain_request_status.html index f4defc14e..f5519b6be 100644 --- a/src/registrar/templates/domain_request_status.html +++ b/src/registrar/templates/domain_request_status.html @@ -48,25 +48,70 @@ Status: - {% if DomainRequest.status == 'approved' %} Approved - {% elif DomainRequest.status == 'in review' %} In review - {% elif DomainRequest.status == 'rejected' %} Rejected - {% elif DomainRequest.status == 'submitted' %} Submitted - {% elif DomainRequest.status == 'ineligible' %} Ineligible - {% else %}ERROR Please contact technical support/dev - {% endif %} + {{ DomainRequest.get_status_display|default:"ERROR Please contact technical support/dev" }}
Last updated: {{DomainRequest.updated_at|date:"F j, Y"}}
- + + {% if DomainRequest.creator and DomainRequest.creator != request.user %} ++ Created by: {{DomainRequest.creator.email|default:DomainRequest.creator.get_formatted_name }} +
+ {% endif %} + + {% with statuses=DomainRequest.DomainRequestStatus last_submitted=DomainRequest.last_submitted_date|date:"F j, Y" first_submitted=DomainRequest.first_submitted_date|date:"F j, Y" %} + {% comment %} + These are intentionally seperated this way. + There is some code repetition, but it gives us more flexibility rather than a dense reduction. + Leave it this way until we've solidified our requirements. + {% endcomment %} + {% if DomainRequest.status == statuses.STARTED %} ++ Started on: {{DomainRequest.last_status_update|date:"F j, Y"}} +
+ {% elif DomainRequest.status == statuses.SUBMITTED %} ++ Submitted on: {{last_submitted|default:first_submitted }} +
++ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +
+ {% elif DomainRequest.status == statuses.ACTION_NEEDED %} ++ Submitted on: {{last_submitted|default:first_submitted }} +
++ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +
+ {% elif DomainRequest.status == statuses.REJECTED %} ++ Submitted on: {{last_submitted|default:first_submitted }} +
++ Rejected on: {{DomainRequest.last_status_update|date:"F j, Y"}} +
+ {% elif DomainRequest.status == statuses.WITHDRAWN %} ++ Submitted on: {{last_submitted|default:first_submitted }} +
++ Withdrawn on: {{DomainRequest.last_status_update|date:"F j, Y"}} +
+ {% else %} + {% comment %} Shown for in_review, approved, ineligible {% endcomment %} ++ Last updated on: {{DomainRequest.updated_at|date:"F j, Y"}} +
+ {% endif %} + {% if DomainRequest.status != 'rejected' %}{% include "includes/domain_request.html" %}
{% endif %} + {% endwith %}