Display TOs grouped by status
This commit is contained in:
@@ -28,14 +28,8 @@ def review_task_order(task_order_id):
|
||||
@user_can(Permissions.VIEW_PORTFOLIO_FUNDING, message="view portfolio funding")
|
||||
def portfolio_funding(portfolio_id):
|
||||
portfolio = Portfolios.get(g.current_user, portfolio_id)
|
||||
task_orders = TaskOrders.sort(portfolio.task_orders)
|
||||
label_colors = {
|
||||
TaskOrderStatus.DRAFT: "warning",
|
||||
TaskOrderStatus.ACTIVE: "success",
|
||||
TaskOrderStatus.UPCOMING: "info",
|
||||
TaskOrderStatus.EXPIRED: "error",
|
||||
TaskOrderStatus.UNSIGNED: "purple",
|
||||
}
|
||||
task_orders = TaskOrders.sort_by_status(portfolio.task_orders)
|
||||
# TODO: Get expended amount from the CSP
|
||||
return render_template(
|
||||
"task_orders/index.html", task_orders=task_orders, label_colors=label_colors
|
||||
"task_orders/index.html", task_orders=task_orders
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user