Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Blizzard Blast
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
Martina Therese R. Reyes
Blizzard Blast
Commits
1ee72f60
Commit
1ee72f60
authored
Dec 13, 2021
by
Felizia Tiburcio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add alphabetical query
parent
abd497af
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
14 deletions
+82
-14
alphabetical_query.html
blizzardblast/templates/queries/alphabetical_query.html
+40
-0
manager_query.html
blizzardblast/templates/queries/manager_query.html
+1
-0
role_query.html
blizzardblast/templates/queries/role_query.html
+2
-0
week_query.html
blizzardblast/templates/queries/week_query.html
+2
-0
schedule.html
blizzardblast/templates/schedule.html
+2
-0
urls.py
main/urls.py
+5
-4
views.py
main/views.py
+30
-10
No files found.
blizzardblast/templates/queries/alphabetical_query.html
0 → 100644
View file @
1ee72f60
{% extends 'blizzardblast\templates\base.html' %}
{% load static %}
{% block title %}Schedule{% endblock %}
{% block styles %}
{% endblock %}
{% block content %}
<h1
class=
'view-title'
>
Schedule
</h1>
<div
id=
"filter-system-navbar"
>
<ul
class=
"navigation"
>
<li
class=
"navbar-item"
><a
href=
"{% url 'schedule' %}"
>
Show All
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'alphabetical_query' %}"
>
Employee
</a></li>
</ul>
</div>
<table
id=
"scheduling-table"
>
<tr>
<th>
Week
</th>
<th>
Staff
</th>
<th>
Role
</th>
<th>
Day-Mgr
</th>
</tr>
{% for a in alphabetical %}
<tr>
<td>
{{a.role_date}}
</td>
<td>
{{a.employee.employee_name}}
</td>
<td>
{{a.role_description}}
</td>
<td>
{{a.is_manager}}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
blizzardblast/templates/queries/manager_query.html
View file @
1ee72f60
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'alphabetical_query' %}"
>
Employee
</a></li>
</ul>
</ul>
</div>
</div>
<table
id=
"scheduling-table"
>
<table
id=
"scheduling-table"
>
...
...
blizzardblast/templates/queries/role_query.html
View file @
1ee72f60
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'alphabetical_query' %}"
>
Employee
</a></li>
</ul>
</ul>
</div>
</div>
<table
id=
"scheduling-table"
>
<table
id=
"scheduling-table"
>
...
...
blizzardblast/templates/queries/week_query.html
View file @
1ee72f60
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'alphabetical_query' %}"
>
Employee
</a></li>
</ul>
</ul>
</div>
</div>
<table
id=
"scheduling-table"
>
<table
id=
"scheduling-table"
>
...
...
blizzardblast/templates/schedule.html
View file @
1ee72f60
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'manager_query' %}"
>
Manager (Y/N)
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'week_query' %}"
>
Week
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'role_query' %}"
>
Role
</a></li>
<li
class=
"navbar-item"
><a
href=
"{% url 'alphabetical_query' %}"
>
Employee
</a></li>
</ul>
</ul>
</div>
</div>
...
...
main/urls.py
View file @
1ee72f60
...
@@ -9,9 +9,10 @@ urlpatterns = [
...
@@ -9,9 +9,10 @@ urlpatterns = [
path
(
'report'
,
report
,
name
=
'report'
),
path
(
'report'
,
report
,
name
=
'report'
),
path
(
'receipt'
,
receipt
,
name
=
'receipt'
),
path
(
'receipt'
,
receipt
,
name
=
'receipt'
),
path
(
'addorder'
,
addorder
,
name
=
'addorder'
),
path
(
'addorder'
,
addorder
,
name
=
'addorder'
),
path
(
'addinventory'
,
addinventory
,
name
=
'addinventory'
)
path
(
'addinventory'
,
addinventory
,
name
=
'addinventory'
)
,
path
(
'manager_query'
,
manager_query
,
name
=
'manager_query'
),
path
(
'manager_query'
,
manager_query
,
name
=
'manager_query'
),
path
(
'week_query'
,
week_query
,
name
=
'week_query'
),
path
(
'week_query'
,
week_query
,
name
=
'week_query'
),
path
(
'role_query'
,
role_query
,
name
=
'role_query'
)
path
(
'role_query'
,
role_query
,
name
=
'role_query'
),
path
(
'alphabetical_query'
,
alphabetical_query
,
name
=
'alphabetical_query'
)
]
]
main/views.py
View file @
1ee72f60
...
@@ -23,41 +23,60 @@ def inventory(request):
...
@@ -23,41 +23,60 @@ def inventory(request):
def
schedule
(
request
):
def
schedule
(
request
):
all_values
=
EmployeeRole
.
objects
.
all
()
all_values
=
EmployeeRole
.
objects
.
all
()
# 2: FILTER EMPLOYEES AND ROLES IN ALPHABETICAL ORDER - felizia
employee_role_order_query
=
EmployeeRole
.
objects
.
all
()
.
order_by
(
'role_description'
)
# 5: FILTER EMPLOYEES AND ROLES BY DATE IN ORDER - xx
# 5: FILTER EMPLOYEES AND ROLES BY DATE IN ORDER - xx
date_order_query
=
EmployeeRole
.
objects
.
all
()
.
order_by
(
'role_date'
)
date_order_query
=
EmployeeRole
.
objects
.
all
()
.
order_by
(
'role_date'
)
return
render
(
request
,
"blizzardblast/templates/schedule.html"
,
{
return
render
(
request
,
"blizzardblast/templates/schedule.html"
,
{
'all_values'
:
all_values
'all_values'
:
all_values
}
}
)
)
# 1: FILTER EMPLOYEES BY MANAGER FOR THE DAY - mate
# 1: FILTER EMPLOYEES BY MANAGER FOR THE DAY - mate
def
manager_query
(
request
):
def
manager_query
(
request
):
ismanager_query
=
EmployeeRole
.
objects
.
all
()
.
filter
(
is_manager
=
'Y'
)
ismanager_query
=
EmployeeRole
.
objects
.
all
()
.
filter
(
is_manager
=
'Y'
)
return
render
(
request
,
"blizzardblast/templates/queries/manager_query.html"
,
{
'manager'
:
ismanager_query
})
return
render
(
request
,
"blizzardblast/templates/queries/manager_query.html"
,
{
'manager'
:
ismanager_query
})
# 3 : FILTER BY WEEK - dedz
# 3 : FILTER BY WEEK - dedz
def
week_query
(
request
):
def
week_query
(
request
):
week_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_date__range
=
[
"2025-09-01"
,
"2025-09-06"
])
.
order_by
(
'role_date'
)
week_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
week_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_date__range
=
[
"2025-09-08"
,
"2025-09-13"
])
.
order_by
(
'role_date'
)
role_date__range
=
[
"2025-09-01"
,
"2025-09-06"
])
.
order_by
(
'role_date'
)
week_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_date__range
=
[
"2025-09-08"
,
"2025-09-13"
])
.
order_by
(
'role_date'
)
return
render
(
request
,
"blizzardblast/templates/queries/week_query.html"
,
{
return
render
(
request
,
"blizzardblast/templates/queries/week_query.html"
,
{
'week_query1'
:
week_query1
,
'week_query2'
:
week_query2
'week_query1'
:
week_query1
,
'week_query2'
:
week_query2
}
}
)
)
# 4: FILTER EMPLOYEES BY ROLES - xtine
# 4: FILTER EMPLOYEES BY ROLES - xtine
def
role_query
(
request
):
def
role_query
(
request
):
role_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cashier'
)
role_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cashier'
)
role_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Preparation'
)
role_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Preparation'
)
role_query3
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cleaning'
)
role_query3
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cleaning'
)
return
render
(
request
,
"blizzardblast/templates/queries/role_query.html"
,
{
return
render
(
request
,
"blizzardblast/templates/queries/role_query.html"
,
{
'cashier'
:
role_query1
,
'preparation'
:
role_query2
,
'cleaning'
:
role_query3
'cashier'
:
role_query1
,
'preparation'
:
role_query2
,
'cleaning'
:
role_query3
}
}
)
)
def
alphabetical_query
(
request
):
# 2: FILTER EMPLOYEES IN ALPHABETICAL ORDER - felizia
alphabetical_query
=
EmployeeRole
.
objects
.
order_by
(
'employee__employee_name'
)
for
i
in
alphabetical_query
:
print
(
i
)
return
render
(
request
,
"blizzardblast/templates/queries/alphabetical_query.html"
,
{
'alphabetical'
:
alphabetical_query
})
def
report
(
request
):
def
report
(
request
):
return
render
(
request
,
"blizzardblast/templates/report.html"
)
return
render
(
request
,
"blizzardblast/templates/report.html"
)
...
@@ -66,6 +85,7 @@ def addorder(request):
...
@@ -66,6 +85,7 @@ def addorder(request):
form
=
AddOrderForm
()
form
=
AddOrderForm
()
return
render
(
request
,
"blizzardblast/templates/addorder.html"
,
{
'form'
:
form
})
return
render
(
request
,
"blizzardblast/templates/addorder.html"
,
{
'form'
:
form
})
def
addinventory
(
request
):
def
addinventory
(
request
):
form
=
AddInventoryForm
()
form
=
AddInventoryForm
()
return
render
(
request
,
"blizzardblast/templates/addinventory.html"
,
{
'inventory_form'
:
form
})
return
render
(
request
,
"blizzardblast/templates/addinventory.html"
,
{
'inventory_form'
:
form
})
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