change colors and styles for complaint/case form
This commit is contained in:
@@ -86,20 +86,26 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
||||
<div className="note-form">
|
||||
<form action={formAction}>
|
||||
<input type="hidden" name="violationId" value={localViolation.id} />
|
||||
<label
|
||||
className="note-case-label"
|
||||
htmlFor="note"
|
||||
<section
|
||||
className="note-form-group"
|
||||
>
|
||||
{t('text-of-the-complaint')}
|
||||
</label>
|
||||
<textarea
|
||||
name="note"
|
||||
className="note-textarea"
|
||||
placeholder={`${t('text-area-error-fill-complaint-text')}...`}
|
||||
value={noteText}
|
||||
onChange={(e) => setNoteText(e.target.value)}
|
||||
>
|
||||
</textarea>
|
||||
<label
|
||||
className="note-case-label"
|
||||
htmlFor="note"
|
||||
>
|
||||
{t('text-of-the-complaint')}
|
||||
</label>
|
||||
|
||||
<textarea
|
||||
name="note"
|
||||
className="note-textarea"
|
||||
placeholder={`${t('text-area-error-fill-complaint-text')}...`}
|
||||
value={noteText}
|
||||
onChange={(e) => setNoteText(e.target.value)}
|
||||
>
|
||||
</textarea>
|
||||
</section>
|
||||
|
||||
<div
|
||||
className="button-actions"
|
||||
>
|
||||
|
||||
@@ -86,8 +86,7 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
className="note-case-label"
|
||||
htmlFor="caseTitle"
|
||||
>
|
||||
{/* {t('case-name')} */}
|
||||
Название претензии
|
||||
{t('case-name')}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
@@ -147,7 +146,7 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
</div>
|
||||
|
||||
<section
|
||||
className="note-textarea-wrapper"
|
||||
className="note-form-group"
|
||||
>
|
||||
<label
|
||||
className="note-case-label"
|
||||
@@ -155,12 +154,14 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
>
|
||||
{t('text-of-the-case')}
|
||||
</label>
|
||||
|
||||
<textarea
|
||||
name="note"
|
||||
className="note-textarea"
|
||||
placeholder={t('fill-text-of-the-case') + '...'}
|
||||
>
|
||||
</textarea>
|
||||
|
||||
{state?.errorMessage?.textArea && (
|
||||
<p
|
||||
className="text-sm text-red-500"
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
||||
import { MatchStatus } from '@/app/actions/violationActions';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useUserProfile } from '@/app/hooks/react-query/useUserDataInfo';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
type UpdateStatusHandler = (id: number, status: MatchStatus) => Promise<boolean>;
|
||||
|
||||
@@ -14,6 +15,7 @@ const STATUSES_IN_WORK = ['COMPLAINT_IN_WORK', 'LEGAL_IN_WORK', 'COMPLAINT_AND_L
|
||||
type TabType = 'complaint' | 'legal'
|
||||
|
||||
export default function FilePageViolationInfoTabs({ selectedViolation, updateStatusHandler }: { selectedViolation: ViolationFileDetail, updateStatusHandler: UpdateStatusHandler }) {
|
||||
const t = useTranslations('Global');
|
||||
const [activeTab, setActiveTab] = useState<TabType>('complaint');
|
||||
const [showTabs, setShowTabs] = useState(false);
|
||||
const isInWork = STATUSES_IN_WORK.includes(selectedViolation.status);
|
||||
@@ -61,7 +63,9 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
||||
if (!isInWork && !showTabs) {
|
||||
return (
|
||||
<div className="violation-info-choice">
|
||||
<h4>Вы можете</h4>
|
||||
<h4>
|
||||
{t('you-can')}
|
||||
</h4>
|
||||
<div className="violation-info-choice-buttons">
|
||||
<button
|
||||
className="btn btn-primary"
|
||||
@@ -70,11 +74,11 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
||||
setActiveTab('complaint');
|
||||
}}
|
||||
>
|
||||
Подать жалобу
|
||||
{t('file-a-complaint')}
|
||||
</button>
|
||||
|
||||
<span>
|
||||
или
|
||||
{t('or')}
|
||||
</span>
|
||||
|
||||
<button
|
||||
@@ -84,7 +88,7 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
||||
setActiveTab('legal');
|
||||
}}
|
||||
>
|
||||
Подать притензию
|
||||
{t('file-a-claim')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,13 +102,13 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
||||
className={`btn-s btn-primary ${activeTab === 'complaint' ? 'active' : ''} ${localViolation.status === 'COMPLAINT_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? '' : 'action'}`}
|
||||
onClick={() => setActiveTab('complaint')}
|
||||
>
|
||||
{localViolation.status === 'COMPLAINT_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? 'Жалоба' : 'Подать жалобу'}
|
||||
{localViolation.status === 'COMPLAINT_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? t('complaint') : t('file-a-complaint')}
|
||||
</button>
|
||||
<button
|
||||
className={`btn-s btn-primary ${activeTab === 'legal' ? 'active' : ''} ${localViolation.status === 'LEGAL_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? '' : 'action'}`}
|
||||
onClick={() => setActiveTab('legal')}
|
||||
>
|
||||
{localViolation.status === 'LEGAL_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? 'Претензия' : 'Подать претензию'}
|
||||
{localViolation.status === 'LEGAL_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? t('case') : t('file-a-claim')}
|
||||
</button>
|
||||
</div>
|
||||
<div className="violation-info-content">
|
||||
|
||||
Reference in New Issue
Block a user