2026-05-20 11:59:52 +07:00
|
|
|
|
'use client'
|
|
|
|
|
|
|
|
|
|
|
|
import { useViolationStatistic } from '@/app/hooks/react-query/useViolationStatistic';
|
|
|
|
|
|
|
2026-03-26 11:56:36 +07:00
|
|
|
|
export default function FilePpageFileStatistic() {
|
2026-05-20 11:59:52 +07:00
|
|
|
|
const { data: violationStatistic } = useViolationStatistic();
|
|
|
|
|
|
|
2026-03-02 18:57:52 +07:00
|
|
|
|
return (
|
|
|
|
|
|
<div
|
|
|
|
|
|
className="block-wrapper"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div className="card-header">
|
|
|
|
|
|
<h3 className="card-title">
|
|
|
|
|
|
Статистика по файлу
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="stats-mini-grid">
|
|
|
|
|
|
<div className="stat-mini-card">
|
|
|
|
|
|
<div
|
|
|
|
|
|
className="stat-mini-value"
|
2026-05-20 11:59:52 +07:00
|
|
|
|
style={{ 'color': '#dc2626' }}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
>
|
2026-05-20 11:59:52 +07:00
|
|
|
|
{violationStatistic?.new_violations ? violationStatistic?.new_violations : 0}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-label">Новых</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-card">
|
|
|
|
|
|
<div
|
|
|
|
|
|
className="stat-mini-value"
|
2026-05-20 11:59:52 +07:00
|
|
|
|
style={{ 'color': '#d97706' }}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
>
|
2026-05-20 11:59:52 +07:00
|
|
|
|
{(violationStatistic?.in_progress_violations ? violationStatistic?.in_progress_violations : 0) + (violationStatistic?.in_progress_violations ? violationStatistic?.total_law_cases : 0)}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-label">В работе</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-card">
|
|
|
|
|
|
<div
|
|
|
|
|
|
className="stat-mini-value"
|
2026-05-20 11:59:52 +07:00
|
|
|
|
style={{ 'color': '#059669' }}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
>
|
2026-05-20 11:59:52 +07:00
|
|
|
|
{violationStatistic?.resolved_violations ? violationStatistic?.resolved_violations : 0}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-label">Решено</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-card">
|
|
|
|
|
|
<div
|
|
|
|
|
|
className="stat-mini-value"
|
2026-05-20 11:59:52 +07:00
|
|
|
|
style={{ 'color': '#6366f1' }}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
>
|
2026-05-20 11:59:52 +07:00
|
|
|
|
{violationStatistic?.total_violations ? violationStatistic?.total_violations : 0}
|
2026-03-02 18:57:52 +07:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className="stat-mini-label">Всего</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|