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