conect endpoints for FilePpageFileStatistic
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
'use client'
|
||||
|
||||
import { useViolationStatistic } from '@/app/hooks/react-query/useViolationStatistic';
|
||||
|
||||
export default function FilePpageFileStatistic() {
|
||||
const { data: violationStatistic } = useViolationStatistic();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="block-wrapper"
|
||||
@@ -13,36 +19,36 @@ export default function FilePpageFileStatistic() {
|
||||
<div className="stat-mini-card">
|
||||
<div
|
||||
className="stat-mini-value"
|
||||
style={{'color': '#dc2626'}}
|
||||
style={{ 'color': '#dc2626' }}
|
||||
>
|
||||
0
|
||||
{violationStatistic?.new_violations ? violationStatistic?.new_violations : 0}
|
||||
</div>
|
||||
<div className="stat-mini-label">Новых</div>
|
||||
</div>
|
||||
<div className="stat-mini-card">
|
||||
<div
|
||||
className="stat-mini-value"
|
||||
style={{'color': '#d97706'}}
|
||||
style={{ 'color': '#d97706' }}
|
||||
>
|
||||
0
|
||||
{(violationStatistic?.in_progress_violations ? violationStatistic?.in_progress_violations : 0) + (violationStatistic?.in_progress_violations ? violationStatistic?.total_law_cases : 0)}
|
||||
</div>
|
||||
<div className="stat-mini-label">В работе</div>
|
||||
</div>
|
||||
<div className="stat-mini-card">
|
||||
<div
|
||||
className="stat-mini-value"
|
||||
style={{'color': '#059669'}}
|
||||
style={{ 'color': '#059669' }}
|
||||
>
|
||||
0
|
||||
{violationStatistic?.resolved_violations ? violationStatistic?.resolved_violations : 0}
|
||||
</div>
|
||||
<div className="stat-mini-label">Решено</div>
|
||||
</div>
|
||||
<div className="stat-mini-card">
|
||||
<div
|
||||
className="stat-mini-value"
|
||||
style={{'color': '#6366f1'}}
|
||||
style={{ 'color': '#6366f1' }}
|
||||
>
|
||||
0
|
||||
{violationStatistic?.total_violations ? violationStatistic?.total_violations : 0}
|
||||
</div>
|
||||
<div className="stat-mini-label">Всего</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user