diff --git a/BACKEND/app/services/line_connection.ts b/BACKEND/app/services/line_connection.ts index c394685..097df9c 100644 --- a/BACKEND/app/services/line_connection.ts +++ b/BACKEND/app/services/line_connection.ts @@ -2026,20 +2026,21 @@ Ports Missing/Down: ${missing.length}\n\n` let verdictBd = '#a7f3d0' let verdictTx = '#065f46' - if (!physicalPass && !aiPass) { - verdictLabel = 'CRITICAL ISSUES' - verdictMsg = 'Physical failures + AI detected problems' - verdictBg = '#fef2f2' - verdictBd = '#fecaca' - verdictTx = '#991b1b' - } else if (!physicalPass) { + // if (!physicalPass && !aiPass) { + // verdictLabel = 'CRITICAL ISSUES' + // verdictMsg = 'Physical failures + AI detected problems' + // verdictBg = '#fef2f2' + // verdictBd = '#fecaca' + // verdictTx = '#991b1b' + // } else + if (!physicalPass) { verdictLabel = 'PHYSICAL INCOMPLETE' verdictMsg = `${missing.length} port(s) untested${isSkipped ? ' — testing skipped' : ''}` verdictBg = '#fef2f2' verdictBd = '#fecaca' verdictTx = '#991b1b' } else if (!aiPass) { - verdictLabel = `AI: ${summaryStatus}` + verdictLabel = summaryStatus === 'FAIL' ? 'CRITICAL ISSUES' : `AI: ${summaryStatus}` verdictMsg = summaryStatus === 'FAIL' ? 'AI analysis failed — review required' @@ -2110,12 +2111,12 @@ Ports Missing/Down: ${missing.length}\n\n` const missingParts: string[] = [] if (missingPoE.length) { missingParts.push( - `
${dataIncomingBySN?.packagePo?.notes || ''}
${serialInfo?.notes || ''}
diff --git a/FRONTEND/src/components/Modal/ModalConfirmSkipTestPort.tsx b/FRONTEND/src/components/Modal/ModalConfirmSkipTestPort.tsx index 318fbbb..73a9824 100644 --- a/FRONTEND/src/components/Modal/ModalConfirmSkipTestPort.tsx +++ b/FRONTEND/src/components/Modal/ModalConfirmSkipTestPort.tsx @@ -7,6 +7,8 @@ import { TextInput, Button, ScrollArea, + Radio, + Group, } from "@mantine/core"; import type { TLine, TStation } from "../../untils/types"; import type { Socket } from "socket.io-client"; @@ -21,6 +23,7 @@ interface Props { interface PropsLines { id: number | undefined; note: string; + reasonType?: string; pid?: string; sn?: string; vid?: string; @@ -48,10 +51,13 @@ export default function ModalConfirmSkipTestPort({ pid: line?.inventory?.pid, sn: line?.inventory?.sn, vid: line?.inventory?.vid, + reasonType: prev?.find((el) => el.id === line.id) + ? prev?.find((el) => el.id === line.id)?.reasonType || "" + : "", note: prev?.find((el) => el.id === line.id) ? prev?.find((el) => el.id === line.id)?.note || "" : "", - })) + })), ); } }, [listLines]); @@ -99,39 +105,80 @@ export default function ModalConfirmSkipTestPort({