@@ -20,7 +20,7 @@ import ControlledTextField from "../shared/controlledInputComponents/ControlledT
20
20
import { SpecialFieldGrid } from "../shared/specialField" ;
21
21
import {
22
22
SpecialFieldEntityEnum ,
23
- SpecialFields ,
23
+ SPECIAL_FIELDS ,
24
24
} from "../../constants/application-constant" ;
25
25
import { Else , If , Then , When } from "react-if" ;
26
26
import Icons from "../icons" ;
@@ -227,7 +227,7 @@ export default function ProjectForm({ ...props }) {
227
227
>
228
228
< ETFormLabel required > Name</ ETFormLabel >
229
229
< When condition = { disabled } >
230
- < If condition = { specialField === SpecialFields . PROJECT . NAME } >
230
+ < If condition = { specialField === SPECIAL_FIELDS . PROJECT . NAME } >
231
231
< Then >
232
232
< IconButton onClick = { ( ) => setSpecialField ( "" ) } >
233
233
< LockOpenIcon fill = { Palette . primary . accent . main } />
@@ -236,7 +236,7 @@ export default function ProjectForm({ ...props }) {
236
236
< Else >
237
237
< IconButton
238
238
onClick = { ( ) =>
239
- setSpecialField ( SpecialFields . PROJECT . NAME )
239
+ setSpecialField ( SPECIAL_FIELDS . PROJECT . NAME )
240
240
}
241
241
>
242
242
< LockClosedIcon fill = { Palette . primary . accent . main } />
@@ -265,7 +265,9 @@ export default function ProjectForm({ ...props }) {
265
265
< ETFormLabel required > Proponent</ ETFormLabel >
266
266
< When condition = { disabled } >
267
267
< If
268
- condition = { specialField === SpecialFields . PROJECT . PROPONENT }
268
+ condition = {
269
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
270
+ }
269
271
>
270
272
< Then >
271
273
< IconButton onClick = { ( ) => setSpecialField ( "" ) } >
@@ -275,7 +277,7 @@ export default function ProjectForm({ ...props }) {
275
277
< Else >
276
278
< IconButton
277
279
onClick = { ( ) =>
278
- setSpecialField ( SpecialFields . PROJECT . PROPONENT )
280
+ setSpecialField ( SPECIAL_FIELDS . PROJECT . PROPONENT )
279
281
}
280
282
>
281
283
< LockClosedIcon fill = { Palette . primary . accent . main } />
@@ -303,33 +305,33 @@ export default function ProjectForm({ ...props }) {
303
305
entity_id = { ( ctx . item as Project ) ?. id }
304
306
fieldName = { specialField }
305
307
fieldLabel = {
306
- specialField === SpecialFields . PROJECT . PROPONENT
308
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
307
309
? "Proponent Name"
308
310
: "Name"
309
311
}
310
312
fieldType = {
311
- specialField === SpecialFields . PROJECT . PROPONENT
313
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
312
314
? "select"
313
315
: "text"
314
316
}
315
317
title = {
316
- specialField === SpecialFields . PROJECT . PROPONENT
318
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
317
319
? "Proponet History"
318
320
: ( ctx . item as Project ) ?. name
319
321
}
320
322
description = {
321
323
< >
322
324
< When
323
325
condition = {
324
- specialField === SpecialFields . PROJECT . PROPONENT
326
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
325
327
}
326
328
>
327
329
Update the Proponent of this Project.{ " " }
328
330
< a href = "#" > Click this link</ a > for detailed
329
331
instructions.
330
332
</ When >
331
333
< When
332
- condition = { specialField === SpecialFields . PROJECT . NAME }
334
+ condition = { specialField === SPECIAL_FIELDS . PROJECT . NAME }
333
335
>
334
336
Update the legal name of the Project and the dates each
335
337
name was in legal use. < a href = "#" > Click this link</ a > { " " }
@@ -338,7 +340,7 @@ export default function ProjectForm({ ...props }) {
338
340
</ >
339
341
}
340
342
options = {
341
- specialField === SpecialFields . PROJECT . PROPONENT
343
+ specialField === SPECIAL_FIELDS . PROJECT . PROPONENT
342
344
? proponents ?. map ( ( p ) => ( {
343
345
label : p . name ,
344
346
value : p . id . toString ( ) ,
0 commit comments