View Primary Point of Contact (non-PoC)
This commit is contained in:
parent
3012e3b364
commit
3464de340d
@ -34,6 +34,7 @@ def portfolio_admin(portfolio_id):
|
||||
"portfolios/admin.html",
|
||||
form=form,
|
||||
portfolio=portfolio,
|
||||
current_user=g.current_user,
|
||||
audit_events=audit_events,
|
||||
)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div class="panel">
|
||||
<div class="panel__content">
|
||||
<h2>Primary Point of Contact</h2>
|
||||
<p>The PoC has the ability to edit all aspects of a portfolio.</p>
|
||||
<h2>{{ "fragments.ppoc.title" | translate }}</h2>
|
||||
<p>{{ "fragments.ppoc.subtitle" | translate }}</p>
|
||||
|
||||
<p>
|
||||
<strong>
|
||||
@ -14,10 +14,12 @@
|
||||
{{ portfolio.owner.phone_number | usPhone }}
|
||||
</p>
|
||||
|
||||
{% if portfolio.owner == current_user %}
|
||||
<div class="flex-reverse-row">
|
||||
<a class="usa-button-primary">
|
||||
Update Primary PoC
|
||||
{{ "fragments.ppoc.update_btn" | translate }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,13 @@
|
||||
from flask import url_for
|
||||
|
||||
from atst.domain.permission_sets import PermissionSets
|
||||
from atst.models.permissions import Permissions
|
||||
|
||||
from tests.factories import (
|
||||
random_future_date,
|
||||
random_past_date,
|
||||
PortfolioFactory,
|
||||
PortfolioRoleFactory,
|
||||
TaskOrderFactory,
|
||||
UserFactory,
|
||||
)
|
||||
@ -48,7 +52,7 @@ def test_portfolio_index_without_existing_portfolios(client, user_session):
|
||||
)
|
||||
|
||||
|
||||
def test_portfolio_admin_screen(client, user_session):
|
||||
def test_portfolio_admin_screen_when_ppoc(client, user_session):
|
||||
portfolio = PortfolioFactory.create()
|
||||
user_session(portfolio.owner)
|
||||
response = client.get(
|
||||
@ -56,6 +60,23 @@ def test_portfolio_admin_screen(client, user_session):
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert portfolio.name in response.data.decode()
|
||||
assert translate("fragments.ppoc.update_btn").encode("utf8") in response.data
|
||||
|
||||
|
||||
def test_portfolio_admin_screen_when_not_ppoc(client, user_session):
|
||||
portfolio = PortfolioFactory.create()
|
||||
user = UserFactory.create()
|
||||
permission_sets = PermissionSets.get_all()
|
||||
PortfolioRoleFactory.create(
|
||||
portfolio=portfolio, user=user, permission_sets=permission_sets
|
||||
)
|
||||
user_session(user)
|
||||
response = client.get(
|
||||
url_for("portfolios.portfolio_admin", portfolio_id=portfolio.id)
|
||||
)
|
||||
assert response.status_code == 200
|
||||
assert portfolio.name in response.data.decode()
|
||||
assert translate("fragments.ppoc.update_btn").encode("utf8") not in response.data
|
||||
|
||||
|
||||
def test_portfolio_reports(client, user_session):
|
||||
|
@ -304,6 +304,10 @@ fragments:
|
||||
bullet_3: Add both the Task Order (TO) and Line(s) of Accounting (LOA) numbers
|
||||
portfolio_admin:
|
||||
none: Not Selected
|
||||
ppoc:
|
||||
title: Primary Point of Contact
|
||||
subtitle: The PoC has the ability to edit all aspects of a portfolio.
|
||||
update_btn: Update Primary PoC
|
||||
login:
|
||||
ccpo_logo_alt_text: Cloud Computing Program Office Logo
|
||||
certificate_selection:
|
||||
|
Loading…
x
Reference in New Issue
Block a user