Skip to content

Commit 2e5c673

Browse files
committed
Merge branch 'main' into funding-collector
2 parents c07a57a + d055daf commit 2e5c673

14 files changed

Lines changed: 208 additions & 140 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- If we delete the component in the future, we will soft delete and leave existing data intact
2+
SELECT 0;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- Add VZ CSP MC1.2 project and component tags
2+
INSERT INTO moped_component_tags (type, name, slug)
3+
SELECT
4+
'Vision Zero',
5+
'CSP MC1.2',
6+
'vision_zero_citywide_strategic_plan_mc1_2'
7+
WHERE NOT EXISTS (
8+
SELECT 1 FROM moped_component_tags
9+
WHERE type = 'Vision Zero'
10+
AND name = 'CSP MC1.2'
11+
);
12+
13+
INSERT INTO moped_tags (name, type, slug)
14+
SELECT
15+
'Vision Zero - CSP MC1.2',
16+
'Other',
17+
'vision_zero_citywide_strategic_plan_mc1_2'
18+
WHERE NOT EXISTS (
19+
SELECT 1 FROM moped_tags
20+
WHERE name = 'Vision Zero - CSP MC1.2'
21+
AND type = 'Other'
22+
);

moped-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "atd-moped-editor",
33
"author": "ATD Data & Technology Services",
44
"license": "CC0-1.0",
5-
"version": "2.49.0",
5+
"version": "2.50.0",
66
"homepage": "/moped",
77
"private": false,
88
"repository": {

moped-editor/src/layouts/DashboardLayout/DashboardLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const DashboardLayout = () => {
4141
</Box>
4242
<Box
4343
sx={{
44-
flex: "1 1 auto", // Take remaining space after static AppBar in TopBar
44+
flex: "1 1 auto", // Take remaining space after sticky AppBar in TopBar
4545
overflow: "auto",
4646
display: "flex",
4747
flexDirection: "column",

moped-editor/src/layouts/DashboardLayout/TopBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const TopBar = ({ className, ...rest }) => {
7272
<AppBar
7373
sx={{ backgroundColor: "background.paper" }}
7474
elevation={2}
75-
position="static" // Set static this component works with flex set in DashboardLayout
75+
position="sticky"
7676
{...rest}
7777
>
7878
<EnvAlertBanner />

moped-editor/src/views/dev/LookupsView/index.js

Lines changed: 84 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -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>

moped-editor/src/views/dev/LookupsView/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const SETTINGS = [
237237
},
238238
{
239239
key: "moped_tags",
240-
label: "Tags",
240+
label: "Project tags",
241241
columns: [
242242
{
243243
key: "id",

moped-editor/src/views/projects/projectView/ProjectComponents/ComponentForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ const ComponentForm = ({
357357
<Grid item xs={12}>
358358
<ControlledAutocomplete
359359
id="tags"
360-
label="Tags"
360+
label="Component tags"
361361
multiple
362362
options={componentTagsOptions}
363363
getOptionLabel={getOptionLabel}

moped-editor/src/views/projects/projectView/ProjectSummary/TagsSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const TagsSection = ({ projectId, handleSnackbar }) => {
119119
>
120120
<Toolbar sx={{ paddingRight: "3px" }} disableGutters={true}>
121121
<Typography variant="h2" color="primary" sx={{ flexGrow: 1 }}>
122-
Tags
122+
Project tags
123123
</Typography>
124124
<Button
125125
variant="contained"

moped-editor/src/views/projects/projectsListView/ProjectsListViewFiltersConf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export const PROJECT_LIST_VIEW_FILTERS_CONFIG = {
447447
project_tags: {
448448
name: "project_tags",
449449
label: "Project tags",
450-
placeholder: "Tags",
450+
placeholder: "Project tags",
451451
type: "string",
452452
lookup: {
453453
table_name: "moped_tags",

0 commit comments

Comments
 (0)