dashboard design changes

This commit is contained in:
2026-08-05 18:34:37 +05:30
parent 2c8c394795
commit 9d7bbad32c
92 changed files with 5104 additions and 608 deletions

View File

@@ -23,6 +23,7 @@ import {useMetricColumns} from '@/features/dashboard/KpiRow';
import {useResource} from '@/lib/api/useResource';
import {endpoints} from '@/lib/api/client';
import {useWorkspace} from '@/components/shell/WorkspaceProvider';
import {ScopeControls} from '@/components/scope/ScopeControls';
import {ICONS} from '@/lib/icons';
import {
formatCompact,
@@ -45,7 +46,7 @@ const STATUS: Record<
* One store's dashboard.
*
* Deliberately the SAME chart components as the main dashboard, scoped by the
* route's storeId rather than the top nav's. Building store-specific chart
* route's storeId rather than the shared scope's. Building store-specific chart
* variants would double the surface area and guarantee the two drift apart —
* the only thing that differs here is which store the query asks about.
*/
@@ -83,6 +84,8 @@ export default function StoreDetailPage({
? `${store.data.staffCount} staff · ${formatPct(store.data.conversionPct)} conversion`
: 'Loading store…'
}
// Store scope is the route here, so only the period is selectable.
controls={<ScopeControls hasStore={false} />}
actions={
<HStack gap={2} vAlign="center">
{store.data ? (
@@ -183,7 +186,7 @@ export default function StoreDetailPage({
</ChartCard>
</Grid>
<ActivityTimeline resource={activity} />
<ActivityTimeline resource={activity} limit={6} height={285} />
</VStack>
);
}

View File

@@ -9,11 +9,12 @@ import {
RANGE_LABELS,
useWorkspace,
} from '@/components/shell/WorkspaceProvider';
import {ScopeControls} from '@/components/scope/ScopeControls';
/**
* The store roster.
*
* This page deliberately ignores the top nav's STORE scope — a list of every
* This page deliberately ignores the shared STORE scope — a list of every
* store is the whole point, and narrowing it to the one already selected would
* leave a one-card page. The RANGE scope still applies, because the totals on
* each card have to be measured over some period.
@@ -27,6 +28,7 @@ export default function StoresPage() {
<PageHeader
title="Store"
description={`Performance and status for every store in the network, over ${RANGE_LABELS[range].toLowerCase()}.`}
controls={<ScopeControls hasStore={false} />}
/>
<StoreGrid resource={stores} />
</VStack>