File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
src/components/ProjectDataGrid Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
27
27
} from '../Grid' ;
28
28
import { ProjectNameColumn } from '../Grid/Columns/ProjectNameColumn' ;
29
29
import { SensitivityColumn } from '../Grid/Columns/SensitivityColumn' ;
30
+ import { Link } from '../Routing' ;
30
31
import { ProjectDataGridRowFragment as Project } from './projectDataGridRow.graphql' ;
31
32
32
33
export const ProjectColumns : Array < GridColDef < Project > > = [
@@ -43,6 +44,21 @@ export const ProjectColumns: Array<GridColDef<Project>> = [
43
44
headerName : 'Country' ,
44
45
width : 300 ,
45
46
} ,
47
+ {
48
+ field : 'fieldRegion.name' ,
49
+ headerName : 'Field Region' ,
50
+ ...textColumn ( ) ,
51
+ width : 250 ,
52
+ valueGetter : ( _ , { fieldRegion } ) => fieldRegion . value ?. name . value ,
53
+ renderCell : ( { row : project } ) => {
54
+ const { fieldRegion } = project ;
55
+ return (
56
+ < Link to = { `/field-regions/${ fieldRegion . value ?. id } ` } >
57
+ { fieldRegion . value ?. name . value }
58
+ </ Link >
59
+ ) ;
60
+ } ,
61
+ } ,
46
62
{
47
63
field : 'step' ,
48
64
...enumColumn ( ProjectStepList , ProjectStepLabels , {
Original file line number Diff line number Diff line change @@ -18,12 +18,21 @@ fragment projectDataGridRow on Project {
18
18
}
19
19
}
20
20
}
21
+ fieldRegion {
22
+ value {
23
+ id
24
+ name {
25
+ value
26
+ }
27
+ }
28
+ }
21
29
mouStart {
22
30
value
23
31
}
24
32
mouEnd {
25
33
value
26
34
}
35
+
27
36
isMember
28
37
pinned
29
38
}
You can’t perform that action at this time.
0 commit comments