Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GrabGrub
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matthew Dominic M. Dizon
GrabGrub
Commits
459822c4
Commit
459822c4
authored
May 27, 2021
by
Jansen Lao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.discs.ateneo.edu/nozid_matthew/grabgrub
parents
f4ca1637
59e047a2
Pipeline
#1928
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
update_order.html
GrabGrub/Kiosk/templates/Kiosk/update_order.html
+2
-2
view_order_details.html
GrabGrub/Kiosk/templates/Kiosk/view_order_details.html
+4
-7
urls.py
GrabGrub/Kiosk/urls.py
+1
-0
views.py
GrabGrub/Kiosk/views.py
+3
-0
No files found.
GrabGrub/Kiosk/templates/Kiosk/update_order.html
View file @
459822c4
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
{% load static %}
{% load static %}
{% block content %}
{% block content %}
</div>
<div
class=
"card w-75"
>
<div
class=
"card w-75"
>
<div
class=
"card-header"
>
<div
class=
"card-header"
>
Order Details:
Order Details:
...
@@ -21,7 +20,7 @@
...
@@ -21,7 +20,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"name"
>
Date of Order:
</label>
<label
for=
"name"
>
Date of Order:
</label>
<input
type=
"
date
"
class=
"form-control"
id=
"date"
name=
"date"
value=
"{{order.ordered_at}}"
disabled
>
<input
type=
"
text
"
class=
"form-control"
id=
"date"
name=
"date"
value=
"{{order.ordered_at}}"
disabled
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -46,4 +45,5 @@
...
@@ -46,4 +45,5 @@
</form>
</form>
</div>
</div>
<a
href=
"{% url 'view_order_details' order.pk %}"
><button
class=
"btn btn-secondary"
>
Back
</button></a>
{% endblock %}
{% endblock %}
GrabGrub/Kiosk/templates/Kiosk/view_order_details.html
View file @
459822c4
...
@@ -14,11 +14,8 @@
...
@@ -14,11 +14,8 @@
<li
class=
"list-group-item"
><span
style=
"color: #8AB4F8; font-weight:bold"
>
Mode of Payment:
</span>
{{order.payment_mode}}
</li>
<li
class=
"list-group-item"
><span
style=
"color: #8AB4F8; font-weight:bold"
>
Mode of Payment:
</span>
{{order.payment_mode}}
</li>
</ul>
</ul>
</div>
</div>
<form
action=
"#"
method=
"post"
>
{% csrf_token %}
<a
href=
"{% url 'update_order' order.pk %}"
><button
class=
"btn btn-primary"
>
Update Order
</button></a>
<input
type=
"hidden"
name=
"message"
value=
"Bottle deleted successfully"
>
<a
href=
"{% url 'delete_order' order.pk %}"
><button
class=
"btn btn-danger my-4"
>
Delete Order
</button></a>
<a
href=
"#"
><button
class=
"btn btn-secondary my-4"
>
Delete Order
</button></a>
<a
href=
"{% url 'home' %}"
><button
class=
"btn btn-secondary"
>
Back
</button></a>
</form>
<a
href=
"{% url 'update_order' order.pk %}"
><button
type=
"submit"
class=
"mt-3 btn btn-primary"
>
Update Order
</button></a>
<a
onclick=
"window.history.go(-1); return false;"
><button
class=
"btn btn-secondary"
>
Back
</button></a>
{% endblock %}
{% endblock %}
\ No newline at end of file
GrabGrub/Kiosk/urls.py
View file @
459822c4
...
@@ -12,6 +12,7 @@ urlpatterns = [
...
@@ -12,6 +12,7 @@ urlpatterns = [
path
(
'view_order_details/<int:pk>'
,
views
.
view_order_details
,
name
=
"view_order_details"
),
path
(
'view_order_details/<int:pk>'
,
views
.
view_order_details
,
name
=
"view_order_details"
),
path
(
'update_order/<int:pk>'
,
views
.
update_order
,
name
=
"update_order"
),
path
(
'update_order/<int:pk>'
,
views
.
update_order
,
name
=
"update_order"
),
path
(
'add_order'
,
views
.
add_order
,
name
=
"add_order"
),
path
(
'add_order'
,
views
.
add_order
,
name
=
"add_order"
),
path
(
'delete_order/<int:pk>'
,
views
.
delete_order
,
name
=
"delete_order"
),
# Path for Food Model
# Path for Food Model
path
(
'add_food'
,
views
.
add_food
,
name
=
"add_food"
),
path
(
'add_food'
,
views
.
add_food
,
name
=
"add_food"
),
path
(
'foods'
,
views
.
view_foods
,
name
=
"view_foods"
),
path
(
'foods'
,
views
.
view_foods
,
name
=
"view_foods"
),
...
...
GrabGrub/Kiosk/views.py
View file @
459822c4
...
@@ -132,6 +132,9 @@ def add_food(request):
...
@@ -132,6 +132,9 @@ def add_food(request):
else
:
else
:
return
render
(
request
,
'Kiosk/add_food.html'
)
return
render
(
request
,
'Kiosk/add_food.html'
)
def
delete_order
(
request
,
pk
):
Order
.
objects
.
filter
(
pk
=
pk
)
.
delete
()
return
redirect
(
'home'
)
### Views for Food Model
### Views for Food Model
def
view_foods
(
request
):
def
view_foods
(
request
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment