fix(ChecksPanel): заголовок мягких проверок «Предупреждения проверок (N)» (#34, AURORA-1527)

В soft_failed попадают мягкие соотношения §7 и жёсткие в пределах округления, а не только округление.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev 2026-10-16 19:09:37 +04:00
parent 54f88e9950
commit 85e1b86bb1

View File

@ -8,6 +8,8 @@ export const failureText = (f: FailedCheckOut) =>
type Props = { checks: ChecksOut; editable: boolean; dirty: boolean; onAccept: (comment: string) => Promise<void> }; type Props = { checks: ChecksOut; editable: boolean; dirty: boolean; onAccept: (comment: string) => Promise<void> };
// soft_failed — мягкие соотношения §7 (2400, 2500, «сумма подстрок = родитель») и жёсткие в пределах округления;
// подтверждение они не блокируют
// длинный список нарушений (OCR) не должен выталкивать таблицу формы за экран // длинный список нарушений (OCR) не должен выталкивать таблицу формы за экран
const failureList = (list: FailedCheckOut[]) => ( const failureList = (list: FailedCheckOut[]) => (
<div style={{ maxHeight: 120, overflowY: 'auto' }}> <div style={{ maxHeight: 120, overflowY: 'auto' }}>
@ -45,7 +47,7 @@ export function ChecksPanel({ checks, editable, dirty, onAccept }: Props) {
<Alert type='error' showIcon title={`Нарушения (${checks.failed.length})`} description={failureList(checks.failed)} /> <Alert type='error' showIcon title={`Нарушения (${checks.failed.length})`} description={failureList(checks.failed)} />
)} )}
{checks.soft_failed.length > 0 && ( {checks.soft_failed.length > 0 && (
<Alert type='warning' showIcon title='Расхождения в пределах округления' description={failureList(checks.soft_failed)} /> <Alert type='warning' showIcon title={`Предупреждения проверок (${checks.soft_failed.length})`} description={failureList(checks.soft_failed)} />
)} )}
{checks.cross_form && ( {checks.cross_form && (
<Alert <Alert