@@ -11,7 +11,10 @@ import {
1111 TextInput ,
1212} from '@ifrc-go/ui' ;
1313import { useTranslation } from '@ifrc-go/ui/hooks' ;
14- import { isNotDefined } from '@togglecorp/fujs' ;
14+ import {
15+ isNotDefined ,
16+ isTruthyString ,
17+ } from '@togglecorp/fujs' ;
1518import {
1619 type EntriesAsList ,
1720 type Error ,
@@ -163,11 +166,6 @@ function ContextFields(props: Props) {
163166
164167 const summaryVisible = ! value . is_covid_report ;
165168
166- const preferredColumnNoForSummary = Math . max (
167- summaryVisible ? 1 : 0 ,
168- 1 ,
169- ) as 1 | 2 | 3 ;
170-
171169 return (
172170 < Container
173171 heading = { strings . fieldReportFormContextTitle }
@@ -285,20 +283,32 @@ function ContextFields(props: Props) {
285283 title = { strings . summaryLabel }
286284 description = { strings . summaryDescription }
287285 withAsteriskOnTitle
288- numPreferredColumns = { preferredColumnNoForSummary }
286+ numPreferredColumns = { 1 }
289287 >
290288 { summaryVisible && (
291- < TextInput
292- label = { strings . titleSecondaryLabel }
293- placeholder = { strings . titleInputPlaceholder }
294- name = "title"
295- value = { value . title }
296- maxLength = { 256 }
297- onChange = { onValueChange }
298- error = { error ?. title }
299- disabled = { disabled }
300- withAsterisk
301- />
289+ < >
290+ < TextInput
291+ label = { strings . titleSecondaryLabel }
292+ placeholder = { strings . titleInputPlaceholder }
293+ name = "title"
294+ value = { value . title }
295+ maxLength = { 256 }
296+ onChange = { onValueChange }
297+ error = { error ?. title }
298+ disabled = { disabled }
299+ withAsterisk
300+ />
301+ { isTruthyString ( value . summary ) && (
302+ < TextInput
303+ label = { strings . originalTitleSecondaryLabel }
304+ name = "summary"
305+ value = { value . summary }
306+ onChange = { onValueChange }
307+ error = { error ?. summary }
308+ disabled
309+ />
310+ ) }
311+ </ >
302312 ) }
303313 </ InputSection >
304314 < InputSection
0 commit comments