added saving for new
This commit is contained in:
1 parent
b4a9763ead
commit
644edb2ef6
10 files changed
+37
-8
No files matched your search
@@ -19,18 +19,21 @@ import { DAGAutomationGraph } from "components/DAGGraph";
|
||||
import { InputList } from "components/Inputs/InputList";
|
||||
import { InputTextView } from "components/Inputs/InputTextView";
|
||||
import { ControlButton } from "react-flow-renderer";
|
||||
import Edit from "@mui/icons-material/Edit";
|
||||
|
||||
interface Props {
|
||||
automation?: AutomationData;
|
||||
dims: DAGDims;
|
||||
onUpdate: (auto: AutomationData) => void;
|
||||
tagDB: TagDB;
|
||||
isNew?: boolean;
|
||||
}
|
||||
export const AutomationEditor: FC<Props> = ({
|
||||
dims,
|
||||
automation: propsAutos,
|
||||
onUpdate: propsOnUpdate,
|
||||
tagDB,
|
||||
isNew,
|
||||
}) => {
|
||||
// state
|
||||
const {
|
||||
@@ -188,10 +191,16 @@ export const AutomationEditor: FC<Props> = ({
|
||||
Flip
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
className={"automation-editor--flow-wrapper--toolbar--edit-btn"}
|
||||
onClick={() => setInfoBox(!infoBoxOpen)}
|
||||
>
|
||||
Metadata <Edit />
|
||||
</Button>
|
||||
<Button
|
||||
className={"automation-editor--flow-wrapper--toolbar--save-btn"}
|
||||
onClick={save}
|
||||
disabled={state.status !== "changed"}
|
||||
disabled={state.status !== "changed" && !isNew}
|
||||
>
|
||||
Save <CheckMarkIcon color="#bf4" />
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user