Skip to content

Commit

Permalink
Merge pull request #1523 from cityofaustin/20021-remove-proj-types
Browse files Browse the repository at this point in the history
Remove project types input from project summary view and project list
  • Loading branch information
chiaberry authored Jan 16, 2025
2 parents fc6c114 + b5597c8 commit 88c1044
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 279 deletions.
3 changes: 0 additions & 3 deletions moped-editor/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ const useClient = (user) =>
moped_phases: {
keyFields: ["phase_id"],
},
moped_types: {
keyFields: ["type_id"],
},
},
}),
});
Expand Down
44 changes: 0 additions & 44 deletions moped-editor/src/queries/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ export const ADD_PROJECT = gql`
phase_id
is_current_phase
}
moped_project_types {
project_type_id
}
}
}
`;
Expand Down Expand Up @@ -65,13 +62,6 @@ export const SUMMARY_QUERY = gql`
}
created_at
}
moped_project_types(where: { is_deleted: { _eq: false } }) {
id
moped_type {
type_name
type_id
}
}
moped_entity {
entity_name
entity_id
Expand Down Expand Up @@ -116,10 +106,6 @@ export const SUMMARY_QUERY = gql`
id
name
}
moped_types(order_by: { type_name: asc }) {
type_id
type_name
}
moped_user_followed_projects(
where: { project_id: { _eq: $projectId }, user_id: { _eq: $userId } }
) {
Expand Down Expand Up @@ -158,15 +144,6 @@ export const SUMMARY_QUERY = gql`
}
`;

export const TYPES_QUERY = gql`
query TypeQuery {
moped_types(order_by: { type_name: asc }) {
type_id
type_name
}
}
`;

export const TEAM_QUERY = gql`
query TeamQuery($projectId: Int!) {
moped_project_by_pk(project_id: $projectId) {
Expand Down Expand Up @@ -842,23 +819,6 @@ export const PROJECT_UPDATE_DESCRIPTION = gql`
}
`;

export const PROJECT_UPDATE_TYPES = gql`
mutation UpdateMopedProjectTypes(
$types: [moped_project_types_insert_input!]!
$deleteList: [Int!]!
) {
insert_moped_project_types(objects: $types) {
affected_rows
}
update_moped_project_types(
where: { id: { _in: $deleteList } }
_set: { is_deleted: true }
) {
affected_rows
}
}
`;

export const PROJECT_UPDATE_ECAPRIS_SUBPROJECT_ID = gql`
mutation UpdateProjectECapris($projectId: Int!, $eCapris: String!) {
update_moped_project(
Expand Down Expand Up @@ -964,10 +924,6 @@ export const LOOKUP_TABLES_QUERY = gql`
funding_program_id
funding_program_name
}
moped_types(order_by: { type_name: asc }) {
type_id
type_name
}
moped_entity(order_by: { entity_id: asc }) {
entity_id
entity_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import ProjectSummaryProjectWebsite from "./ProjectSummaryProjectWebsite";
import ProjectSummaryProjectDescription from "./ProjectSummaryProjectDescription";
import ProjectSummaryParentProjectLink from "./ProjectSummaryParentProjectLink";
import ProjectSummaryProjectECapris from "./ProjectSummaryProjectECapris";
import ProjectSummaryProjectTypes from "./ProjectSummaryProjectTypes";
import ProjectSummaryDataTrackerSignals from "./ProjectSummaryDataTrackerSignals";
import ProjectSummaryWorkOrders from "./ProjectSummaryWorkOrders";
import ProjectSummaryInterimID from "./ProjectSummaryInterimID";
Expand Down Expand Up @@ -225,15 +224,6 @@ const ProjectSummary = ({ loading, error, data, refetch, listViewQuery }) => {
tooltipText="Other internal or external workgroups participating in the project"
/>
</Grid>
<Grid item xs={12}>
<ProjectSummaryProjectTypes
projectId={projectId}
data={data}
refetch={refetch}
classes={classes}
snackbarHandle={snackbarHandle}
/>
</Grid>
<Grid item xs={12}>
<ProjectSummaryComponentWorkTypes
data={data}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ export const PROJECT_LIST_VIEW_EXPORT_CONFIG = {
label: "Signal IDs",
filter: filterProjectSignals,
},
type_name: {
label: "Type",
},
funding_source_and_program_names: {
label: "Funding",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,6 @@ export const PROJECT_LIST_VIEW_FILTERS_CONFIG = {
"number_less_than_equal_to",
],
},
type_name: {
name: "type_name",
label: "Type",
placeholder: "Enter Project type",
type: "string",
defaultOperator: "string_contains_case_insensitive",
lookup: {
table_name: "moped_types",
getOptionLabel: (option) => option.type_name,
operators: [
"string_contains_case_insensitive",
"string_contains_not_case_insensitive",
"string_equals_case_insensitive",
"string_does_not_equal_case_insensitive",
],
},
operators: [
"string_contains_case_insensitive",
"string_contains_not_case_insensitive",
"string_equals_case_insensitive",
"string_does_not_equal_case_insensitive",
"string_begins_with_case_insensitive",
"string_ends_with_case_insensitive",
"string_is_null",
"string_is_not_null",
],
},
component_work_type_names: {
name: "component_work_type_names",
label: "Component work types",
Expand Down
6 changes: 0 additions & 6 deletions moped-editor/src/views/projects/projectsListView/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,6 @@ export const useColumns = ({ hiddenColumns }) => {
},
width: COLUMN_WIDTHS.medium,
},
{
headerName: "Type",
field: "type_name",
renderCell: ({ row }) => renderSplitListDisplayBlock(row, "type_name"),
width: COLUMN_WIDTHS.medium,
},
{
headerName: "Component work types",
field: "component_work_type_names",
Expand Down
2 changes: 1 addition & 1 deletion pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Testing
**URL to test:**
<!---
[branch-name]--atd-moped-main.netlify.app/moped/ if test instance or deploy-preview-[pr-number]--atd-moped-main.netlify.app/moped/
deploy-preview-[pr-number]--atd-moped-main.netlify.app/moped/
--->

**Steps to test:**
Expand Down

0 comments on commit 88c1044

Please sign in to comment.