Skip to content

Commit

Permalink
fixes related to PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-kennedy-ecs committed Oct 16, 2024
1 parent 445af25 commit 928fe01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/registrar/assets/js/get-gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/registrar/templates/portfolio_member.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ <h2>More options</h2>
</address>

{% 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 %}
Expand Down

0 comments on commit 928fe01

Please sign in to comment.