diff --git a/src/app/styles/pages-styles.scss b/src/app/styles/pages-styles.scss index f74a3b5..c7f18d8 100644 --- a/src/app/styles/pages-styles.scss +++ b/src/app/styles/pages-styles.scss @@ -727,6 +727,11 @@ border-radius: 10px; color: v.$p-color; + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + &.current { background-color: v.$p-color; color: v.$white; @@ -4460,6 +4465,11 @@ margin-bottom: 10px; gap: 5px; + &-left { + display: flex; + flex-direction: column; + } + &-right { display: flex; flex-direction: column; @@ -4468,8 +4478,18 @@ } .source-image { - max-width: 120px; - width: 100%; + max-height: 80%; + min-height: 50px; + height: 100%; + + img { + height: 100%; + border-radius: 8px; + } + } + + .source-url-block { + margin-top: auto; } .source-url { @@ -4648,6 +4668,7 @@ a { color: #6366f1; + word-break: break-all; } } @@ -4738,6 +4759,11 @@ border-radius: 10px; color: v.$p-color; + &:disabled { + opacity: 0.5; + cursor: not-allowed; + } + &.current { background-color: v.$p-color; color: v.$white; 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 new file mode 100644 index 0000000..0fc8de9 --- /dev/null +++ b/src/app/ui/file-page/violation-table/file-page-violation-epmty-screen.tsx @@ -0,0 +1,19 @@ +'use client' + +import { useTranslations } from 'next-intl' + +export default function FilePageViolationEpmtyScreen() { + const t = useTranslations('Global'); + + return ( +
+

+ {t('to-view-a-file-match-click-on-the-card-from-the-list')} +

+
+ ) +} \ No newline at end of file diff --git a/src/app/ui/file-page/violation-table/file-page-violation-info.tsx b/src/app/ui/file-page/violation-table/file-page-violation-info.tsx index 541df1f..be6629f 100644 --- a/src/app/ui/file-page/violation-table/file-page-violation-info.tsx +++ b/src/app/ui/file-page/violation-table/file-page-violation-info.tsx @@ -11,6 +11,7 @@ import { useQueryClient } from '@tanstack/react-query'; import { useCallback, useEffect, useState } from 'react'; import { MatchStatus } from '@/app/actions/violationActions'; import { toast } from 'sonner'; +import FilePageViolationEpmtyScreen from '@/app/ui/file-page/violation-table/file-page-violation-epmty-screen'; export default function FilePageViolationInfo({ selectedViolation }: { selectedViolation: ViolationFileDetail | null }) { const t = useTranslations('Global'); @@ -63,8 +64,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV if (!selectedViolation) { return ( -
-
+ ) } diff --git a/src/app/ui/file-page/violation-table/file-page-violations-list.tsx b/src/app/ui/file-page/violation-table/file-page-violations-list.tsx index 061f39c..53650f7 100644 --- a/src/app/ui/file-page/violation-table/file-page-violations-list.tsx +++ b/src/app/ui/file-page/violation-table/file-page-violations-list.tsx @@ -8,7 +8,7 @@ import FilePageViolationInfo from '@/app/ui/file-page/violation-table/file-page- import { useFileViolations } from '@/app/hooks/react-query/useFileViolations'; import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations'; import DropDownList from '@/app/components/DropDownList'; -import { IconArrowLeft, IconArrowRight } from '@/app/ui/icons/icons'; +import { IconArrowLeft, IconArrowRight, IconDoubleArrowLeft, IconDoubleArrowRight } from '@/app/ui/icons/icons'; export default function FilePageViolationsList({ currentPage, @@ -26,7 +26,7 @@ export default function FilePageViolationsList({ const searchParams = useSearchParams(); const [selectedViolation, setSelectedViolation] = useState(null); - const { data: fileViolations } = useFileViolations(fileId, currentPage, status); + const { data: fileViolations, error, isPending } = useFileViolations(fileId, currentPage, status); if (!fileViolations?.violations) { return null; @@ -120,7 +120,9 @@ export default function FilePageViolationsList({
-
+
@@ -179,10 +181,17 @@ export default function FilePageViolationsList({ {fileViolations.total_pages > 1 && (
+ @@ -194,8 +203,8 @@ export default function FilePageViolationsList({ @@ -210,6 +219,13 @@ export default function FilePageViolationsList({ > +
)}
diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index b4a546f..6421a8f 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -388,7 +388,8 @@ "all-notifications": "All notifications", "deselect": "Deselect", "select-all": "Select all", - "text-area-error-fill-complaint-text": "Fill out the complaint text" + "text-area-error-fill-complaint-text": "Fill out the complaint text", + "to-view-a-file-match-click-on-the-card-from-the-list": "To view a file match, click on the card from the list" }, "Login-register-form": { "and": "and", diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index fad10fe..cc6142a 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -388,7 +388,8 @@ "all-notifications": "Все уведомления", "deselect": "Снять выделение", "select-all": "Выбрать все", - "text-area-error-fill-complaint-text": "Заполните текст жалобы" + "text-area-error-fill-complaint-text": "Заполните текст жалобы", + "to-view-a-file-match-click-on-the-card-from-the-list": "Для просмотра совпадения по файлу нажмите на карточку из списка" }, "Login-register-form": { "and": "и",