@@ -93,6 +93,7 @@ const userKeySelector = (item: User) => item.id;
9393
9494interface Props {
9595 value : PartialOpsUpdate ;
96+ isPreviousImminent : boolean ;
9697 setFieldValue : ( ...entries : EntriesAsList < PartialOpsUpdate > ) => void ;
9798 error : Error < PartialOpsUpdate > | undefined ;
9899 disabled ?: boolean ;
@@ -107,6 +108,7 @@ interface Props {
107108function Overview ( props : Props ) {
108109 const {
109110 value,
111+ isPreviousImminent,
110112 setFieldValue,
111113 error : formError ,
112114 fileIdToUrlMap,
@@ -220,6 +222,7 @@ function Overview(props: Props) {
220222 return (
221223 < div className = { styles . operationOverview } >
222224 { state ?. isNewOpsUpdate
225+ && ! isPreviousImminent
223226 && showChangeDrefTypeModal
224227 && value ?. type_of_dref === TYPE_ASSESSMENT && (
225228 < Modal
@@ -247,22 +250,6 @@ function Overview(props: Props) {
247250 { strings . isDrefChangingToResponse }
248251 </ Modal >
249252 ) }
250- { value . type_of_dref === TYPE_IMMINENT && (
251- < Modal
252- size = "sm"
253- heading = { strings . overviewChangeTypeHeading }
254- footerActions = { (
255- < Button
256- name = { undefined }
257- onClick = { handleChangeToResponse }
258- >
259- { strings . overviewChangeTypeButtonLabel }
260- </ Button >
261- ) }
262- >
263- { strings . overviewChangeTypeMessage }
264- </ Modal >
265- ) }
266253 < Container
267254 heading = { strings . drefFormSharingHeading }
268255 childrenContainerClassName = { styles . content }
@@ -321,7 +308,11 @@ function Overview(props: Props) {
321308 < SelectInput
322309 name = "type_of_dref"
323310 label = { strings . drefFormTypeOfDref }
324- options = { typeOfDrefOptionsWithoutImminent }
311+ options = {
312+ isPreviousImminent
313+ ? typeOfDrefOptions
314+ : typeOfDrefOptionsWithoutImminent
315+ }
325316 keySelector = { typeOfDrefKeySelector }
326317 labelSelector = { stringValueSelector }
327318 onChange = { setFieldValue }
0 commit comments