Skip to content

Commit

Permalink
Merge pull request #1181 from cityofaustin/14351-phase-confirm-activity
Browse files Browse the repository at this point in the history
Ignore phase date confirmed activities in activity log
  • Loading branch information
chiaberry authored Oct 26, 2023
2 parents 206b9bc + f509701 commit 6be2f54
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EventNoteOutlinedIcon from '@mui/icons-material/EventNoteOutlined';
import EventNoteOutlinedIcon from "@mui/icons-material/EventNoteOutlined";
import { ProjectActivityLogTableMaps } from "../../views/projects/projectView/ProjectActivityLogTableMaps";

export const formatPhasesActivity = (change, phaseList, subphaseList) => {
Expand Down Expand Up @@ -53,7 +53,14 @@ export const formatPhasesActivity = (change, phaseList, subphaseList) => {
// loop through fields to check for differences, push label onto changes Array
Object.keys(newRecord).forEach((field) => {
if (newRecord[field] !== oldRecord[field]) {
changes.push(entryMap.fields[field]?.label);
// phase end and start confirmed are in the moped_proj_phases table but not in the UI
// ignore changes to that field until its visually represented to users
if (
field !== "is_phase_end_confirmed" &&
field !== "is_phase_start_confirmed"
) {
changes.push(entryMap.fields[field]?.label);
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,12 @@ export const ProjectActivityLogTableMaps = {
subphase_id: {
label: "subphase",
},
is_phase_start_confirmed: {
label: "start date confirmation"
},
is_phase_end_confirmed: {
label: "end date confirmation"
}
},
},
moped_proj_components: {
Expand Down

0 comments on commit 6be2f54

Please sign in to comment.