Skip to content

Commit

Permalink
moved order history to dashboard tab for customers
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal Yang authored and Crystal Yang committed May 13, 2022
1 parent c184ea4 commit 88f7b2b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def checkout():
if not helpers.isCustomer(): return render_template("checkout.html", login = True)
return render_template("checkout.html", login = False)

@app.route('/orderhistory')
@app.route('/dashboard/orderhistory')
def orderhistory(): return render_template("orderhistory.html", currentUrl = "/orderhistory", nav = helpers.getNav())

@app.route('/orders/<id>')
Expand Down
6 changes: 3 additions & 3 deletions build/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<meta charset = "utf-8">
<title>Denisse's Cafe Homepage</title>
<link rel="stylesheet" href="./styles/layout.css">
<script src="./scripts/helpers.js"></script>
<link rel="stylesheet" href="/styles/layout.css">
<script src="/scripts/helpers.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
{% block styles %}{% endblock %}
</head>
<body>
<div class="itembar">
<a href="/"><img src="./imgs/Logo.png" width="200px"></a>
<a href="/"><img src="/imgs/Logo.png" width="200px"></a>
<div class="options">

{%for navItem in nav%}
Expand Down
8 changes: 4 additions & 4 deletions build/orderhistory.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% extends 'layout.html' %}

{% block styles %}
<link rel = "stylesheet" href = "./styles/main.css">
<link rel = "stylesheet" href = "./styles/cart.css">
<link rel = "stylesheet" href = "./styles/orderhistory.css">
<link rel = "stylesheet" href = "/styles/main.css">
<link rel = "stylesheet" href = "/styles/cart.css">
<link rel = "stylesheet" href = "/styles/orderhistory.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<script src="./scripts/cart.js"></script>
<script src="/scripts/cart.js"></script>
{% endblock %}

{% block body %}
Expand Down
Binary file modified database/database.db
Binary file not shown.
1 change: 1 addition & 0 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def getSidebarNav():
{'url': '/', 'name': 'Home'},
{'url': '/dashboard', 'name': 'Dashboard'},
{'url': '/dashboard/wallet', 'name' : 'Wallet'},
{'url': '/dashboard/orderhistory', 'name' : 'Order History'},
{'url': '/dashboard/settings', 'name' : 'Settings'},
{'url': '/logout', 'name':'Logout'},
]
Expand Down

0 comments on commit 88f7b2b

Please sign in to comment.