feature/IO-2681-Share-To-Teams-Button - checkpoint

This commit is contained in:
Dave Richer
2025-01-29 18:19:34 -05:00
parent 71a74c5437
commit a064b8e07e
10 changed files with 223 additions and 31 deletions

View File

@@ -31,6 +31,7 @@ import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
import JobsDetailHeaderActionsToggleProduction from "./jobs-detail-header-actions.toggle-production";
import SocketContext from "../../contexts/SocketIO/socketContext.jsx";
import ShareToTeamsButton from "../share-to-teams/share-to-teams-button.jsx";
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
@@ -130,10 +131,10 @@ export function JobsDetailHeaderActions({
const { socket } = useContext(SocketContext);
const {
treatments: { ImEXPay }
treatments: { ImEXPay, Share_To_Teams }
} = useSplitTreatments({
attributes: {},
names: ["ImEXPay"],
names: ["ImEXPay", "Share_To_Teams"],
splitKey: bodyshop && bodyshop.imexshopid
});
@@ -962,6 +963,16 @@ export function JobsDetailHeaderActions({
}
);
// TODO REMEMBER TO REVERT
// if (Share_To_Teams?.treatment === "on") {
if (true) {
menuItems.push({
key: "sharetoteams",
id: "job-actions-sharetoteams",
label: <ShareToTeamsButton noIcon={true} urlOverride={`${window.location.origin}${window.location.pathname}`} />
});
}
menuItems.push({
key: "exportcustdata",
id: "job-actions-exportcustdata",