@@ -13,6 +13,7 @@ import {
1313 useUnselectAll ,
1414} from "react-admin" ;
1515
16+ import MarkdownEdit from "../../commons/custom_fields/MarkdownEdit" ;
1617import SmallButton from "../../commons/custom_fields/SmallButton" ;
1718import { ToolbarCancelSave } from "../../commons/custom_fields/ToolbarCancelSave" ;
1819import { validate_after_today } from "../../commons/custom_validators" ;
@@ -42,6 +43,7 @@ type ObservationBulkAssessmentButtonProps = {
4243
4344const ObservationBulkAssessment = ( { product, storeKey } : ObservationBulkAssessmentButtonProps ) => {
4445 const dialogRef = useRef < HTMLDivElement > ( null ) ;
46+ const [ comment , setComment ] = useState ( "" ) ;
4547 const [ open , setOpen ] = useState ( false ) ;
4648 const [ status , setStatus ] = useState ( OBSERVATION_STATUS_OPEN ) ;
4749 const justificationEnabled = justificationIsEnabledForStatus ( status ) ;
@@ -63,6 +65,7 @@ const ObservationBulkAssessment = ({ product, storeKey }: ObservationBulkAssessm
6365 const assessment_data = {
6466 severity : data . current_severity ,
6567 status : data . current_status ,
68+ comment : comment ,
6669 vex_justification : justificationEnabled ? data . current_vex_justification : "" ,
6770 vex_remediations : remediationsEnabled ? data . current_vex_remediations : "" ,
6871 observations : selectedIds ,
@@ -168,6 +171,13 @@ const ObservationBulkAssessment = ({ product, storeKey }: ObservationBulkAssessm
168171 )
169172 }
170173 </ FormDataConsumer >
174+ < MarkdownEdit
175+ initialValue = ""
176+ setValue = { setComment }
177+ label = "Comment"
178+ overlayContainer = { dialogRef . current ?? null }
179+ maxLength = { 4096 }
180+ />
171181 </ SimpleForm >
172182 </ DialogContent >
173183 </ Dialog >
0 commit comments