Polish daily sales mobile calendar
All checks were successful
CD Pipeline / deploy (push) Successful in 56s
All checks were successful
CD Pipeline / deploy (push) Successful in 56s
This commit is contained in:
@@ -208,6 +208,49 @@
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="daily-calendar-mobile-list" aria-label="手機版業績日期清單">
|
||||
{% set mobile_days = namespace(count=0) %}
|
||||
{% for week in calendar_data.weeks %}
|
||||
{% for day in week %}
|
||||
{% if day.has_data and day.is_current_month %}
|
||||
{% set mobile_days.count = mobile_days.count + 1 %}
|
||||
<a
|
||||
class="daily-mobile-day {% if day.date == selected_date and not is_month_view %}is-selected{% endif %}"
|
||||
href="/daily_sales?date={{ day.date }}"
|
||||
aria-label="{{ day.date }} 業績 {{ '{:,.0f}'.format(day.revenue) }}">
|
||||
<span class="daily-mobile-day__date">
|
||||
<strong>{{ day.day }}</strong>
|
||||
<span>{{ day.weekday }}{% if day.is_holiday %} · {{ day.holiday_name }}{% endif %}</span>
|
||||
</span>
|
||||
<span class="daily-mobile-day__trend dod-{{ day.dod_direction }}">
|
||||
{% if day.dod_direction == 'up' %}<i class="fas fa-arrow-up" aria-hidden="true"></i>
|
||||
{% elif day.dod_direction == 'down' %}<i class="fas fa-arrow-down" aria-hidden="true"></i>
|
||||
{% endif %}
|
||||
{{ day.dod_percent }}%
|
||||
</span>
|
||||
<span class="daily-mobile-day__metric">
|
||||
<span>業績</span>
|
||||
<strong>${{ '{:,.0f}'.format(day.revenue) }}</strong>
|
||||
</span>
|
||||
<span class="daily-mobile-day__metric">
|
||||
<span>毛利</span>
|
||||
<strong>${{ '{:,.0f}'.format(day.profit) }}</strong>
|
||||
<em>{{ '{:.1f}%'.format(day.margin_rate) }}</em>
|
||||
</span>
|
||||
<span class="daily-mobile-day__chips">
|
||||
<span>SKU {{ '{:,.0f}'.format(day.sku_count) }}</span>
|
||||
<span>客單 ${{ '{:,.0f}'.format(day.avg_price) }}</span>
|
||||
<span>銷量 {{ '{:,.0f}'.format(day.qty) }}</span>
|
||||
</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% if mobile_days.count == 0 %}
|
||||
<div class="daily-mobile-empty">本月尚無可檢視的業績日期。</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user