diff --git a/src/app/[locale]/pages/violations/page.tsx b/src/app/[locale]/pages/violations/page.tsx
index 81256eb..813e4fc 100644
--- a/src/app/[locale]/pages/violations/page.tsx
+++ b/src/app/[locale]/pages/violations/page.tsx
@@ -1,10 +1,11 @@
import PageTitleColorFrame from '@/app/ui/page-title-color-frame';
-import ViolationsMyCases from '@/app/ui/violations/violations-my-cases';
+import ViolationsMyComplaint from '@/app/ui/violations/violations-my-complaint';
import ViolationsCheckAllSection from '@/app/ui/violations/violations-check-all-section';
import ViolationsTable from '@/app/ui/violations/violations-table';
import ViolationsStatistic from '@/app/ui/violations/violations-statistic';
import AnalyticsCardGeography from '@/app/ui/reports/analytics-card-geography';
import AnalyticsCardDistribution from '@/app/ui/reports/analytics-card-distribution';
+import ViolationsMyClaims from '@/app/ui/violations/violations-my-claims';
export default function Page() {
return (
@@ -16,11 +17,12 @@ export default function Page() {
-
+
- {complainInfo?.body.content ? (
+ {complainInfo?.body?.content ? (
<>
{complainInfo.body.content.map((item: complaintInfo) => {
return (
diff --git a/src/app/ui/file-page/violation-table/file-page-violation-epmty-screen.tsx b/src/app/ui/file-page/violation-table/file-page-violation-epmty-screen.tsx
index 0fc8de9..0c6e583 100644
--- a/src/app/ui/file-page/violation-table/file-page-violation-epmty-screen.tsx
+++ b/src/app/ui/file-page/violation-table/file-page-violation-epmty-screen.tsx
@@ -10,7 +10,7 @@ export default function FilePageViolationEpmtyScreen() {
className="violation-info"
>
{t('to-view-a-file-match-click-on-the-card-from-the-list')}
diff --git a/src/app/ui/violations/violations-my-cases.tsx b/src/app/ui/violations/violations-my-cases.tsx
deleted file mode 100644
index cc53520..0000000
--- a/src/app/ui/violations/violations-my-cases.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-export default function ViolationsMyCases() {
- return (
-
-
-
-
-
-
-
№ARB-2025-000271
-
ПОДАНО
-
-
- Нарушение авторских прав: scale_1200 (2).jpeg
-
-
-
Создано: 12.10.2025
-
Юрист: Не назначен
-
-
-
-
-
-
-
№ARB-2025-4944
-
НАЗНАЧЕН ЮРИСТ
-
-
- Нарушение авторских прав: scale_1200 (2).jpeg
-
-
-
Создано: 23.09.2025
-
Юрист: Анна Иванова
-
Ущерб: ₽0
-
-
-
-
-
-
-
№ARB-2025-0535
-
НАЗНАЧЕН ЮРИСТ
-
-
- Нарушение авторских прав: scale_1200 (2).jpeg
-
-
-
Создано: 22.09.2025
-
Юрист: Анна Иванова
-
Ущерб: ₽100 000
-
-
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/app/ui/violations/violations-my-claims.tsx b/src/app/ui/violations/violations-my-claims.tsx
new file mode 100644
index 0000000..0e70c9b
--- /dev/null
+++ b/src/app/ui/violations/violations-my-claims.tsx
@@ -0,0 +1,133 @@
+'use client'
+
+import { useLastCases } from '@/app/hooks/react-query/useLastCases';
+import { useEffect, useMemo, useState } from 'react';
+import { formatDate, formatDateTime } from '@/app/lib/formatDate';
+import { useTranslations } from 'next-intl';
+
+import { Swiper, SwiperSlide } from 'swiper/react';
+import { Navigation, Pagination } from 'swiper/modules';
+
+export default function ViolationsMyClaims() {
+ const t = useTranslations('Global');
+ const { data: dataCases } = useLastCases({
+ page: 1,
+ size: 5,
+ sort_by: 'createdAt',
+ sort_direction: 'desc'
+ });
+
+ const MAX_VISIBLE_ITEMS = 5;
+
+ const getSlidesPerView = () => {
+ if (!dataCases || !dataCases.content) return 1;
+ return Math.min(MAX_VISIBLE_ITEMS, dataCases.content.length);
+ };
+
+ const slidesPerViewCount = getSlidesPerView();
+
+ const swiperSettings = {
+ modules: [Navigation, Pagination],
+ breakpoints: {
+ 0: {
+ slidesPerView: Math.min(slidesPerViewCount, 1),
+ spaceBetween: 20,
+ },
+ 768: {
+ slidesPerView: Math.min(slidesPerViewCount, 2),
+ spaceBetween: 30,
+ },
+ 1024: {
+ slidesPerView: Math.min(slidesPerViewCount, 3),
+ spaceBetween: 30,
+ },
+ 1792: {
+ slidesPerView: slidesPerViewCount,
+ spaceBetween: 30,
+ }
+ },
+ loop: dataCases ? dataCases.content.length > 3 : false,
+ /* navigation: true, */
+ /* pagination: { clickable: true }, */
+ };
+
+ if (!dataCases) {
+ return (
+
+
+
+ {t('recent-claims')}
+
+
+
+
+ );
+ }
+
+ return (
+
+
+
+ {t('recent-claims')}
+
+
+
+ {dataCases?.content.length === 0 ? (
+
+ {t('no-claims')}
+
+ ) : (
+
+ {dataCases?.content.map((item) => {
+ return (
+
+
+
+
+ {item.name}
+
+
+ {item.type}
+
+
+
+
+ {t('text-of-the-case')}:
+
+
+ {item.description}
+
+
+
+
+
{t('date-of-creation')}: {item.createdAt ? `${formatDate(item.createdAt)} ${formatDateTime(item.createdAt)}` : '---'}
+
{t('date-of-update')}: {item.updatedAt ? `${formatDate(item.updatedAt)} ${formatDateTime(item.updatedAt)}` : '---'}
+
{t('lawyer')}:
+ {item.lawyer ? item.lawyer : t('not-assigned')}
+
+
+
+
+ )
+ })}
+
+ )}
+
+
+ )
+}
\ No newline at end of file
diff --git a/src/app/ui/violations/violations-my-complaint.tsx b/src/app/ui/violations/violations-my-complaint.tsx
new file mode 100644
index 0000000..cbd5029
--- /dev/null
+++ b/src/app/ui/violations/violations-my-complaint.tsx
@@ -0,0 +1,130 @@
+'use client';
+
+import { useLastComplaints } from '@/app/hooks/react-query/useLastComplaints';
+import { formatDate, formatDateTime } from '@/app/lib/formatDate';
+import { useTranslations } from 'next-intl';
+
+import { Swiper, SwiperSlide } from 'swiper/react';
+import { Navigation, Pagination } from 'swiper/modules';
+
+export default function ViolationsMyComplaint() {
+ const t = useTranslations('Global');
+ const { data: dataComplaint } = useLastComplaints({
+ page: 1,
+ size: 5,
+ sort_by: 'createdAt',
+ sort_direction: 'desc'
+ });
+
+ const MAX_VISIBLE_ITEMS = 5;
+
+ const getSlidesPerView = () => {
+ if (!dataComplaint || !dataComplaint.content) return 1;
+ return Math.min(MAX_VISIBLE_ITEMS, dataComplaint.content.length);
+ };
+
+ const slidesPerViewCount = getSlidesPerView();
+
+ const swiperSettings = {
+ modules: [Navigation, Pagination],
+ breakpoints: {
+ 0: {
+ slidesPerView: Math.min(slidesPerViewCount, 1),
+ spaceBetween: 20,
+ },
+ 768: {
+ slidesPerView: Math.min(slidesPerViewCount, 2),
+ spaceBetween: 30,
+ },
+ 1024: {
+ slidesPerView: Math.min(slidesPerViewCount, 3),
+ spaceBetween: 30,
+ },
+ 1792: {
+ slidesPerView: slidesPerViewCount,
+ spaceBetween: 30,
+ }
+ },
+ /* navigation: true, */
+ /* pagination: { clickable: true }, */
+ loop: dataComplaint ? dataComplaint.content.length > 3 : false,
+ };
+
+ if (!dataComplaint) {
+ return (
+
+
+
+ {t('recent-complaints')}
+
+
+
+
+ );
+ }
+
+ return (
+
+
+
+ {t('recent-complaints')}
+
+
+
+ {dataComplaint?.content.length === 0 ? (
+
+ {t('no-complaints')}
+
+ ) : (
+
+ {dataComplaint?.content.map((item) => {
+ return (
+
+
+
+
+ COM-{item.id}
+
+
+ {item.status}
+
+
+
+
+ {t('text-of-the-complaint')}:
+
+
+ {item.complaint_text}
+
+
+
+
+
+ {t('date-of-creation')}: {item.created_at ? `${formatDate(item.created_at)} ${formatDateTime(item.created_at)}` : '---'}
+
+
+ {t('date-of-update')}: {item.updated_at ? `${formatDate(item.updated_at)} ${formatDateTime(item.updated_at)}` : '---'}
+
+
+
+
+ );
+ })}
+
+ )}
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json
index 3a0aca1..9d60125 100644
--- a/src/i18n/messages/en.json
+++ b/src/i18n/messages/en.json
@@ -429,7 +429,11 @@
"file-a-claim": "File a claim",
"file-a-complaint": "File a complaint",
"you-can": "You can",
- "complaint": "Complaint"
+ "complaint": "Complaint",
+ "recent-complaints": "Recent complaints",
+ "recent-claims": "Recent claims",
+ "no-complaints": "No complaints",
+ "no-claims": "No claims"
},
"Login-register-form": {
"and": "and",
diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json
index 1cd4917..d5f29a0 100644
--- a/src/i18n/messages/ru.json
+++ b/src/i18n/messages/ru.json
@@ -407,8 +407,8 @@
"description": "Описание",
"priority": "Приоритет",
"type": "Тип",
- "lawyer": "Адвокат",
- "not-assigned": "Не назначено",
+ "lawyer": "Юрист",
+ "not-assigned": "Не назначен",
"case": "Претензия",
"create-case": "Создать претензию",
"case-name": "Название претензии",
@@ -429,7 +429,11 @@
"file-a-claim": "Подать претензию",
"file-a-complaint": "Подать жалобу",
"you-can": "Вы можете",
- "complaint": "Жалоба"
+ "complaint": "Жалоба",
+ "recent-complaints": "Недавние жалобы",
+ "recent-claims": "Недавние претензии",
+ "no-complaints": "Жалоб нет",
+ "no-claims": "Претензии нет"
},
"Login-register-form": {
"and": "и",