Skip to content

Commit

Permalink
did small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrutiAggarwal99 committed Jan 15, 2020
1 parent 73c292b commit 9fa26fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions customerapp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ def checkin():
return render_template("scanQR.html")


@app.route("/fill-details", methods=['GET','POST'])
def fillcustomerdetails():
@app.route("/fill-details/<int:table_no>", methods=['GET','POST'])
def fillcustomerdetails(table_no):
"""render page for filling in customer details"""

session.logged_in = True
if request.method == 'POST': # with QR code of the table
form = CustomerDetailsForm(request.form)
return render_template("fill-details.html", session=session)
form = CustomerDetailsForm()
return render_template("fill-details.html", table_no = table_no, session=session)
else:
form = CustomerDetailsForm()
return render_template("fill-details.html", form=form, session=session)
Expand Down Expand Up @@ -172,6 +172,9 @@ def menu():
def placeorder(id): # id is the "id" of the order being placed through menu.html page
"""render the the order and bill summary page : order.html"""

# TO DO : add the order details returned by menu.html (maybe json object) to the Orders table


# TO DO : fetch the details of the concerned order from "Orders" table
current_order = Orders.query.get_or_404(id)

Expand Down
2 changes: 1 addition & 1 deletion customerapp/templates/fill-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h1>Register</h1>
{{render_field(form.no_of_guests, class_="form-control")}}
</div>
<div class="form-group">
{{render_field(form.table_no, class_="form-control")}}
{{render_field(form.table_no, class_="form-control", value = table_no)}}
</div>

<p><input type="submit" class="btn btn-primary" value="Continue"></p>
Expand Down
Binary file modified customerapp/test.db
Binary file not shown.

0 comments on commit 9fa26fb

Please sign in to comment.