-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2725: member management page - [NL] #2837
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
6954c1c
Initial Scaffolding (in progress)
CocoByte 64b62f1
Initial scaffold for members page completed
CocoByte 7bd0b06
Merge remote-tracking branch 'origin/main' into nl/2725-member-manage…
CocoByte d7fa9e8
data loads now
CocoByte ecf2e4d
Updated data, added manage/view icon, search & sort functionality
CocoByte 2122745
Add member button (scaffold)
CocoByte 64e623e
Delete permission settings around "add member" button
CocoByte 5e2a1ce
Added admin tag, added user invites logic
CocoByte 21b7cba
Merge remote-tracking branch 'origin/main' into nl/2725-member-manage…
CocoByte a8b26e3
Delete Admin read-only (comment out, just in case)
CocoByte b85c031
Update comments
CocoByte 8937892
Adjust permissions so admins do not automatically have ability to vie…
CocoByte 8673bc8
Cleanup
CocoByte 1ad805b
linted
CocoByte 91553ab
Removed unnecessary SCSS color override for tags
CocoByte 140d342
Added logic for restricting editing members to only those who can edi…
CocoByte 6ca8f69
Added some unit tests (need to fix failures still)
CocoByte 08583ae
Cleanup logs / linted
CocoByte 3dbb8f0
Unit test tweaks (still needs work)
CocoByte 35fec1e
fixed unit tests
CocoByte ada24a6
JK on last commit -- more unit test fixes
CocoByte 8508c99
added a test
CocoByte 93fbfa3
linted
CocoByte 6118ca1
fixes
CocoByte f624a49
last fix...
CocoByte 92abc78
Cleanup
zandercymatics b84beef
Update create_federal_portfolio.py
zandercymatics fe31dbd
Update members_table.html
zandercymatics 95cf224
Update src/registrar/tests/test_views_portfolio.py
zandercymatics c85ef25
Pr suggestions ( minus tests )
zandercymatics 18e4647
Merge branch 'nl/2725-member-management-page' of github.com:cisagov/m…
zandercymatics 7b09b35
fix bug
zandercymatics 72afa03
pass in portfolio
zandercymatics 4e9a58b
fix tests
zandercymatics b497931
fix sorting + unit tests
zandercymatics d451297
lint
zandercymatics 76473e2
fix test
zandercymatics File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/registrar/migrations/0129_alter_portfolioinvitation_portfolio_roles_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Generated by Django 4.2.10 on 2024-09-25 00:49 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("registrar", "0128_alter_domaininformation_state_territory_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="portfolioinvitation", | ||
name="portfolio_roles", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField( | ||
choices=[("organization_admin", "Admin"), ("organization_member", "Member")], max_length=50 | ||
), | ||
blank=True, | ||
help_text="Select one or more roles.", | ||
null=True, | ||
size=None, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="userportfoliopermission", | ||
name="roles", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.CharField( | ||
choices=[("organization_admin", "Admin"), ("organization_member", "Member")], max_length=50 | ||
), | ||
blank=True, | ||
help_text="Select one or more roles.", | ||
null=True, | ||
size=None, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{% load static %} | ||
|
||
<!-- Embedding the portfolio value in a data attribute --> | ||
<span id="portfolio-js-value" class="display-none" data-portfolio="{{ portfolio.id }}"></span> | ||
{% comment %} Stores the json endpoint in a url for easier access {% endcomment %} | ||
{% url 'get_portfolio_members_json' as url %} | ||
<span id="get_members_json_url" class="display-none">{{url}}</span> | ||
<section class="section-outlined members margin-top-0 section-outlined--border-base-light" id="members"> | ||
<div class="section-outlined__header margin-bottom-3 grid-row"> | ||
<!-- ---------- SEARCH ---------- --> | ||
<div class="section-outlined__search mobile:grid-col-12 desktop:grid-col-6"> | ||
<section aria-label="Members search component" class="margin-top-2"> | ||
<form class="usa-search usa-search--small" method="POST" role="search"> | ||
{% csrf_token %} | ||
<button class="usa-button usa-button--unstyled margin-right-3 members__reset-search display-none" type="button"> | ||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24"> | ||
<use xlink:href="{%static 'img/sprite.svg'%}#close"></use> | ||
</svg> | ||
Reset | ||
</button> | ||
<label class="usa-sr-only" for="members__search-field">Search by member name</label> | ||
<input | ||
class="usa-input" | ||
id="members__search-field" | ||
type="search" | ||
name="search" | ||
placeholder="Search by member name" | ||
/> | ||
<button class="usa-button" type="submit" id="members__search-field-submit"> | ||
<img | ||
src="{% static 'img/usa-icons-bg/search--white.svg' %}" | ||
class="usa-search__submit-icon" | ||
alt="Search" | ||
/> | ||
</button> | ||
</form> | ||
</section> | ||
</div> | ||
</div> | ||
|
||
<!-- ---------- MAIN TABLE ---------- --> | ||
<div class="members__table-wrapper display-none usa-table-container--scrollable margin-top-0" tabindex="0"> | ||
<table class="usa-table usa-table--borderless usa-table--stacked dotgov-table dotgov-table--stacked members__table"> | ||
<caption class="sr-only">Your registered members</caption> | ||
<thead> | ||
<tr> | ||
<th data-sortable="member" scope="col" role="columnheader">Member</th> | ||
<th data-sortable="last_active" scope="col" role="columnheader">Last Active</th> | ||
<th | ||
scope="col" | ||
role="columnheader" | ||
> | ||
<span class="usa-sr-only">Action</span> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<!-- AJAX will populate this tbody --> | ||
</tbody> | ||
</table> | ||
<div | ||
class="usa-sr-only usa-table__announcement-region" | ||
aria-live="polite" | ||
></div> | ||
</div> | ||
<div class="members__no-data display-none"> | ||
<p>You don't have any members.</p> | ||
</div> | ||
<div class="members__no-search-results display-none"> | ||
<p>No results found</p> | ||
</div> | ||
</section> | ||
<nav aria-label="Pagination" class="usa-pagination flex-justify" id="members-pagination"> | ||
<span class="usa-pagination__counter text-base-dark padding-left-2 margin-bottom-1"> | ||
<!-- Count will be dynamically populated by JS --> | ||
</span> | ||
<ul class="usa-pagination__list"> | ||
<!-- Pagination links will be dynamically populated by JS --> | ||
</ul> | ||
</nav> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tagging for myself: figure out why these were deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with Alysia. It is regarding the AC where admins cannot, by default, view or edit members. The AC says "this needs to be layered on", and it was clarified to me that this meant deleting these permissions from admin so that they have to be explicitly added in "additional permissions"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thank you @CocoByte!