Skip to content

Commit

Permalink
Fixes #5: Added view all tasks page
Browse files Browse the repository at this point in the history
  • Loading branch information
surajdm123 committed Nov 1, 2021
1 parent bae7cf8 commit eccfdfe
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 2 deletions.
12 changes: 11 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,17 @@ def getnewTaskID():
@app.route("/")
def homePage():
"""This function renders the home page."""
return render_template("index.html", data=refresh_data())
return render_template("home.html", data=refresh_data())

@app.route("/edit_task")
def edit_task():
"""This function renders the edit task page."""
return render_template("edit_task.html", data=refresh_data())

@app.route("/view_all_tasks")
def view_all_tasks():
"""This function renders the edit task page."""
return render_template("view_all_tasks.html", data=refresh_data())


@app.route("/update_user_info", methods = ["POST"])
Expand Down
2 changes: 1 addition & 1 deletion templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="col-sm-9 text-left main-content">
<div>
<a type="button" class="btn btn-outline-dark" href="#" class="card-link" data-toggle="modal" data-target="#exampleModalCenter" style="margin-left: 20px;">Add New Task</a>
<a type="button" class="btn btn-outline-primary" style="float: right; margin-right: 20px;" href="#" class="card-link">View All Tasks</a>
<a type="button" class="btn btn-outline-primary" style="float: right; margin-right: 20px;" href="/view_all_tasks" class="card-link">View All Tasks</a>

</div>

Expand Down
92 changes: 92 additions & 0 deletions templates/tasks/all_tasks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<div class="card status-card col-md" style="width: auto;">
<i class="material-icons card-icons">task</i>
<div class="card-body">
<h5 class="card-title">All Tasks</h5>
</div>
<table data-toggle="table" data-flat="true" data-search="true">
<thead>
<tr style="background-color: #D5D8DD; text-align: center;">
<th>Task</th>
<th data-sortable="true">Status</th>
<th>Category</th>
<th>Start Date</th>
<th>Due Date</th>
<th>Edit</th>
</tr>
</thead>
<tbody>
<tr>
<td>Finalize Kickoff Materials</td>
<td style="background-color: lightgreen;">Done</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href="/edit_task"><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Refine Objectives</td>
<td style="background-color: lightblue;">In Progress</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Identify Key Sources</td>
<td style="background-color: lightcoral;">Stuck</td>
<td>Refactoring</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Develop Communication Plan</td>
<td style="background-color: lightyellow;">Waiting</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Finalize Kickoff Materials</td>
<td style="background-color: lightgreen;">Done</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href="/edit_task"><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Refine Objectives</td>
<td style="background-color: lightblue;">In Progress</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Identify Key Sources</td>
<td style="background-color: lightcoral;">Stuck</td>
<td>Refactoring</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

<tr>
<td>Develop Communication Plan</td>
<td style="background-color: lightyellow;">Waiting</td>
<td>Development</td>
<td>18th October, 2021</td>
<td>18th October, 2021</td>
<td style="text-align: center;"><a href=""><i class="material-icons">edit</i></a></td>
</tr>

</tbody>
</table>
</div>
25 changes: 25 additions & 0 deletions templates/view_all_tasks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% extends "layout/base.html" %} {% block content %}

<div class="container-fluid">
<div class="row content">

<!-- Left Sidebar -->
<div class="col-sm-3 sidenav sidenav-left">

{% include 'layout/user_details.html' %}

</div>

<!-- Content -->
<div class="col-sm-9 text-left main-content">
<center>

<!-- View all tasks -->
{% include 'tasks/all_tasks.html' %}

</center>
</div>
</div>
</div>

{% endblock content %}

0 comments on commit eccfdfe

Please sign in to comment.