@@ -81,95 +81,100 @@ const LookupsView = () => {
8181
8282 return (
8383 < ApolloErrorHandler error = { error } >
84- < Page title = "Moped Data Dictionary" >
84+ < Page title = "Data Dictionary" >
8585 < Container maxWidth = "xl" >
86- < Grid container spacing = { 3 } sx = { { marginTop : 3 } } >
87- < Grid item xs = { 12 } >
88- < Typography variant = "h1" > Moped Data Dictionary</ Typography >
89- </ Grid >
90- </ Grid >
91- < Grid
92- container
93- spacing = { 3 }
94- sx = { { marginTop : 3 } }
95- component = { Paper }
96- ref = { refs . _scroll_to_top }
97- >
98- { SETTINGS . map ( ( recordType ) => (
99- < Grid item key = { recordType . key } sx = { { marginBottom : 3 } } >
100- < Button
101- color = "primary"
102- variant = "outlined"
103- component = { Link }
104- to = { createRecordKeyHash ( recordType . key ) }
105- onClick = { ( e ) => {
106- e . preventDefault ( ) ;
107- scrollToTable ( recordType . key , refs ) ;
108- history . replace ( createRecordKeyHash ( recordType . key ) ) ;
109- } }
110- >
111- { recordType . label }
112- </ Button >
113- </ Grid >
114- ) ) }
115- </ Grid >
116- { SETTINGS . map ( ( recordType ) => (
86+ < Paper sx = { { paddingLeft : 3 } } >
11787 < Grid
11888 container
11989 spacing = { 3 }
120- sx = { { marginTop : 3 } }
121- component = { Paper }
122- key = { recordType . key }
123- ref = { refs [ recordType . key ] }
90+ sx = { { marginTop : 3 , scrollMarginTop : 24 } }
91+ ref = { refs . _scroll_to_top }
12492 >
12593 < Grid item xs = { 12 } >
126- < Grid container direction = "row" alignItems = "center" >
127- < Grid item >
128- < Typography variant = "h2" > { recordType . label } </ Typography >
129- </ Grid >
94+ < Typography variant = "h1" color = "primary" >
95+ Data dictionary
96+ </ Typography >
97+ </ Grid >
98+ { SETTINGS . map ( ( recordType ) => (
99+ < Grid item key = { recordType . key } sx = { { marginBottom : 3 } } >
100+ < Button
101+ color = "primary"
102+ variant = "outlined"
103+ component = { Link }
104+ to = { createRecordKeyHash ( recordType . key ) }
105+ onClick = { ( e ) => {
106+ e . preventDefault ( ) ;
107+ scrollToTable ( recordType . key , refs ) ;
108+ history . replace ( createRecordKeyHash ( recordType . key ) ) ;
109+ } }
110+ >
111+ { recordType . label }
112+ </ Button >
113+ </ Grid >
114+ ) ) }
115+ </ Grid >
116+ </ Paper >
130117
131- < Grid item >
132- < Tooltip title = "Link to this table" >
133- < IconButton
134- component = { Link }
135- to = { createRecordKeyHash ( recordType . key ) }
136- onClick = { ( e ) => {
137- e . preventDefault ( ) ;
138- scrollToTable ( recordType . key , refs ) ;
139- history . replace ( createRecordKeyHash ( recordType . key ) ) ;
140- } }
141- size = "large"
142- >
143- < LinkIcon fontSize = "small" />
144- </ IconButton >
145- </ Tooltip >
146- </ Grid >
147- < Grid item >
148- < Tooltip title = "Return to top of page" >
149- < IconButton
150- component = { Link }
151- to = { "#" }
152- onClick = { ( e ) => {
153- e . preventDefault ( ) ;
154- scrollToTable ( "_scroll_to_top" , refs ) ;
155- history . replace ( "" ) ;
156- } }
157- size = "large"
158- >
159- < ArrowUpwardIcon fontSize = "small" />
160- </ IconButton >
161- </ Tooltip >
162- </ Grid >
163- < Grid item xs = { 12 } >
164- < RecordTable
165- rows = { data ?. [ recordType . key ] }
166- columns = { recordType . columns }
167- loading = { loading }
168- />
118+ { SETTINGS . map ( ( recordType ) => (
119+ < Paper sx = { { paddingLeft : 3 } } >
120+ < Grid
121+ container
122+ spacing = { 3 }
123+ sx = { { marginTop : 3 } }
124+ key = { recordType . key }
125+ ref = { refs [ recordType . key ] }
126+ >
127+ < Grid item xs = { 12 } >
128+ < Grid container direction = "row" alignItems = "center" >
129+ < Grid item >
130+ < Typography variant = "h2" > { recordType . label } </ Typography >
131+ </ Grid >
132+
133+ < Grid item >
134+ < Tooltip title = "Link to this table" >
135+ < IconButton
136+ component = { Link }
137+ to = { createRecordKeyHash ( recordType . key ) }
138+ onClick = { ( e ) => {
139+ e . preventDefault ( ) ;
140+ scrollToTable ( recordType . key , refs ) ;
141+ history . replace (
142+ createRecordKeyHash ( recordType . key )
143+ ) ;
144+ } }
145+ size = "large"
146+ >
147+ < LinkIcon fontSize = "small" />
148+ </ IconButton >
149+ </ Tooltip >
150+ </ Grid >
151+ < Grid item >
152+ < Tooltip title = "Return to top of page" >
153+ < IconButton
154+ component = { Link }
155+ to = { "#" }
156+ onClick = { ( e ) => {
157+ e . preventDefault ( ) ;
158+ scrollToTable ( "_scroll_to_top" , refs ) ;
159+ history . replace ( "" ) ;
160+ } }
161+ size = "large"
162+ >
163+ < ArrowUpwardIcon fontSize = "small" />
164+ </ IconButton >
165+ </ Tooltip >
166+ </ Grid >
167+ < Grid item xs = { 12 } >
168+ < RecordTable
169+ rows = { data ?. [ recordType . key ] }
170+ columns = { recordType . columns }
171+ loading = { loading }
172+ />
173+ </ Grid >
169174 </ Grid >
170175 </ Grid >
171176 </ Grid >
172- </ Grid >
177+ </ Paper >
173178 ) ) }
174179 </ Container >
175180 </ Page >
0 commit comments