From 84ce4f237ec427e8c3ccc1d62b56600a83c46ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raynel=20S=C3=A1nchez?= Date: Fri, 13 May 2022 07:57:24 -0400 Subject: [PATCH] Started work for chef order management --- app.py | 11 +++- build/dashboard-chefprogress-order.html | 13 +++++ ...gress.html => dashboard-chefprogress.html} | 20 ++++--- build/dashboard-layout.html | 2 +- build/scripts/bids.js | 8 +-- build/scripts/chefprogress-orders.js | 52 +++++++++++++++++++ build/scripts/order-page-bidpicking.js | 3 +- build/scripts/order-page.js | 6 ++- build/scripts/sidebar.js | 4 +- build/styles/chefprogress.css | 37 ++++++++++++- build/styles/dashboard-layout.css | 8 +-- 11 files changed, 139 insertions(+), 25 deletions(-) create mode 100644 build/dashboard-chefprogress-order.html rename build/{chefprogress.html => dashboard-chefprogress.html} (73%) create mode 100644 build/scripts/chefprogress-orders.js diff --git a/app.py b/app.py index 6867205..205bc89 100644 --- a/app.py +++ b/app.py @@ -53,7 +53,16 @@ def deliverystatus(): return render_template("dashboard-deliverystat.html", nav = helpers.getSidebarNav(), currentUrl = '/dashboard/deliverystatus') @app.route('/dashboard/chefprogress') -def chefprogress(): return render_template("chefprogress.html", currentUrl = "/chefprogress", nav = helpers.getSidebarNav()) +def chefprogress(): + if helpers.isLoggedIn() and (helpers.isChef() or helpers.isManager()): + return render_template("dashboard-chefprogress.html", currentUrl = "/chefprogress", nav = helpers.getSidebarNav()) + else: return abort(403) + +@app.route('/dashboard/chefprogress/') +def orderstatus(id): + if helpers.isLoggedIn() and (helpers.isChef() or helpers.isManager()): + return render_template("dashboard-chefprogress-order.html", currentUrl = "/chefprogress", nav = helpers.getSidebarNav()) + else: return abort(403) @app.route('/login') def login(): diff --git a/build/dashboard-chefprogress-order.html b/build/dashboard-chefprogress-order.html new file mode 100644 index 0000000..c2411c8 --- /dev/null +++ b/build/dashboard-chefprogress-order.html @@ -0,0 +1,13 @@ +{% extends 'dashboard-layout.html' %} +{% block head %} + Dashboard: Home + +{% endblock %} + +{% block body %} +
+

Welcome to Dashboard

+ +
+ +{% if session.get('employeeType') == 'chef' %} \ No newline at end of file diff --git a/build/chefprogress.html b/build/dashboard-chefprogress.html similarity index 73% rename from build/chefprogress.html rename to build/dashboard-chefprogress.html index c476b6b..154fb9b 100644 --- a/build/chefprogress.html +++ b/build/dashboard-chefprogress.html @@ -1,23 +1,18 @@ {% extends 'dashboard-layout.html' %} {% block head %} - Dashboard: Home + Dashboard: Active Orders {% endblock %} {% block body %}
-

Welcome to Dashboard

+

Active Orders

{% if session.get('employeeType') == 'chef' %} -
-
-

You're a chef.

-
- - -
+
+ + +
{% else %} @@ -42,4 +39,5 @@

Order ready for delivery.

{% endif %} + {% endblock %} \ No newline at end of file diff --git a/build/dashboard-layout.html b/build/dashboard-layout.html index 8f4960b..9178c83 100644 --- a/build/dashboard-layout.html +++ b/build/dashboard-layout.html @@ -17,7 +17,7 @@ -