continue: change styles for matched table, add new block for empty select
This commit is contained in:
@@ -727,6 +727,11 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: v.$p-color;
|
color: v.$p-color;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
background-color: v.$p-color;
|
background-color: v.$p-color;
|
||||||
color: v.$white;
|
color: v.$white;
|
||||||
@@ -4460,6 +4465,11 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
|
|
||||||
|
&-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
&-right {
|
&-right {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -4468,8 +4478,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.source-image {
|
.source-image {
|
||||||
max-width: 120px;
|
max-height: 80%;
|
||||||
width: 100%;
|
min-height: 50px;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.source-url-block {
|
||||||
|
margin-top: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.source-url {
|
.source-url {
|
||||||
@@ -4648,6 +4668,7 @@
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
color: #6366f1;
|
color: #6366f1;
|
||||||
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4738,6 +4759,11 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: v.$p-color;
|
color: v.$p-color;
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
&.current {
|
&.current {
|
||||||
background-color: v.$p-color;
|
background-color: v.$p-color;
|
||||||
color: v.$white;
|
color: v.$white;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useTranslations } from 'next-intl'
|
||||||
|
|
||||||
|
export default function FilePageViolationEpmtyScreen() {
|
||||||
|
const t = useTranslations('Global');
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="violation-info"
|
||||||
|
>
|
||||||
|
<h4
|
||||||
|
className="violation-info-title"
|
||||||
|
>
|
||||||
|
{t('to-view-a-file-match-click-on-the-card-from-the-list')}
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ import { useQueryClient } from '@tanstack/react-query';
|
|||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { MatchStatus } from '@/app/actions/violationActions';
|
import { MatchStatus } from '@/app/actions/violationActions';
|
||||||
import { toast } from 'sonner';
|
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 }) {
|
export default function FilePageViolationInfo({ selectedViolation }: { selectedViolation: ViolationFileDetail | null }) {
|
||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
@@ -63,8 +64,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
|||||||
|
|
||||||
if (!selectedViolation) {
|
if (!selectedViolation) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<FilePageViolationEpmtyScreen />
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import FilePageViolationInfo from '@/app/ui/file-page/violation-table/file-page-
|
|||||||
import { useFileViolations } from '@/app/hooks/react-query/useFileViolations';
|
import { useFileViolations } from '@/app/hooks/react-query/useFileViolations';
|
||||||
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
||||||
import DropDownList from '@/app/components/DropDownList';
|
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({
|
export default function FilePageViolationsList({
|
||||||
currentPage,
|
currentPage,
|
||||||
@@ -26,7 +26,7 @@ export default function FilePageViolationsList({
|
|||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const [selectedViolation, setSelectedViolation] = useState<ViolationFileDetail | null>(null);
|
const [selectedViolation, setSelectedViolation] = useState<ViolationFileDetail | null>(null);
|
||||||
|
|
||||||
const { data: fileViolations } = useFileViolations(fileId, currentPage, status);
|
const { data: fileViolations, error, isPending } = useFileViolations(fileId, currentPage, status);
|
||||||
|
|
||||||
if (!fileViolations?.violations) {
|
if (!fileViolations?.violations) {
|
||||||
return null;
|
return null;
|
||||||
@@ -120,7 +120,9 @@ export default function FilePageViolationsList({
|
|||||||
<div className="source-image">
|
<div className="source-image">
|
||||||
<img src={item.url} alt="" />
|
<img src={item.url} alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div
|
||||||
|
className="source-url-block"
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
className="source-meta"
|
className="source-meta"
|
||||||
>
|
>
|
||||||
@@ -179,10 +181,17 @@ export default function FilePageViolationsList({
|
|||||||
</span>
|
</span>
|
||||||
{fileViolations.total_pages > 1 && (
|
{fileViolations.total_pages > 1 && (
|
||||||
<div className="pagination-controls">
|
<div className="pagination-controls">
|
||||||
|
<button
|
||||||
|
className="arrow"
|
||||||
|
onClick={() => handlePageChange(1)}
|
||||||
|
disabled={currentPage === 1}
|
||||||
|
>
|
||||||
|
<IconDoubleArrowLeft />
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => handlePageChange(currentPage - 1)}
|
onClick={() => handlePageChange(currentPage - 1)}
|
||||||
className="arrow"
|
className="arrow"
|
||||||
disabled={!fileViolations.has_previous}
|
disabled={!fileViolations.has_previous || isPending}
|
||||||
>
|
>
|
||||||
<IconArrowLeft />
|
<IconArrowLeft />
|
||||||
</button>
|
</button>
|
||||||
@@ -194,8 +203,8 @@ export default function FilePageViolationsList({
|
|||||||
<button
|
<button
|
||||||
key={pageNum}
|
key={pageNum}
|
||||||
onClick={() => handlePageChange(pageNum)}
|
onClick={() => handlePageChange(pageNum)}
|
||||||
/* className={`pagination-item ${currentPage === pageNum ? 'pagination-item-active' : ''}`} */
|
|
||||||
className={currentPage === pageNum ? 'current' : 'other'}
|
className={currentPage === pageNum ? 'current' : 'other'}
|
||||||
|
disabled={isPending}
|
||||||
>
|
>
|
||||||
{pageNum}
|
{pageNum}
|
||||||
</button>
|
</button>
|
||||||
@@ -210,6 +219,13 @@ export default function FilePageViolationsList({
|
|||||||
>
|
>
|
||||||
<IconArrowRight />
|
<IconArrowRight />
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
className="arrow"
|
||||||
|
onClick={() => handlePageChange(fileViolations.total_pages)}
|
||||||
|
disabled={currentPage === fileViolations.total_pages || isPending}
|
||||||
|
>
|
||||||
|
<IconDoubleArrowRight />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -388,7 +388,8 @@
|
|||||||
"all-notifications": "All notifications",
|
"all-notifications": "All notifications",
|
||||||
"deselect": "Deselect",
|
"deselect": "Deselect",
|
||||||
"select-all": "Select all",
|
"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": {
|
"Login-register-form": {
|
||||||
"and": "and",
|
"and": "and",
|
||||||
|
|||||||
@@ -388,7 +388,8 @@
|
|||||||
"all-notifications": "Все уведомления",
|
"all-notifications": "Все уведомления",
|
||||||
"deselect": "Снять выделение",
|
"deselect": "Снять выделение",
|
||||||
"select-all": "Выбрать все",
|
"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": {
|
"Login-register-form": {
|
||||||
"and": "и",
|
"and": "и",
|
||||||
|
|||||||
Reference in New Issue
Block a user