Files
2026-10-14 12:27:55 +03:30

81 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% load static %}
<!doctype html>
<html lang="fa" dir="rtl" data-static-version="{{ static_asset_version }}">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover,interactive-widget=resizes-content"><meta name="theme-color" content="#08376b">
<meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="{{ site_branding.pwa_title }}">
<title>{% block title %}{{ page_title }}{% endblock %}</title>
<link rel="icon" href="{{ favicon_url }}?v={{ static_asset_version }}-{{ branding_version }}">
<link rel="manifest" href="{% url 'web_manifest' %}?v={{ static_asset_version }}-{{ branding_version }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ pwa_icon_url }}?v={{ static_asset_version }}-{{ branding_version }}">
<link rel="preload" href="{% static 'fonts/vazirmatn-arabic-wght-normal.woff2' %}?v={{ static_asset_version }}" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" href="{% static 'css/tailwind.css' %}?v={{ static_asset_version }}">
<link rel="stylesheet" href="{% static 'css/operations.css' %}?v={{ static_asset_version }}">
<link rel="stylesheet" href="{% static 'css/dispatches.css' %}?v={{ static_asset_version }}">
{% if request.resolver_match.namespace == 'accounts' %}<link rel="stylesheet" href="{% static 'css/customer-login-access.css' %}?v={{ static_asset_version }}">{% endif %}
{% if request.resolver_match.namespace == 'accounts' and request.resolver_match.url_name == 'profile' or financial_page or request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name == 'list' or request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name == 'new' %}<link rel="stylesheet" href="{% static 'css/customer-dock.css' %}?v={{ static_asset_version }}">{% endif %}
<script defer src="{% static 'vendor/htmx-2.0.3.min.js' %}?v={{ static_asset_version }}"></script><script defer src="{% static 'vendor/alpine-3.14.8.min.js' %}?v={{ static_asset_version }}"></script>
{% block extra_head %}{% endblock %}
</head>
<body>
{% block body %}
{% if user.is_authenticated and user.account_type == 'STAFF' %}
<div class="staff-shell">
<aside class="staff-sidebar">
<div>
<a class="staff-brand" href="{% url 'staff_tickets:list' %}">
<span class="staff-logo-panel"><img class="staff-company-logo" src="{{ company_logo_url }}?v={{ static_asset_version }}-{{ branding_version }}" alt="لوگوی شرکت" width="300" height="130"></span>
<span class="staff-brand-copy"><b>{{ site_branding.staff_brand_title }}</b><small>{{ site_branding.staff_brand_subtitle }}</small></span>
</a>
<p class="staff-menu-label">فضای کاری</p>
<nav class="staff-menu" aria-label="منوی کارشناسان">
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == '' %}active{% endif %}" href="{% url 'staff_tickets:list' %}" {% if request.resolver_match.url_name == 'list' and active_tab == '' %}aria-current="page"{% endif %}><span>⌂</span><b>میز کار</b></a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'new' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=new" {% if request.resolver_match.url_name == 'list' and active_tab == 'new' %}aria-current="page"{% endif %}><span>◌</span><b>صف جدید</b></a>
<a class="staff-action-link {% if request.resolver_match.url_name == 'list' and active_tab == 'waiting_staff' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=waiting_staff" {% if request.resolver_match.url_name == 'list' and active_tab == 'waiting_staff' %}aria-current="page"{% endif %}><span>↺</span><b>در انتظار پاسخ من</b>{% if counts.waiting %}<em>{{ counts.waiting }}</em>{% endif %}</a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'mine' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=mine" {% if request.resolver_match.url_name == 'list' and active_tab == 'mine' %}aria-current="page"{% endif %}><span>◎</span><b>تیکت‌های من</b></a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'shared' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=shared" {% if request.resolver_match.url_name == 'list' and active_tab == 'shared' %}aria-current="page"{% endif %}><span>◇</span><b>اشتراک‌ها</b><em data-share-unread-count data-count-url="{% url 'staff_tickets:shares_count' %}"{% if not staff_unread_shares %} hidden{% endif %} aria-label="اشتراک خوانده‌نشده">{{ staff_unread_shares }}</em></a>
{% if staff_operations_access.contacts %}<a class="{% if active_staff_section == 'contacts' %}active{% endif %}" href="{% url 'staff_tickets:contacts' %}" {% if active_staff_section == 'contacts' %}aria-current="page"{% endif %}><span>♧</span><b>مخاطبان</b></a>{% endif %}
{% if staff_operations_access.dispatches %}<a class="{% if active_staff_section == 'dispatches' %}active{% endif %}" href="{% url 'staff_tickets:dispatch_create' %}" {% if active_staff_section == 'dispatches' %}aria-current="page"{% endif %}><span>⇶</span><b>ارسال گروهی</b></a>{% endif %}
{% if staff_operations_access.audit %}<a class="{% if active_staff_section == 'audit' %}active{% endif %}" href="{% url 'staff_tickets:magic_audit' %}" {% if active_staff_section == 'audit' %}aria-current="page"{% endif %}><span>⌁</span><b>ممیزی لینک‌ها</b></a>{% endif %}
{% if payment_can_view %}<a class="{% if active_staff_section == 'payments' %}active{% endif %}" href="{% url 'staff_payments:desk' %}" {% if active_staff_section == 'payments' %}aria-current="page"{% endif %}><svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h12v18l-3-2-3 2-3-2-3 2V3Zm3 5h6m-6 4h6m-6 4h3"/></svg><b>اعلامیه واریز</b><em data-payment-count data-count-url="{% url 'staff_payments:count' %}" aria-label="فیش‌های در انتظار بررسی">{{ payment_pending_count }}</em></a>{% endif %}
{% if payment_can_manage_banks %}<a class="{% if active_staff_section == 'banks' %}active{% endif %}" href="{% url 'staff_payments:banks' %}" {% if active_staff_section == 'banks' %}aria-current="page"{% endif %}><svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m3 8 9-5 9 5H3Zm3 3v7m6-7v7m6-7v7M3 21h18"/></svg><b>بانک‌ها</b></a>{% endif %}
</nav>
</div>
<div><div class="staff-profile"><span class="staff-profile-avatar">{{ user.staff_profile.display_name|default:user.username|slice:':1' }}</span><div><strong>{{ user.staff_profile.display_name|default:user.username }}</strong><span>{{ user.staff_profile.job_title|default:'کارشناس فروش' }}</span></div></div><div class="staff-developer-credit">{{ staff_sidebar_credit }}</div></div>
</aside>
<div class="staff-main">
<header class="staff-topbar"><div><small>{{ site_branding.staff_panel_label }}</small><h2>{% if active_tab_title %}{{ active_tab_title }}{% else %}{{ site_branding.staff_brand_subtitle }}{% endif %}</h2></div><div class="staff-topbar-actions"><span class="hidden text-xs text-ink/40 sm:block">{{ user.username }}</span><form method="post" action="{% url 'accounts:staff_logout' %}">{% csrf_token %}<button class="logout-button" type="submit">خروج</button></form></div></header>
{% else %}
{% block customer_header %}<header class="site-header"><div class="header-inner"><a class="logo" href="{% if user.is_authenticated %}{% url 'payments:home' %}{% else %}{% url 'accounts:login' %}{% endif %}">{% block header_logo %}<img class="header-company-logo" src="{{ company_logo_url }}?v={{ static_asset_version }}-{{ branding_version }}" alt="لوگوی شرکت" width="300" height="130">{% endblock %}<span class="logo-copy">{{ site_branding.header_title }}<small>{{ site_branding.header_subtitle }}</small></span></a>{% if user.is_authenticated %}<nav class="desktop-nav"><a href="{% url 'tickets:list' %}">درخواست‌های من</a><a href="{% url 'accounts:profile' %}">پروفایل</a><form method="post" action="{% url 'accounts:logout' %}">{% csrf_token %}<button class="logout-button" type="submit">خروج</button></form></nav>{% endif %}</div></header>{% endblock %}
{% endif %}
<main class="{% if user.is_authenticated and user.account_type == 'STAFF' %}staff-content{% else %}customer-main{% endif %}">{% for message in messages %}<div class="flash {{ message.tags }}" role="status">{{ message }}</div>{% endfor %}{% block content %}{% endblock %}</main>
{% block footer %}<footer class="site-footer">{{ developer_credit }}</footer>{% endblock %}
{% if user.is_authenticated and user.account_type == 'STAFF' %}
</div>
{% block staff_mobile_navigation %}<nav class="staff-mobile-dock" aria-label="دسترسی سریع کارشناسان">
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == '' %}active{% endif %}" href="{% url 'staff_tickets:list' %}" {% if request.resolver_match.url_name == 'list' and active_tab == '' %}aria-current="page"{% endif %}><span class="dock-icon">⌂</span>میز کار</a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'new' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=new" {% if request.resolver_match.url_name == 'list' and active_tab == 'new' %}aria-current="page"{% endif %}><span class="dock-icon">◌</span>صف جدید</a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'waiting_staff' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=waiting_staff" {% if request.resolver_match.url_name == 'list' and active_tab == 'waiting_staff' %}aria-current="page"{% endif %}><span class="dock-icon">↺</span>پاسخ من</a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'mine' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=mine" {% if request.resolver_match.url_name == 'list' and active_tab == 'mine' %}aria-current="page"{% endif %}><span class="dock-icon">◎</span>تیکت‌های من</a>
<a class="{% if request.resolver_match.url_name == 'list' and active_tab == 'shared' %}active{% endif %}" href="{% url 'staff_tickets:list' %}?tab=shared" {% if request.resolver_match.url_name == 'list' and active_tab == 'shared' %}aria-current="page"{% endif %}><span class="dock-icon">◇</span>اشتراک‌ها<em data-share-unread-count data-count-url="{% url 'staff_tickets:shares_count' %}"{% if not staff_unread_shares %} hidden{% endif %}>{{ staff_unread_shares }}</em></a>
{% if staff_operations_access.contacts %}<a class="{% if active_staff_section == 'contacts' %}active{% endif %}" href="{% url 'staff_tickets:contacts' %}" {% if active_staff_section == 'contacts' %}aria-current="page"{% endif %}><span class="dock-icon">♧</span>مخاطبان</a>{% endif %}
{% if staff_operations_access.dispatches %}<a class="{% if active_staff_section == 'dispatches' %}active{% endif %}" href="{% url 'staff_tickets:dispatch_create' %}" {% if active_staff_section == 'dispatches' %}aria-current="page"{% endif %}><span class="dock-icon">⇶</span>گروهی</a>{% endif %}
{% if payment_can_view %}<a class="{% if active_staff_section == 'payments' %}active{% endif %}" href="{% url 'staff_payments:desk' %}" {% if active_staff_section == 'payments' %}aria-current="page"{% endif %}><svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h12v18l-3-2-3 2-3-2-3 2V3Zm3 5h6m-6 4h6m-6 4h3"/></svg><b>اعلامیه واریز</b><em data-payment-count data-count-url="{% url 'staff_payments:count' %}" aria-label="فیش‌های در انتظار بررسی">{{ payment_pending_count }}</em></a>{% endif %}
{% if payment_can_manage_banks %}<a class="{% if active_staff_section == 'banks' %}active{% endif %}" href="{% url 'staff_payments:banks' %}" {% if active_staff_section == 'banks' %}aria-current="page"{% endif %}><svg aria-hidden="true" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m3 8 9-5 9 5H3Zm3 3v7m6-7v7m6-7v7M3 21h18"/></svg><b>بانک‌ها</b></a>{% endif %}
</nav>{% endblock %}
</div>
{% elif user.is_authenticated %}
{% if request.resolver_match.namespace == 'accounts' and request.resolver_match.url_name == 'profile' or financial_page or request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name == 'list' or request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name == 'new' %}{% include 'tickets/_customer_dock.html' %}{% else %} <nav class="mobile-dock customer-mobile-dock" aria-label="دسترسی سریع مشتری"><a class="{% if request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name != 'new' %}active{% endif %}" href="{% url 'tickets:list' %}" {% if request.resolver_match.namespace == 'tickets' and request.resolver_match.url_name != 'new' %}aria-current="page"{% endif %}><span class="dock-icon">◎</span>درخواست‌ها</a><a class="{% if request.resolver_match.url_name == 'new' %}active{% endif %}" href="{% url 'tickets:new' %}" {% if request.resolver_match.url_name == 'new' %}aria-current="page"{% endif %}><span class="dock-icon">+</span>درخواست جدید</a><a class="{% if request.resolver_match.namespace == 'accounts' and request.resolver_match.url_name == 'profile' %}active{% endif %}" href="{% url 'accounts:profile' %}" {% if request.resolver_match.namespace == 'accounts' and request.resolver_match.url_name == 'profile' %}aria-current="page"{% endif %}><span class="dock-icon">○</span>پروفایل</a><form method="post" action="{% url 'accounts:logout' %}">{% csrf_token %}<button type="submit"><span class="dock-icon">←</span>خروج</button></form></nav>{% endif %}
{% endif %}
{% block pwa_install_prompt %}{% endblock %}
<script src="{% static 'js/voice-recorder.js' %}?v={{ static_asset_version }}"></script><script src="{% static 'js/ui.js' %}?v={{ static_asset_version }}"></script><script src="{% static 'js/chat-coach.js' %}?v={{ static_asset_version }}"></script>
{% if user.is_authenticated %}<script defer src="{% static 'js/pwa.js' %}?v={{ static_asset_version }}"></script>{% endif %}
{% if user.is_authenticated and user.account_type == 'STAFF' %}<link rel="stylesheet" href="{% static 'css/staff-sharing.css' %}?v={{ static_asset_version }}"><script defer src="{% static 'js/staff-sharing.js' %}?v={{ static_asset_version }}"></script>{% endif %}
{% block extra_scripts %}{% endblock %}
{% if user.is_authenticated and user.account_type == 'CUSTOMER' and not user.is_staff and not user.is_superuser %}<script defer src="{% static 'js/customer-login-access.js' %}?v={{ static_asset_version }}" data-customer-login-access="{% url 'accounts:login_access' %}"></script>{% endif %}
{% block otp_script %}{% endblock %}
{% endblock %}
</body></html>