refactor(ui): extract admin mini bar component and reuse in expiry top10
This commit is contained in:
@@ -132,9 +132,11 @@
|
||||
$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>
|
||||
@include('admin.components.mini_bar', [
|
||||
'role' => 'expiry-merchant-bar',
|
||||
'pct' => $barPct,
|
||||
'title' => '占比 ' . $barPct . '%',
|
||||
])
|
||||
</td>
|
||||
<td>{{ $minEndsAt !== '' ? $minEndsAt : '-' }}</td>
|
||||
</tr>
|
||||
@@ -188,9 +190,11 @@
|
||||
$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>
|
||||
@include('admin.components.mini_bar', [
|
||||
'role' => 'expiry-merchant-plan-bar',
|
||||
'pct' => $barPct,
|
||||
'title' => '占比 ' . $barPct . '%',
|
||||
])
|
||||
</td>
|
||||
<td>
|
||||
{{ $minEndsAt !== '' ? $minEndsAt : '-' }}
|
||||
|
||||
Reference in New Issue
Block a user