Admin subscriptions: expiring 7d add mini bar visualization
This commit is contained in:
@@ -137,7 +137,18 @@
|
||||
<span class="muted">(建议:进入后按订阅维度续费)</span>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ $cnt }}</td>
|
||||
<td>
|
||||
{{ $cnt }}
|
||||
@php
|
||||
$barPct = 0;
|
||||
if ((int) ($summaryStats['expiring_7d_subscriptions'] ?? 0) > 0) {
|
||||
$barPct = min(100, max(0, round(((int) $cnt / (int) ($summaryStats['expiring_7d_subscriptions'] ?? 1)) * 100, 1)));
|
||||
}
|
||||
@endphp
|
||||
<div class="adm-mini-bar" data-role="expiry-merchant-bar" title="占比 {{ $barPct }}%">
|
||||
<span class="adm-mini-bar-fill" style="width: {{ $barPct }}%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{ $minEndsAt !== '' ? $minEndsAt : '-' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
@@ -182,7 +193,18 @@
|
||||
<tr>
|
||||
<td><a class="link" href="{!! $mpUrl !!}">{{ $mname !== '' ? $mname : ('站点#' . $mid) }}</a></td>
|
||||
<td>{{ $pname !== '' ? $pname : ('套餐#' . $pid) }}</td>
|
||||
<td>{{ $cnt }}</td>
|
||||
<td>
|
||||
{{ $cnt }}
|
||||
@php
|
||||
$barPct = 0;
|
||||
if ((int) ($summaryStats['expiring_7d_subscriptions'] ?? 0) > 0) {
|
||||
$barPct = min(100, max(0, round(((int) $cnt / (int) ($summaryStats['expiring_7d_subscriptions'] ?? 1)) * 100, 1)));
|
||||
}
|
||||
@endphp
|
||||
<div class="adm-mini-bar" data-role="expiry-merchant-plan-bar" title="占比 {{ $barPct }}%">
|
||||
<span class="adm-mini-bar-fill" style="width: {{ $barPct }}%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ $minEndsAt !== '' ? $minEndsAt : '-' }}
|
||||
<div class="muted muted-xs mt-6">
|
||||
|
||||
Reference in New Issue
Block a user