mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 10:16:13 +02:00
Cleanup
This commit is contained in:
parent
f624a496ff
commit
92abc78c3d
8 changed files with 6 additions and 34 deletions
|
@ -1,5 +1,4 @@
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
@use "cisa_colors" as *;
|
|
||||||
|
|
||||||
|
|
||||||
// Only apply this custom wrapping to desktop
|
// Only apply this custom wrapping to desktop
|
||||||
|
@ -29,4 +28,4 @@
|
||||||
|
|
||||||
#extended-logo .usa-tooltip__body {
|
#extended-logo .usa-tooltip__body {
|
||||||
font-weight: 400 !important;
|
font-weight: 400 !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,10 +256,3 @@ class Command(BaseCommand):
|
||||||
DomainInformation.objects.bulk_update(domain_infos, ["portfolio", "sub_organization"])
|
DomainInformation.objects.bulk_update(domain_infos, ["portfolio", "sub_organization"])
|
||||||
message = f"Added portfolio '{portfolio}' to {len(domain_infos)} domains"
|
message = f"Added portfolio '{portfolio}' to {len(domain_infos)} domains"
|
||||||
TerminalHelper.colorful_logger(logger.info, TerminalColors.OKGREEN, message)
|
TerminalHelper.colorful_logger(logger.info, TerminalColors.OKGREEN, message)
|
||||||
|
|
||||||
def handle_portfolio_members(self, portfolio: Portfolio, federal_agency: FederalAgency):
|
|
||||||
"""
|
|
||||||
Associate portfolio with members for a federal agency.
|
|
||||||
Updates all relevant member records.
|
|
||||||
"""
|
|
||||||
# TODO: future ticket?
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ from django.db.models.manager import BaseManager
|
||||||
from typing import List
|
from typing import List
|
||||||
from registrar.utility.enums import LogCode
|
from registrar.utility.enums import LogCode
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,9 @@
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
{% comment %}
|
||||||
<!-- ---------- Export as CSV ---------- -->
|
<!-- ---------- Export as CSV ---------- -->
|
||||||
{% if portfolio_members_count and portfolio_members_count > 0 %}
|
{% if portfolio_members and portfolio_members|length > 0 %}
|
||||||
<!--
|
<!--
|
||||||
=====================
|
=====================
|
||||||
TODO: future ticket?
|
TODO: future ticket?
|
||||||
|
@ -57,6 +58,7 @@
|
||||||
</section>
|
</section>
|
||||||
</div> -->
|
</div> -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endcomment %}
|
||||||
</div>
|
</div>
|
||||||
{% if portfolio %}
|
{% if portfolio %}
|
||||||
|
|
||||||
|
@ -188,19 +190,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="members__no-data display-none">
|
<div class="members__no-data display-none">
|
||||||
<p>You don't have any members.</p>
|
<p>You don't have any members.</p>
|
||||||
<!--
|
|
||||||
=====================
|
|
||||||
TODO: discard me?
|
|
||||||
=====================
|
|
||||||
-->
|
|
||||||
<!-- <p class="maxw-none clearfix">
|
|
||||||
<a href="https://get.gov/help/faq/#do-not-see-my-domain" class="float-right-tablet usa-link usa-link--icon" target="_blank">
|
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#help_outline"></use>
|
|
||||||
</svg>
|
|
||||||
Why don't I see my domain when I sign in to the registrar?
|
|
||||||
</a>
|
|
||||||
</p> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="members__no-search-results display-none">
|
<div class="members__no-search-results display-none">
|
||||||
<p>No results found</p>
|
<p>No results found</p>
|
||||||
|
|
|
@ -28,6 +28,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include "includes/members_table.html" with portfolio=portfolio portfolio_members_count=portfolio_members_count %}
|
{% include "includes/members_table.html" with portfolio=portfolio %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -356,11 +356,6 @@ class ExportDataTest(MockDbForIndividualTests, MockEppLib):
|
||||||
self.assertIn(self.domain_3.name, csv_content)
|
self.assertIn(self.domain_3.name, csv_content)
|
||||||
self.assertNotIn(self.domain_2.name, csv_content)
|
self.assertNotIn(self.domain_2.name, csv_content)
|
||||||
|
|
||||||
# Test the output for readonly admin
|
|
||||||
# portfolio_permission.roles = [UserPortfolioRoleChoices.ORGANIZATION_ADMIN_READ_ONLY]
|
|
||||||
# portfolio_permission.save()
|
|
||||||
# portfolio_permission.refresh_from_db()
|
|
||||||
|
|
||||||
# Get the csv content
|
# Get the csv content
|
||||||
csv_content = self._run_domain_data_type_user_export(request)
|
csv_content = self._run_domain_data_type_user_export(request)
|
||||||
self.assertIn(self.domain_1.name, csv_content)
|
self.assertIn(self.domain_1.name, csv_content)
|
||||||
|
|
|
@ -43,7 +43,6 @@ def get_portfolio_members_json(request):
|
||||||
for member in page_obj.object_list
|
for member in page_obj.object_list
|
||||||
]
|
]
|
||||||
|
|
||||||
# DEVELOPER'S NOTE (9-24-24):
|
|
||||||
# If you're wondering where these JSON values are used, check out the class "MembersTable"
|
# If you're wondering where these JSON values are used, check out the class "MembersTable"
|
||||||
# in get-gov.js (specifically the "loadTable" function).
|
# in get-gov.js (specifically the "loadTable" function).
|
||||||
#
|
#
|
||||||
|
@ -68,9 +67,6 @@ def get_portfolio_members_json(request):
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# This was added to handle NoneType error
|
|
||||||
# In other examples of we assume there will never be zero entries returned...which is *fine*...until
|
|
||||||
# something goes wrong.
|
|
||||||
return JsonResponse(
|
return JsonResponse(
|
||||||
{
|
{
|
||||||
"members": [],
|
"members": [],
|
||||||
|
|
|
@ -61,7 +61,6 @@ class PortfolioMembersView(PortfolioMembersPermissionView, View):
|
||||||
|
|
||||||
all_members = User.objects.filter(id__in=member_ids)
|
all_members = User.objects.filter(id__in=member_ids)
|
||||||
context["portfolio_members"] = all_members
|
context["portfolio_members"] = all_members
|
||||||
context["portfolio_members_count"] = all_members.count()
|
|
||||||
return render(request, "portfolio_members.html", context)
|
return render(request, "portfolio_members.html", context)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue