diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 337baf11c..8281aa50a 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -1926,6 +1926,8 @@ class MembersTable extends LoadTableBase { const memberList = document.querySelector('.members__table tbody'); memberList.innerHTML = ''; + const invited = 'Invited'; + data.members.forEach(member => { const member_name = member.name; const member_display = member.member_display; @@ -1937,7 +1939,7 @@ class MembersTable extends LoadTableBase { let last_active_sort_value = ''; // Handle 'Invited' or null/empty values differently from valid dates - if (last_active && last_active !== 'Invited') { + if (last_active && last_active !== invited) { try { // Try to parse the last_active as a valid date last_active = new Date(last_active); @@ -1953,9 +1955,9 @@ class MembersTable extends LoadTableBase { } } else { // Handle 'Invited' or null - last_active = 'Invited'; - last_active_formatted = 'Invited'; - last_active_sort_value = 'Invited'; // Keep 'Invited' as a sortable string + last_active = invited; + last_active_formatted = invited; + last_active_sort_value = invited; // Keep 'Invited' as a sortable string } const action_url = member.action_url; diff --git a/src/registrar/templates/portfolio_member.html b/src/registrar/templates/portfolio_member.html index 0275f84e9..f2ee8f4c5 100644 --- a/src/registrar/templates/portfolio_member.html +++ b/src/registrar/templates/portfolio_member.html @@ -119,9 +119,9 @@

More options

{% if portfolio_permission %} - {% include "includes/summary_item.html" with title='Member access and permissions' permissions=True value=portfolio_permission member_has_view_all_requests_portfolio_permission=member_has_view_all_requests_portfolio_permission member_has_edit_request_portfolio_permission=member_has_edit_request_portfolio_permission member_has_view_members_portfolio_permission=member_has_view_members_portfolio_permission member_has_edit_members_portfolio_permission=member_has_edit_members_portfolio_permission edit_link=edit_url editable=has_edit_members_portfolio_permission %} + {% include "includes/summary_item.html" with title='Member access and permissions' permissions=True value=portfolio_permission edit_link=edit_url editable=has_edit_members_portfolio_permission %} {% elif portfolio_invitation %} - {% include "includes/summary_item.html" with title='Member access and permissions' permissions=True value=portfolio_invitation member_has_view_all_requests_portfolio_permission=member_has_view_all_requests_portfolio_permission member_has_edit_request_portfolio_permission=member_has_edit_request_portfolio_permission member_has_view_members_portfolio_permission=member_has_view_members_portfolio_permission member_has_edit_members_portfolio_permission=member_has_edit_members_portfolio_permission edit_link=edit_url editable=has_edit_members_portfolio_permission %} + {% include "includes/summary_item.html" with title='Member access and permissions' permissions=True value=portfolio_invitation edit_link=edit_url editable=has_edit_members_portfolio_permission %} {% endif %} {% comment %}view_button is passed below as true in all cases. This is because manage_button logic will trump view_button logic; ie. if manage_button is true, view_button will never be looked at{% endcomment %}