feature/IO-3255-simplified-parts-management - centralize alerts

This commit is contained in:
Dave
2025-08-13 18:22:12 -04:00
parent 81d642fcd3
commit a3122a59b1
4 changed files with 111 additions and 154 deletions

View File

@@ -6,24 +6,15 @@ import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import WssStatusDisplayComponent from "../../components/wss-status-display/wss-status-display.component.jsx";
import { addAlerts } from "../../redux/application/application.actions.js";
import { selectAlerts, selectIsPartsEntry } from "../../redux/application/application.selectors.js";
import { selectBodyshop, selectInstanceConflict } from "../../redux/user/user.selectors";
import { selectIsPartsEntry } from "../../redux/application/application.selectors.js";
import InstanceRenderManager from "../../utils/instanceRenderMgr.js";
const { Footer } = Layout;
const mapStateToProps = createStructuredSelector({
conflict: selectInstanceConflict,
bodyshop: selectBodyshop,
alerts: selectAlerts,
isPartsEntry: selectIsPartsEntry
});
const mapDispatchToProps = (dispatch) => ({
setAlerts: (alerts) => dispatch(addAlerts(alerts))
});
export function GlobalFooter({ isPartsEntry }) {
const { t } = useTranslation();
@@ -101,4 +92,4 @@ export function GlobalFooter({ isPartsEntry }) {
);
}
export default connect(mapStateToProps, mapDispatchToProps)(GlobalFooter);
export default connect(mapStateToProps)(GlobalFooter);