Fix CTAs for funding page
This commit is contained in:
parent
06f4aeb74d
commit
13eb277f4a
@ -64,14 +64,26 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
else:
|
||||
raise TypeError("Could not set attachment with invalid type")
|
||||
|
||||
@property
|
||||
def is_draft(self):
|
||||
return self.status == Status.DRAFT
|
||||
|
||||
@property
|
||||
def is_active(self):
|
||||
return self.status == Status.ACTIVE
|
||||
|
||||
@property
|
||||
def is_upcoming(self):
|
||||
return self.status == Status.UPCOMING
|
||||
|
||||
@property
|
||||
def is_expired(self):
|
||||
return self.status == Status.EXPIRED
|
||||
|
||||
@property
|
||||
def is_unsigned(self):
|
||||
return self.status == Status.UNSIGNED
|
||||
|
||||
@property
|
||||
def is_completed(self):
|
||||
return all([self.pdf, self.number, len(self.clins)])
|
||||
@ -146,10 +158,6 @@ class TaskOrder(Base, mixins.TimestampsMixin):
|
||||
def portfolio_name(self):
|
||||
return self.portfolio.name
|
||||
|
||||
@property
|
||||
def is_pending(self):
|
||||
return self.status == Status.PENDING
|
||||
|
||||
def to_dictionary(self):
|
||||
return {
|
||||
"portfolio_name": self.portfolio_name,
|
||||
|
@ -82,6 +82,10 @@
|
||||
min-width: 10rem;
|
||||
}
|
||||
|
||||
.task-order-card__buttons .usa-button-secondary {
|
||||
min-width: 14rem;
|
||||
}
|
||||
|
||||
.task-order-summary {
|
||||
margin-top: $gap * 4;
|
||||
|
||||
|
@ -7,7 +7,13 @@
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% macro ViewLink(task_order, text="Edit") %}
|
||||
<a href="{{ url_for('task_orders.view_task_order', task_order_id=task_order.id) }}" class="usa-button">
|
||||
<a href="{{ url_for('task_orders.review_task_order', task_order_id=task_order.id) }}" class="usa-button">
|
||||
{{ text }}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro TaskOrderAction(task_order, text="Edit", route="review_task_order", secondary=False) %}
|
||||
<a href="{{ url_for('task_orders.' + route, task_order_id=task_order.id) }}" class="usa-button {{ 'usa-button-secondary' if secondary else '' }}">
|
||||
{{ text }}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
@ -30,12 +36,14 @@
|
||||
|
||||
{% macro TaskOrderActions(task_order) %}
|
||||
<div class="task-order-card__buttons">
|
||||
{% if task_order.is_pending %}
|
||||
{{ ViewLink(task_order, text="Edit") }}
|
||||
{% elif task_order.is_active %}
|
||||
{{ ViewLink(task_order, text="Modify") }}
|
||||
{% if task_order.is_draft %}
|
||||
{{ TaskOrderAction(task_order, text="Edit") }}
|
||||
{% elif task_order.is_expired %}
|
||||
{{ TaskOrderAction(task_order, text="View") }}
|
||||
{% elif task_order.is_unsigned %}
|
||||
{{ TaskOrderAction(task_order, text="Sign", secondary=True) }}
|
||||
{{ TaskOrderAction(task_order, text="View") }}
|
||||
{% else %}
|
||||
{{ ViewLink(task_order, text="View") }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user