fix(админка): свежие файлы без ручной чистки кеша, скелетон вместо «Загрузки»
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { api } from '/static/admin2/api.js';
|
||||
import { Card } from '/static/admin2/ui/card.js';
|
||||
import { Bars, Line } from '/static/admin2/ui/chart.js';
|
||||
import { Table } from '/static/admin2/ui/table.js';
|
||||
import { Loading } from '/static/admin2/ui/loading.js';
|
||||
|
||||
const html = htm.bind(h);
|
||||
const rub = (v) => v == null ? '—' : Number(v).toLocaleString('ru-RU',
|
||||
@@ -81,7 +82,7 @@ export function MoneyPage() {
|
||||
class=${d === days ? 'active' : ''} onClick=${() => { setDays(d); setPpage(1); }}>${d} дней</button>`)}
|
||||
</div>
|
||||
${error ? html`<div class="card error" role="alert">${error}</div>`
|
||||
: !data ? html`<div class="card">Загрузка…</div>` : html`
|
||||
: !data ? html`<${Loading} />` : html`
|
||||
<div class="grid">
|
||||
<${Card} title="Поступления" value=${rub(data.revenue_rub)}
|
||||
note=${'возвраты ' + rub(data.refunded_rub)} />
|
||||
@@ -124,7 +125,7 @@ export function MoneyPage() {
|
||||
{key: 'status', label: 'Статус', render: (r) => html`<span class=${'badge s-' + r.status}>${r.status}</span>`},
|
||||
{key: 'yk_payment_id', label: 'ID платежа'},
|
||||
]} rows=${payments.items.map((r) => ({...r, key: r.id}))} empty="Платежей за период нет" />`
|
||||
: html`<p class="note">Загрузка…</p>`}
|
||||
: html`<${Loading} rows={2} />`}
|
||||
</section>
|
||||
<section class="card accounts">
|
||||
<h2>Счета клиентов</h2>
|
||||
|
||||
Reference in New Issue
Block a user