added some filters to templates

This commit is contained in:
2025-08-03 10:50:59 +03:00
parent e824e87953
commit 13c4c324fc
29 changed files with 180 additions and 89 deletions
+15 -11
View File
@@ -1,4 +1,5 @@
{% load static %}
{% load permission_tags %}
<aside class="sidebar">
<div class="header">
<a href="{% url 'index' %}" class="link-no-style">
@@ -14,6 +15,7 @@
{% url 'client_company' as client_company_url %}
{% url 'client_line' as client_line_url %}
{% url 'user_list' as user_list_url %}
{% url 'payments_list' as payments_list_url %}
<nav class="nav-menu">
<div class="section-title">Main</div>
<a href="{{ dashboard_url }}" class="nav-item {% if request.path == dashboard_url %}active{% endif %}">
@@ -40,17 +42,19 @@
</svg>
Bookings
</a>
<div class="section-title account">Reports</div>
<a href="#" class="nav-item">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<g>
<path fill="none" d="M0 0h24v24H0z"/>
<path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1.95-9H15v2h-4.95a2.5 2.5 0 0 0 4.064 1.41l1.7 1.133A4.5 4.5 0 0 1 8.028 13H7v-2h1.027a4.5 4.5 0 0 1 7.788-2.543L14.114 9.59A2.5 2.5 0 0 0 10.05 11z"/>
</g>
</svg>
Reports
</a>
{% if request.user.UserType == 'CA' or 1 == 1 %}
{% if request.user|has_company_perm:'can_view_payment' or request.user.user_type == 'CA'%}
<div class="section-title account">Reports</div>
<a href="{{ payments_list_url }}" class="nav-item">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<g>
<path fill="none" d="M0 0h24v24H0z"/>
<path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1.95-9H15v2h-4.95a2.5 2.5 0 0 0 4.064 1.41l1.7 1.133A4.5 4.5 0 0 1 8.028 13H7v-2h1.027a4.5 4.5 0 0 1 7.788-2.543L14.114 9.59A2.5 2.5 0 0 0 10.05 11z"/>
</g>
</svg>
Reports
</a>
{% endif %}
{% if request.user.user_type == 'CA' %}
<div class="section-title account">Nomenclatures</div>
<a href="{{ user_list_url }}" class="nav-item {% if request.path == user_list_url %}active{% endif %}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" fill="none" viewBox="0 0 24 24" stroke="currentColor">