Fixed Job Builder
This commit is contained in:
parent
59fe1eda7f
commit
66dbd05558
4 changed files with 16 additions and 15 deletions
|
@ -16,8 +16,8 @@ import PageviewIcon from "@mui/icons-material/Pageview";
|
||||||
import ViewColumnIcon from "@mui/icons-material/ViewColumn";
|
import ViewColumnIcon from "@mui/icons-material/ViewColumn";
|
||||||
import ViewCarouselIcon from "@mui/icons-material/ViewCarousel";
|
import ViewCarouselIcon from "@mui/icons-material/ViewCarousel";
|
||||||
|
|
||||||
import IndividualSelector from "./IndividualSelector.jsx";
|
import ManualSelector from "./ManualSelector.jsx";
|
||||||
import IndividualConfirm from "./IndividualConfirm.jsx";
|
import ManualConfirm from "./ManualConfirm.jsx";
|
||||||
|
|
||||||
import GroupSelector from "./GroupSelector.jsx";
|
import GroupSelector from "./GroupSelector.jsx";
|
||||||
import GroupConfirm from "./GroupConfirm.jsx";
|
import GroupConfirm from "./GroupConfirm.jsx";
|
||||||
|
@ -37,7 +37,7 @@ export default function JobBuilder() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!store.simplifiedControls) return setQuickOpen(!quickOpen);
|
if (!store.simplifiedControls) return setQuickOpen(!quickOpen);
|
||||||
setBuilderPage("individualSelect");
|
setBuilderPage("groupSelect");
|
||||||
setJobDialogOpen(true);
|
setJobDialogOpen(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,25 +60,25 @@ export default function JobBuilder() {
|
||||||
const actions = [
|
const actions = [
|
||||||
{ name: "Suite", icon: <ViewCarouselIcon />, page: "groupSelect" },
|
{ name: "Suite", icon: <ViewCarouselIcon />, page: "groupSelect" },
|
||||||
{ name: "Compound", icon: <ViewColumnIcon />, page: "pipelineSelect" },
|
{ name: "Compound", icon: <ViewColumnIcon />, page: "pipelineSelect" },
|
||||||
{ name: "Manual", icon: <PageviewIcon />, page: "individualSelect" },
|
{ name: "Manual", icon: <PageviewIcon />, page: "manualSelect" },
|
||||||
];
|
];
|
||||||
|
|
||||||
const changePage = (page) => () => setBuilderPage(page);
|
const changePage = (page) => () => setBuilderPage(page);
|
||||||
|
|
||||||
const pages = {
|
const pages = {
|
||||||
individualSelect: (
|
manualSelect: (
|
||||||
<IndividualSelector
|
<ManualSelector
|
||||||
cache={cache}
|
cache={cache}
|
||||||
setCache={setCache}
|
setCache={setCache}
|
||||||
cancel={handleClose()}
|
cancel={handleClose()}
|
||||||
next={changePage("individualConfirm")}
|
next={changePage("manualConfirm")}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
individualConfirm: (
|
manualConfirm: (
|
||||||
<IndividualConfirm
|
<ManualConfirm
|
||||||
cache={cache}
|
cache={cache}
|
||||||
setCache={setCache}
|
setCache={setCache}
|
||||||
back={changePage("individualSelect")}
|
back={changePage("manualSelect")}
|
||||||
start={handleClose(true)}
|
start={handleClose(true)}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
|
|
@ -3,13 +3,13 @@ import Button from "@mui/material/Button";
|
||||||
import DialogActions from "@mui/material/DialogActions";
|
import DialogActions from "@mui/material/DialogActions";
|
||||||
import DialogContent from "@mui/material/DialogContent";
|
import DialogContent from "@mui/material/DialogContent";
|
||||||
|
|
||||||
function IndividualConfirm(props) {
|
function ManualConfirm(props) {
|
||||||
const { cache, setCache, back, start } = props;
|
const { cache, setCache, back, start } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<DialogContent>
|
<DialogContent>
|
||||||
<h3>Individual Confirm?</h3>
|
<h3>Manual Confirm?</h3>
|
||||||
{JSON.stringify(cache)}
|
{JSON.stringify(cache)}
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
|
@ -22,4 +22,4 @@ function IndividualConfirm(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IndividualConfirm;
|
export default ManualConfirm;
|
|
@ -3,7 +3,7 @@ import Button from "@mui/material/Button";
|
||||||
import DialogActions from "@mui/material/DialogActions";
|
import DialogActions from "@mui/material/DialogActions";
|
||||||
import DialogContent from "@mui/material/DialogContent";
|
import DialogContent from "@mui/material/DialogContent";
|
||||||
|
|
||||||
function IndividualSelector(props) {
|
function ManualSelector(props) {
|
||||||
const { cache, setCache, cancel, next } = props;
|
const { cache, setCache, cancel, next } = props;
|
||||||
function makeReq() {
|
function makeReq() {
|
||||||
setCache({
|
setCache({
|
||||||
|
@ -27,4 +27,4 @@ function IndividualSelector(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default IndividualSelector;
|
export default ManualSelector;
|
|
@ -44,6 +44,7 @@ function PipelineSelector(props) {
|
||||||
<Typography
|
<Typography
|
||||||
component={"span"}
|
component={"span"}
|
||||||
style={{ wordBreak: "break-word", margin: "auto 0" }}
|
style={{ wordBreak: "break-word", margin: "auto 0" }}
|
||||||
|
color={(cache.primarySelectedMappings ?? [[]])[0][0] ===k ? "primary": null}
|
||||||
>
|
>
|
||||||
{k}
|
{k}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue