{% if is_owner %}
🌿 لوحة تحكم المالك
{% if permissions.can_manage_products %} {% endif %} {% if permissions.can_manage_admins %} {% endif %}
إجمالي المبيعات

{{ analytics.total_revenue }} ج.م

الطلبات المعلقة

{{ analytics.pending_orders }}

إجمالي الطلبات

{{ analytics.total_orders }}

عدد المنتجات

{{ analytics.total_products }}

مخزون منخفض ≤ 5

{{ analytics.low_stock }}

مبيعات اليوم

{{ analytics.today_sales }} ج.م

مبيعات الأسبوع

{{ analytics.week_sales }} ج.م

مبيعات الشهر

{{ analytics.month_sales }} ج.م

متوسط الطلب

{{ analytics.avg_order }} ج.م

نفدت بالكامل

{{ analytics.out_of_stock }}

📈 أكثر المنتجات مبيعًا
{% for item in analytics.top_products %}
{{ item.title }} {{ item.quantity }}
{% else %} لا توجد مبيعات معتمدة بعد. {% endfor %}
👥 أكثر العملاء شراءً
{% for item in analytics.top_customers %}
{{ item.name }} {{ item.total }} ج.م
{% else %} لا توجد مبيعات معتمدة بعد. {% endfor %}
نسبة الطلبات
مقبولة {{ analytics.approved_rate }}% مرفوضة {{ analytics.rejected_rate }}%
{% endif %}

المنتجات المتاحة

{% for product in products %}
{{ product.title }} {% if product.images|length > 1 %} {% endif %}
{{ product.title }}
{{ product.category }}

{{ product.description }}

المخزون: {% if product.stock <= 0 %} غير متوفر {% elif product.stock <= 5 %} متبقي {{ product.stock }} {% else %} متوفر: {{ product.stock }} {% endif %}
★ {{ product.avg_rating }} ({{ product.reviews|length }} تقييم)
{{ product.price }} ج.م {% if product.stock > 0 %} {% else %} {% endif %}
{% if is_owner and permissions.can_manage_products %}
{% endif %}
{% else %}

لا توجد منتجات.

{% endfor %}
{% if is_owner and permissions.can_manage_orders %}

📦 إدارة الطلبات

{% for order in orders %} {% else %} {% endfor %}
# العميل العنوان المنتجات المبلغ الحالة واتساب الإجراءات
{{ order.id }} {{ order.customer_name }}
{{ order.customer_phone }}
{{ order.city }} - {{ order.address }} {% if order.maps_url %}
📍 Google Maps {% endif %}
{% for it in order["items"] %} {{ it.title }} (x{{ it.quantity }})
{% endfor %}
{{ order.total_price }} ج.م {{ order.status }} 💬 مراسلة
لا توجد طلبات
{% endif %}
{% if is_owner and permissions.can_manage_products %} {% endif %} {% if is_owner and permissions.can_manage_admins %} {% endif %} {% if is_owner %} {% endif %} {% if is_owner and permissions.can_manage_products %} {% endif %} {% if is_owner %} {% endif %} {% if is_owner and permissions.can_manage_orders %}
{% endif %}