decompose structure

This commit is contained in:
Первов Артем
2026-06-20 00:51:18 +03:00
parent dbda8ee613
commit 31add10e56
77 changed files with 4112 additions and 3974 deletions

View File

@@ -0,0 +1,72 @@
import { Activity, BarChart3, CalendarClock, Wrench } from 'lucide-react';
import { formatDateTime } from '../../../utils/format';
type OverviewViewProps = {
edgeId: string;
latestUpdatedAt?: Date;
liveCount: number;
selectedCount: number;
totalTags: number;
onOpenArchive: () => void;
onOpenEquipment: () => void;
onOpenIndicators: () => void;
};
export function OverviewView({
edgeId,
latestUpdatedAt,
liveCount,
selectedCount,
totalTags,
onOpenArchive,
onOpenEquipment,
onOpenIndicators,
}: OverviewViewProps) {
return (
<section className="detail-overview">
<div className="summary-grid">
<div className="summary-card">
<span>Всего показателей</span>
<strong>{totalTags}</strong>
</div>
<div className="summary-card">
<span>Live</span>
<strong>{liveCount}</strong>
</div>
<div className="summary-card">
<span>Выбрано для графика</span>
<strong>{selectedCount}</strong>
</div>
<div className="summary-card">
<span>Последнее обновление</span>
<strong>{latestUpdatedAt ? formatDateTime(latestUpdatedAt) : '-'}</strong>
</div>
</div>
<section className="detail-action-panel">
<div>
<span className="page-kicker">Разделы</span>
<h2>{edgeId}</h2>
</div>
<div className="detail-action-grid">
<button type="button" onClick={onOpenIndicators}>
<Activity size={18} />
Текущие показатели
</button>
<button type="button" onClick={onOpenArchive}>
<BarChart3 size={18} />
Архив и график
</button>
<button type="button" onClick={onOpenEquipment}>
<Wrench size={18} />
Состояние оборудования
</button>
<button type="button">
<CalendarClock size={18} />
Техническое обслуживание
</button>
</div>
</section>
</section>
);
}