diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 1c0f08d10..10fb3ed4f 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -1140,6 +1140,7 @@ document.addEventListener('DOMContentLoaded', function() { const statusCheckboxes = document.querySelectorAll('input[name="filter-status"]'); const statusIndicator = document.querySelector('.domain__filter-indicator'); const statusToggle = document.querySelector('.usa-button--filter'); + const noPortfolioFlag = document.getElementById('no-portfolio-js-flag'); /** * Loads rows in the domains list, as well as updates pagination around the domains list @@ -1176,6 +1177,17 @@ document.addEventListener('DOMContentLoaded', function() { const suborganization = domain.suborganization ? domain.suborganization : ''; const row = document.createElement('tr'); + + let markupForSuborganizationRow = ''; + + if (!noPortfolioFlag) { + markupForSuborganizationRow = ` + + ${suborganization} + + ` + } + row.innerHTML = ` ${domain.name} @@ -1196,9 +1208,7 @@ document.addEventListener('DOMContentLoaded', function() { - - ${suborganization} - + ${markupForSuborganizationRow}
+ {% if portfolio is None %}

Domain requests

diff --git a/src/registrar/templates/includes/domains_table.html b/src/registrar/templates/includes/domains_table.html index a04a6fec5..66b602970 100644 --- a/src/registrar/templates/includes/domains_table.html +++ b/src/registrar/templates/includes/domains_table.html @@ -2,16 +2,18 @@
+ {% if portfolio is None %}

Domains

+ {% endif %}
+ {% if portfolio %}
Filter by @@ -139,7 +142,10 @@ Domain name Expires Status - Suborganization + + {% if portfolio %} + Suborganization + {% endif %} +
{% block content %}