Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MDS-6176] Save project summary changes in Core #3255

Merged
merged 6 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions services/core-web/src/components/mine/Projects/ProjectSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import * as routes from "@/constants/routes";
import { Button, Col, Row, Tag } from "antd";
import EnvironmentOutlined from "@ant-design/icons/EnvironmentOutlined";
import ArrowLeftOutlined from "@ant-design/icons/ArrowLeftOutlined";
import { getSystemFlag } from "@mds/common/redux/selectors/authenticationSelectors";

import {
getFormattedProjectSummary,
Expand All @@ -19,6 +18,7 @@ import {
AMS_STATUS_CODES_SUCCESS,
AMS_STATUS_CODE_FAIL,
AMS_ENVIRONMENTAL_MANAGEMENT_ACT_TYPES,
SystemFlagEnum,
} from "@mds/common";
import { getMineById } from "@mds/common/redux/reducers/mineReducer";
import withFeatureFlag from "@mds/common/providers/featureFlags/withFeatureFlag";
Expand All @@ -37,6 +37,7 @@ import ProjectSummaryForm, {
} from "@mds/common/components/projectSummary/ProjectSummaryForm";
import { fetchRegions } from "@mds/common/redux/slices/regionsSlice";
import { clearProjectSummary } from "@mds/common/redux/actions/projectActions";
import { getSystemFlag } from "@mds/common/redux/selectors/authenticationSelectors";

export const ProjectSummary: FC = () => {
const dispatch = useDispatch();
Expand All @@ -50,6 +51,9 @@ export const ProjectSummary: FC = () => {
mode: string;
}>();

const systemFlag = useSelector(getSystemFlag);
const isCore = systemFlag === SystemFlagEnum.core;

const mine = useSelector((state) => getMineById(state, mineGuid));
const formattedProjectSummary = useSelector(getFormattedProjectSummary);
const project = useSelector(getProject);
Expand Down Expand Up @@ -80,7 +84,6 @@ export const ProjectSummary: FC = () => {
const activeTab = tab ?? projectFormTabs[0];
const mineName = mine?.mine_name ?? formattedProjectSummary?.mine_name ?? "";
const formValues = useSelector(getFormValues(FORM.ADD_EDIT_PROJECT_SUMMARY));
const systemFlag = useSelector(getSystemFlag);

const handleFetchData = async () => {
setIsLoaded(false);
Expand Down Expand Up @@ -208,13 +211,17 @@ export const ProjectSummary: FC = () => {
if (!status_code || isNewProject) {
status_code = "DFT";
} else if (!newActiveTab) {
status_code = "SUB";
if (isCore) {
status_code = formValues.status_code;
} else {
status_code = "SUB";
}
is_historic = false;
if (amsFeatureEnabled) {
message = null;
}
}
const values = { ...formValues, status_code: status_code };
const values = { ...formValues, status_code };

try {
if (isNewProject) {
Expand Down
2 changes: 1 addition & 1 deletion services/database/postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgis/postgis:13-3.0
FROM postgis/postgis:13-3.4

RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y --no-install-recommends \
make \
Expand Down
2 changes: 1 addition & 1 deletion services/postgres/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgis/postgis:13-3.0
FROM postgis/postgis:13-3.4

# The Git ref (branch/tag) specifying the version of oracle-fdw to use
# This is referencing a specific revision (master as of 2021.06.01)
Expand Down
Loading