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
abd497af
Commit
abd497af
authored
Dec 12, 2021
by
Martina Therese R. Reyes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'MateBranch'
parents
de12c436
ee18406f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
189 additions
and
20 deletions
+189
-20
styles.css
blizzardblast/static/css/styles.css
+1
-1
manager_query.html
blizzardblast/templates/queries/manager_query.html
+38
-0
role_query.html
blizzardblast/templates/queries/role_query.html
+57
-0
week_query.html
blizzardblast/templates/queries/week_query.html
+47
-0
schedule.html
blizzardblast/templates/schedule.html
+17
-5
urls.py
main/urls.py
+5
-1
views.py
main/views.py
+24
-13
No files found.
blizzardblast/static/css/styles.css
View file @
abd497af
...
...
@@ -24,7 +24,7 @@ ul {
padding
:
0
;
}
#nav-bar
{
#
filter-system-navbar
,
#
nav-bar
{
display
:
flex
;
justify-content
:
center
;
border-top
:
1px
#3B3355
solid
;
...
...
blizzardblast/templates/queries/manager_query.html
0 → 100644
View file @
abd497af
{% 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>
</ul>
</div>
<table
id=
"scheduling-table"
>
<tr>
<th>
Week
</th>
<th>
Staff
</th>
<th>
Role
</th>
<th>
Day-Mgr
</th>
</tr>
{% for m in manager%}
<tr>
<td>
{{m.role_date}}
</td>
<td>
{{m.employee.employee_name}}
</td>
<td>
{{m.role_description}}
</td>
<td>
{{m.is_manager}}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
blizzardblast/templates/queries/role_query.html
0 → 100644
View file @
abd497af
{% 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>
</ul>
</div>
<table
id=
"scheduling-table"
>
<tr>
<th>
Week
</th>
<th>
Staff
</th>
<th>
Role
</th>
<th>
Day-Mgr
</th>
</tr>
{% for c in cashier%}
<tr>
<td>
{{c.role_date}}
</td>
<td>
{{c.employee.employee_name}}
</td>
<td>
{{c.role_description}}
</td>
<td>
{{c.is_manager}}
</td>
</tr>
{% endfor %}
{% for p in preparation %}
<tr>
<td>
{{p.role_date}}
</td>
<td>
{{p.employee.employee_name}}
</td>
<td>
{{p.role_description}}
</td>
<td>
{{p.is_manager}}
</td>
</tr>
{% endfor %}
{% for cl in cleaning %}
<tr>
<td>
{{cl.role_date}}
</td>
<td>
{{cl.employee.employee_name}}
</td>
<td>
{{cl.role_description}}
</td>
<td>
{{cl.is_manager}}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
blizzardblast/templates/queries/week_query.html
0 → 100644
View file @
abd497af
{% 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>
</ul>
</div>
<table
id=
"scheduling-table"
>
<tr>
<th>
Week
</th>
<th>
Staff
</th>
<th>
Role
</th>
<th>
Day-Mgr
</th>
</tr>
{% for q1 in week_query1%}
<tr>
<td>
{{q1.role_date}}
</td>
<td>
{{q1.employee.employee_name}}
</td>
<td>
{{q1.role_description}}
</td>
<td>
{{q1.is_manager}}
</td>
</tr>
{% endfor %}
{% for q2 in week_query2 %}
<tr>
<td>
{{q2.role_date}}
</td>
<td>
{{q2.employee.employee_name}}
</td>
<td>
{{q2.role_description}}
</td>
<td>
{{q2.is_manager}}
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
blizzardblast/templates/schedule.html
View file @
abd497af
...
...
@@ -9,6 +9,16 @@
{% 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>
</ul>
</div>
<table
id=
"scheduling-table"
>
<tr>
<th>
Week
</th>
...
...
@@ -17,14 +27,16 @@
<th>
Day-Mgr
</th>
</tr>
{% for
m in manager
%}
{% for
a in all_values
%}
<tr>
<td>
{{
m
.role_date}}
</td>
<td>
{{
m
.employee.employee_name}}
</td>
<td>
{{
m
.role_description}}
</td>
<td>
{{
m
.is_manager}}
</td>
<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 %}
main/urls.py
View file @
abd497af
...
...
@@ -8,6 +8,10 @@ urlpatterns = [
path
(
'schedule'
,
schedule
,
name
=
'schedule'
),
path
(
'report'
,
report
,
name
=
'report'
),
path
(
'receipt'
,
receipt
,
name
=
'receipt'
),
path
(
'addorder'
,
addorder
,
name
=
'addorder'
),
path
(
'addorder'
,
addorder
,
name
=
'addorder'
),
path
(
'addinventory'
,
addinventory
,
name
=
'addinventory'
)
path
(
'manager_query'
,
manager_query
,
name
=
'manager_query'
),
path
(
'week_query'
,
week_query
,
name
=
'week_query'
),
path
(
'role_query'
,
role_query
,
name
=
'role_query'
)
]
main/views.py
View file @
abd497af
...
...
@@ -22,30 +22,41 @@ def inventory(request):
def
schedule
(
request
):
# 1: FILTER EMPLOYEES BY MANAGER FOR THE DAY - mate
ismanager_query
=
EmployeeRole
.
objects
.
all
()
.
filter
(
is_manager
=
'Y'
)
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'
)
# 3 : FILTER BY WEEK - dedz
week_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
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'
)
# 4: FILTER EMPLOYEES BY ROLES - xtine
role_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cashier'
)
role_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Preparation'
)
role_query3
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cleaning'
)
# 5: FILTER EMPLOYEES AND ROLES BY DATE IN ORDER - xx
date_order_query
=
EmployeeRole
.
objects
.
all
()
.
order_by
(
'role_date'
)
return
render
(
request
,
"blizzardblast/templates/schedule.html"
,
{
'
manager'
:
ismanager_query
'
all_values'
:
all_values
}
)
# 1: FILTER EMPLOYEES BY MANAGER FOR THE DAY - mate
def
manager_query
(
request
):
ismanager_query
=
EmployeeRole
.
objects
.
all
()
.
filter
(
is_manager
=
'Y'
)
return
render
(
request
,
"blizzardblast/templates/queries/manager_query.html"
,
{
'manager'
:
ismanager_query
})
# 3 : FILTER BY WEEK - dedz
def
week_query
(
request
):
week_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
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"
,
{
'week_query1'
:
week_query1
,
'week_query2'
:
week_query2
}
)
# 4: FILTER EMPLOYEES BY ROLES - xtine
def
role_query
(
request
):
role_query1
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cashier'
)
role_query2
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Preparation'
)
role_query3
=
EmployeeRole
.
objects
.
all
()
.
filter
(
role_description
=
'Cleaning'
)
return
render
(
request
,
"blizzardblast/templates/queries/role_query.html"
,
{
'cashier'
:
role_query1
,
'preparation'
:
role_query2
,
'cleaning'
:
role_query3
}
)
def
report
(
request
):
return
render
(
request
,
"blizzardblast/templates/report.html"
)
...
...
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