Commit a821efd 1 parent c89747e commit a821efd Copy full SHA for a821efd
File tree 1 file changed +3
-8
lines changed
relog-web/src/casebuilder
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,8 @@ const PlantBlock = (props) => {
63
63
} ) ;
64
64
const result = { } ;
65
65
data . forEach ( ( el ) => {
66
- result [ el [ "name" ] ] = {
67
- "latitude (deg)" : el [ "latitude (deg)" ] ,
68
- "longitude (deg)" : el [ "longitude (deg)" ] ,
69
- "area cost factor" : el [ "area cost factor" ] ,
70
- } ;
66
+ let { name, ...props } = el ;
67
+ result [ name ] = props ;
71
68
} ) ;
72
69
onChange ( result , "locations" ) ;
73
70
} ;
@@ -79,9 +76,7 @@ const PlantBlock = (props) => {
79
76
) ) {
80
77
result . push ( {
81
78
name : locationName ,
82
- "latitude (deg)" : locationDict [ "latitude (deg)" ] ,
83
- "longitude (deg)" : locationDict [ "longitude (deg)" ] ,
84
- "area cost factor" : locationDict [ "area cost factor" ] ,
79
+ ...locationDict ,
85
80
} ) ;
86
81
}
87
82
generateFile ( `Candidate locations - ${ props . name } .csv` , csvFormat ( result ) ) ;
You can’t perform that action at this time.
0 commit comments