add verefid check for complain/case
This commit is contained in:
@@ -20,6 +20,7 @@ $border-color-1: #e2e8f0;
|
|||||||
$border-color-1-hover: #b1b7be;
|
$border-color-1-hover: #b1b7be;
|
||||||
$color-warning: #fab005;
|
$color-warning: #fab005;
|
||||||
$color-warning-hover: #fa9805;
|
$color-warning-hover: #fa9805;
|
||||||
|
$color-warning-2: #f08c00;
|
||||||
|
|
||||||
$color-image: #f08c00;
|
$color-image: #f08c00;
|
||||||
$color-video: #2f9e44;
|
$color-video: #2f9e44;
|
||||||
|
|||||||
@@ -782,6 +782,28 @@
|
|||||||
color: #212529;
|
color: #212529;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-not-verified {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: end;
|
||||||
|
background: v.$color-warning-2;
|
||||||
|
color: v.$white;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-weight: 700;
|
||||||
|
margin-top: 20px;
|
||||||
|
|
||||||
|
.btn-s {
|
||||||
|
border: 2px solid v.$white;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: v.$white;
|
||||||
|
color: v.$color-warning-2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.violation-page-note {
|
.violation-page-note {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import CaseLegal from '@/app/ui/file-page/violation-table/case-legal';
|
|||||||
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
||||||
import { MatchStatus } from '@/app/actions/violationActions';
|
import { MatchStatus } from '@/app/actions/violationActions';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { useUserProfile } from '@/app/hooks/react-query/useUserDataInfo';
|
||||||
|
|
||||||
type UpdateStatusHandler = (id: number, status: MatchStatus) => Promise<boolean>;
|
type UpdateStatusHandler = (id: number, status: MatchStatus) => Promise<boolean>;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
|||||||
const [activeTab, setActiveTab] = useState<TabType>('complaint');
|
const [activeTab, setActiveTab] = useState<TabType>('complaint');
|
||||||
const [showTabs, setShowTabs] = useState(false);
|
const [showTabs, setShowTabs] = useState(false);
|
||||||
const isInWork = STATUSES_IN_WORK.includes(selectedViolation.status);
|
const isInWork = STATUSES_IN_WORK.includes(selectedViolation.status);
|
||||||
|
const { data: userData, isLoading, isError, error } = useUserProfile();
|
||||||
|
|
||||||
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
const [localViolation, setLocalViolation] = useState<ViolationFileDetail>(selectedViolation);
|
||||||
|
|
||||||
@@ -31,6 +33,31 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
|||||||
setShowTabs(false);
|
setShowTabs(false);
|
||||||
}, [localViolation.id]);
|
}, [localViolation.id]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log(userData);
|
||||||
|
}, [userData])
|
||||||
|
|
||||||
|
if (userData?.verifiedStatus !== "VERIFIED") {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="violation-info-not-verified"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
Подача жалобы/претензии невозможна,
|
||||||
|
<br />
|
||||||
|
так как вы не подтвердили свою личность
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="btn-s"
|
||||||
|
>
|
||||||
|
Подтвердить
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (!isInWork && !showTabs) {
|
if (!isInWork && !showTabs) {
|
||||||
return (
|
return (
|
||||||
<div className="violation-info-choice">
|
<div className="violation-info-choice">
|
||||||
|
|||||||
Reference in New Issue
Block a user