mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 03:58:39 +02:00
Remove extraneous imports
This commit is contained in:
parent
8cf3bb7819
commit
cd45c4a58f
3 changed files with 17 additions and 7 deletions
|
@ -1966,7 +1966,7 @@ class MembersTable extends LoadTableBase {
|
|||
let cancelInvitationButton = isMemberInvited ? "Cancel invitation" : "Remove member";
|
||||
|
||||
// TODO: Create a function to fetch how many domains the member MANAGES
|
||||
// Created get_user_domain_count figure out how to call here and maybe view?
|
||||
// Created get_user_domain_count figure out how to call here and maybe
|
||||
// let modalHeading = '';
|
||||
// let modalDescription = '';
|
||||
// If member manages 1 or more domains:
|
||||
|
@ -1979,11 +1979,11 @@ class MembersTable extends LoadTableBase {
|
|||
// modalDescription = `They will no longer be able to access this organization. \n
|
||||
// This action cannot be undone.`;
|
||||
|
||||
const modalSubmit = `
|
||||
const modalSubmit = g`
|
||||
<button type="button"
|
||||
class="usa-button usa-button--secondary usa-modal__submit"
|
||||
data-pk = ${member_id}
|
||||
name="">Yes, remove from organizaion</button>
|
||||
name="delete-member">Yes, remove from organizaion</button>
|
||||
`
|
||||
|
||||
const modal = document.createElement('div');
|
||||
|
@ -2180,7 +2180,7 @@ class MembersTable extends LoadTableBase {
|
|||
this.currentSearchTerm = searchTerm;
|
||||
})
|
||||
.catch(error => console.error('Error fetching members:', error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ from registrar.views.report_views import (
|
|||
# --jsons
|
||||
from registrar.views.domain_requests_json import get_domain_requests_json
|
||||
from registrar.views.domains_json import get_domains_json
|
||||
from registrar.views.portfolio_members_json import get_portfolio_members_json, get_user_domain_count
|
||||
from registrar.views.portfolio_members_json import get_portfolio_members_json # , get_user_domain_count
|
||||
from registrar.views.utility.api_views import (
|
||||
get_senior_official_from_federal_agency_json,
|
||||
get_federal_and_portfolio_types_from_federal_agency_json,
|
||||
|
|
|
@ -9,8 +9,9 @@ from django.db.models.functions import Cast
|
|||
from registrar.models.portfolio_invitation import PortfolioInvitation
|
||||
from registrar.models.user_portfolio_permission import UserPortfolioPermission
|
||||
from registrar.models.utility.portfolio_helper import UserPortfolioRoleChoices
|
||||
from registrar.models import DomainInformation, UserDomainRole
|
||||
from .models import User
|
||||
|
||||
# from registrar.models import DomainInformation, UserDomainRole
|
||||
# from .models import User
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -155,6 +156,15 @@ def serialize_members(request, portfolio, item, user):
|
|||
|
||||
view_only = not user.has_edit_members_portfolio_permission(portfolio) or not user_can_edit_other_users
|
||||
|
||||
# We only need to call user_portfolio_permissions.get_managed_domains_count()
|
||||
# What does it do: counts of domain by a specific user for the organization it's in
|
||||
|
||||
# For in progress requests: user.get_active_requests_count()
|
||||
# If they're is_admin AND user_portfolio_permissions.get_managed_domains_count() == 1
|
||||
# Portfolio == Organization
|
||||
# Question: Can a ORGANIZATION_ADMIN also be a SUBORGANIZATION_ADMIN?
|
||||
# Question: Does SUBORGANIZATION_ADMIN exist?
|
||||
|
||||
is_admin = UserPortfolioRoleChoices.ORGANIZATION_ADMIN in (item.get("roles") or [])
|
||||
action_url = reverse("member" if item["source"] == "permission" else "invitedmember", kwargs={"pk": item["id"]})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue