Новый экранчик для обзора дашей

This commit is contained in:
2026-02-23 15:54:20 +03:00
parent c30272fe8b
commit 47cffcc35f
35 changed files with 32880 additions and 828 deletions

View File

@@ -110,14 +110,14 @@
});
</script>
<div class="container mx-auto max-w-6xl p-4">
<div class="mx-auto w-full max-w-7xl space-y-4">
<PageHeader
title={$t.reports?.title || 'Reports'}
subtitle={() => null}
actions={() => null}
/>
<div class="mb-4 rounded-lg border border-slate-200 bg-white p-3">
<div class="rounded-xl border border-slate-200 bg-white p-4 shadow-sm">
<div class="grid grid-cols-1 gap-2 md:grid-cols-4">
<select
bind:value={taskType}
@@ -140,14 +140,14 @@
</select>
<button
class="rounded-md border border-slate-200 px-3 py-1.5 text-sm hover:bg-slate-50"
class="inline-flex items-center justify-center rounded-lg border border-slate-300 px-3 py-1.5 text-sm font-medium text-slate-700 transition-colors hover:bg-slate-50"
on:click={() => loadReports()}
>
{$t.common?.refresh || 'Refresh'}
</button>
<button
class="rounded-md border border-slate-200 px-3 py-1.5 text-sm hover:bg-slate-50"
class="inline-flex items-center justify-center rounded-lg border border-slate-300 px-3 py-1.5 text-sm font-medium text-slate-700 transition-colors hover:bg-slate-50"
on:click={clearFilters}
>
{$t.reports?.clear_filters || 'Clear filters'}
@@ -156,24 +156,24 @@
</div>
{#if loading}
<div class="rounded-lg border border-slate-200 bg-white p-6 text-slate-500">
{$t.common?.loading || 'Loading...'}
<div class="rounded-xl border border-slate-200 bg-white p-6 text-sm text-slate-500 shadow-sm">
{$t.reports?.loading || 'Loading reports...'}
</div>
{:else if error}
<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-red-700">
<div class="rounded-xl border border-red-200 bg-red-50 p-4 text-red-700 shadow-sm">
<p>{error}</p>
<button class="mt-2 rounded border border-red-300 px-3 py-1 text-sm" on:click={() => loadReports()}>
{$t.common?.retry || 'Retry'}
<button class="mt-2 inline-flex items-center justify-center rounded-lg border border-red-300 px-3 py-1 text-sm font-medium text-red-700 transition-colors hover:bg-red-100" on:click={() => loadReports()}>
{$t.reports?.retry_load || $t.common?.retry || 'Retry'}
</button>
</div>
{:else if !collection || collection.total === 0}
<div class="rounded-lg border border-slate-200 bg-white p-6 text-slate-500">
<div class="rounded-xl border border-slate-200 bg-white p-6 text-sm text-slate-500 shadow-sm">
{$t.reports?.empty || 'No reports available.'}
</div>
{:else if collection.items.length === 0 && hasActiveFilters()}
<div class="rounded-lg border border-slate-200 bg-white p-6 text-slate-500">
<div class="rounded-xl border border-slate-200 bg-white p-6 text-sm text-slate-500 shadow-sm">
<p>{$t.reports?.filtered_empty || 'No reports match your filters.'}</p>
<button class="mt-2 rounded border border-slate-200 px-3 py-1 text-sm hover:bg-slate-50" on:click={clearFilters}>
<button class="mt-2 inline-flex items-center justify-center rounded-lg border border-slate-300 px-3 py-1 text-sm font-medium text-slate-700 transition-colors hover:bg-slate-50" on:click={clearFilters}>
{$t.reports?.clear_filters || 'Clear filters'}
</button>
</div>