Proper colors for TO statuses
This commit is contained in:
parent
7f4f857424
commit
1cb673af53
@ -15,7 +15,7 @@ class Status(Enum):
|
|||||||
ACTIVE = "Active"
|
ACTIVE = "Active"
|
||||||
UPCOMING = "Upcoming"
|
UPCOMING = "Upcoming"
|
||||||
EXPIRED = "Expired"
|
EXPIRED = "Expired"
|
||||||
UNSIGNED = "Unsigned"
|
UNSIGNED = "Not signed"
|
||||||
|
|
||||||
|
|
||||||
SORT_ORDERING = {
|
SORT_ORDERING = {
|
||||||
|
@ -4,6 +4,7 @@ from . import task_orders_bp
|
|||||||
from atst.domain.authz.decorator import user_can_access_decorator as user_can
|
from atst.domain.authz.decorator import user_can_access_decorator as user_can
|
||||||
from atst.domain.portfolios import Portfolios
|
from atst.domain.portfolios import Portfolios
|
||||||
from atst.domain.task_orders import TaskOrders
|
from atst.domain.task_orders import TaskOrders
|
||||||
|
from atst.models.task_order import Status
|
||||||
from atst.models import Permissions
|
from atst.models import Permissions
|
||||||
|
|
||||||
|
|
||||||
@ -32,4 +33,11 @@ def review_task_order(task_order_id):
|
|||||||
def portfolio_funding(portfolio_id):
|
def portfolio_funding(portfolio_id):
|
||||||
portfolio = Portfolios.get(g.current_user, portfolio_id)
|
portfolio = Portfolios.get(g.current_user, portfolio_id)
|
||||||
task_orders = TaskOrders.sort(portfolio.task_orders)
|
task_orders = TaskOrders.sort(portfolio.task_orders)
|
||||||
return render_template("portfolios/task_orders/index.html", task_orders=task_orders)
|
label_colors = {
|
||||||
|
Status.DRAFT: "warning",
|
||||||
|
Status.ACTIVE: "success",
|
||||||
|
Status.UPCOMING: "info",
|
||||||
|
Status.EXPIRED: "error",
|
||||||
|
Status.UNSIGNED: "purple"
|
||||||
|
}
|
||||||
|
return render_template("portfolios/task_orders/index.html", task_orders=task_orders, label_colors=label_colors)
|
||||||
|
@ -33,4 +33,8 @@
|
|||||||
&.label--success {
|
&.label--success {
|
||||||
background-color: $color-green;
|
background-color: $color-green;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.label--purple {
|
||||||
|
background-color: $color-purple;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,9 @@
|
|||||||
.task-order-card .label {
|
.task-order-card .label {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
margin-right: 2 * $gap;
|
margin-right: 2 * $gap;
|
||||||
|
min-width: 7rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-order-card__buttons .usa-button {
|
.task-order-card__buttons .usa-button {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
{% for task_order in task_orders %}
|
{% for task_order in task_orders %}
|
||||||
<div class="card task-order-card">
|
<div class="card task-order-card">
|
||||||
<div class="card__status">
|
<div class="card__status">
|
||||||
<span class='label label--{{ label }}'>{{ task_order.display_status }}</span>
|
<span class='label label--{{ label_colors[task_order.status] }}'>{{ task_order.display_status }}</span>
|
||||||
{{ TaskOrderDate(task_order) }}
|
{{ TaskOrderDate(task_order) }}
|
||||||
<span class="card__status-spacer"></span>
|
<span class="card__status-spacer"></span>
|
||||||
<span class="card__button">
|
<span class="card__button">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user