forked from ddrilling/asb_cloud_front
Списки мемоизированы, изменено название окон согласования/отклонения
This commit is contained in:
parent
66ba02c14a
commit
0d6e46d91f
@ -45,6 +45,8 @@ export const CategoryRender = memo(({ idWell, partData, onUpdate, onEdit, onHist
|
||||
} = partData ?? {}
|
||||
|
||||
const uploadUrl = useMemo(() => `/api/well/${idWell}/drillingProgram/part/${idFileCategory}`, [idWell, idFileCategory])
|
||||
const approvedMarks = useMemo(() => file?.fileMarks?.filter((mark) => mark.idMarkType === 1), [file])
|
||||
const rejectMarks = useMemo(() => file?.fileMarks?.filter((mark) => mark.idMarkType === 0), [file])
|
||||
|
||||
const [isUploading, setIsUploading] = useState(false)
|
||||
const [isDeleting, setIsDeleting] = useState(false)
|
||||
@ -149,13 +151,13 @@ export const CategoryRender = memo(({ idWell, partData, onUpdate, onEdit, onHist
|
||||
{permissionToApprove && (
|
||||
<CommentPrompt isRequired={false} text={'Согласовать'} title={'Согласование документа'} onDone={onApprove(true)} />
|
||||
)}
|
||||
<MarksCard title={'Согласовано'} className={'approve_panel'} marks={file?.fileMarks?.filter((mark) => mark.idMarkType === 1)} />
|
||||
<MarksCard title={'Список согласовавших'} className={'approve_panel'} marks={approvedMarks} />
|
||||
</div>
|
||||
<div className={'reject_list'}>
|
||||
{permissionToApprove && (
|
||||
<CommentPrompt text={'Отклонить'} title={'Отклонение документа'} onDone={onApprove(false)} />
|
||||
)}
|
||||
<MarksCard title={'Отклонено'} className={'reject_panel'} marks={file?.fileMarks?.filter((mark) => mark.idMarkType === 0)} />
|
||||
<MarksCard title={'Список отклонивших'} className={'reject_panel'} marks={rejectMarks} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user