Files
customerTicket/templates/tickets/_staff_customer_results.html
2026-09-10 11:34:19 +03:30

6 lines
1.8 KiB
HTML

<div class="customer-result-head"><span>{{ customers|length }} مشتری</span>{% if search %}<small>نتیجه برای «{{ search }}»</small>{% else %}<small>مرتب‌شده بر اساس تیکت‌های فعال</small>{% endif %}</div>
<div class="customer-grid">
{% for customer in customers %}{% with profile=customer.customer_profile %}<article class="customer-card"><header><span class="customer-avatar">{{ profile.first_name|default:customer.local_mobile|slice:':1' }}</span><div><h2>{{ profile|default:customer.local_mobile }}</h2><a dir="ltr" href="tel:{{ customer.mobile }}">{{ customer.local_mobile }}</a></div></header><p class="customer-location">{% if profile.city or profile.province %}{{ profile.city }}{% if profile.city and profile.province %}، {% endif %}{{ profile.province }}{% else %}موقعیت ثبت نشده{% endif %}</p><div class="customer-ticket-stats"><span><b>{{ customer.ticket_count }}</b>کل تیکت</span><span><b>{{ customer.active_count }}</b>فعال</span><span class="needs-action"><b>{{ customer.waiting_staff_count }}</b>نیازمند اقدام</span><span><b>{{ customer.resolved_count }}</b>مختومه</span></div>{% if perms.tickets.add_ticket %}<a class="customer-new-ticket" href="{% url 'staff_tickets:create' %}?customer={{ customer.public_id }}">ثبت تیکت برای این مشتری</a>{% endif %}</article>{% endwith %}
{% empty %}<div class="empty-state"><h2>مشتری پیدا نشد</h2><p>نام یا شماره موبایل را بررسی کنید؛ برای شماره جدید می‌توانید مستقیماً تیکت بسازید.</p>{% if perms.tickets.add_ticket %}<a class="button" href="{% url 'staff_tickets:create' %}">ثبت مشتری و تیکت جدید</a>{% endif %}</div>{% endfor %}
</div>