Commit abd497af authored by Martina Therese R. Reyes's avatar Martina Therese R. Reyes

Merge branch 'MateBranch'

parents de12c436 ee18406f
...@@ -24,7 +24,7 @@ ul { ...@@ -24,7 +24,7 @@ ul {
padding: 0; padding: 0;
} }
#nav-bar { #filter-system-navbar, #nav-bar {
display: flex; display: flex;
justify-content: center; justify-content: center;
border-top: 1px #3B3355 solid; border-top: 1px #3B3355 solid;
......
{% 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 %}
{% 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 %}
{% 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 %}
...@@ -9,6 +9,16 @@ ...@@ -9,6 +9,16 @@
{% block content %} {% block content %}
<h1 class='view-title'>Schedule </h1> <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"> <table id="scheduling-table">
<tr> <tr>
<th>Week</th> <th>Week</th>
...@@ -17,14 +27,16 @@ ...@@ -17,14 +27,16 @@
<th>Day-Mgr</th> <th>Day-Mgr</th>
</tr> </tr>
{% for m in manager%} {% for a in all_values%}
<tr> <tr>
<td> {{m.role_date}}</td> <td> {{a.role_date}}</td>
<td> {{m.employee.employee_name}} </td> <td> {{a.employee.employee_name}} </td>
<td> {{m.role_description}} </td> <td> {{a.role_description}} </td>
<td> {{m.is_manager}} </td> <td> {{a.is_manager}} </td>
</tr> </tr>
{% endfor %} {% endfor %}
</table> </table>
{% endblock %} {% endblock %}
...@@ -8,6 +8,10 @@ urlpatterns = [ ...@@ -8,6 +8,10 @@ urlpatterns = [
path('schedule', schedule, name='schedule'), path('schedule', schedule, name='schedule'),
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('week_query', week_query, name = 'week_query'),
path('role_query', role_query, name = 'role_query')
] ]
...@@ -22,30 +22,41 @@ def inventory(request): ...@@ -22,30 +22,41 @@ def inventory(request):
def schedule(request): def schedule(request):
# 1: FILTER EMPLOYEES BY MANAGER FOR THE DAY - mate all_values = EmployeeRole.objects.all()
ismanager_query = EmployeeRole.objects.all().filter(is_manager='Y')
# 2: FILTER EMPLOYEES AND ROLES IN ALPHABETICAL ORDER - felizia # 2: FILTER EMPLOYEES AND ROLES IN ALPHABETICAL ORDER - felizia
employee_role_order_query = EmployeeRole.objects.all().order_by('role_description') 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 # 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", {
'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): def report(request):
return render(request, "blizzardblast/templates/report.html") return render(request, "blizzardblast/templates/report.html")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment