diff --git a/src/components/Manifest/Deploy/Configure.jsx b/src/components/Manifest/Deploy/Configure.jsx index f22dece..c56aaa4 100644 --- a/src/components/Manifest/Deploy/Configure.jsx +++ b/src/components/Manifest/Deploy/Configure.jsx @@ -1,7 +1,9 @@ import { useEffect, useState } from "react"; import { Box, + Checkbox, FormControl, + FormControlLabel, IconButton, Input, InputLabel, @@ -101,6 +103,7 @@ export default function Configure({ handleClose(); if (diffManifestFields(manifest, localManifest)) { try { + console.log(localManifest) localManifest.update_duration = parseInt(localManifest.update_duration); localManifest.max_attempts = parseInt(localManifest.max_attempts); @@ -149,6 +152,12 @@ export default function Configure({ {manifest.name ? ({manifest.name}) : `This manifest`} is incomplete, and cannot be deployed without all required fields filled out.
+ handleManifestField("notify_sap", e.target.checked)} + /> + } label="Notify SAP for OTA Campaign" /> { const [env, setEnv] = useState("current"); const [updateDuration, setUpdateDuration] = useState(0); const [maxAttempts, setMaxAttempts] = useState(0); + const [notifySAP, setNotifySAP] = useState(false); const changeName = (e) => { setName(e.target.value); @@ -98,6 +99,10 @@ const MainForm = () => { setMaxAttempts(value); } + const changeNotifySAP = (event) => { + setNotifySAP(event.target.checked); + } + const onSubmit = async (e) => { e.preventDefault(); try { @@ -110,6 +115,7 @@ const MainForm = () => { env, update_duration: parseInt(updateDuration), max_attempts: parseInt(maxAttempts), + notify_sap: notifySAP, }, token); if (!result || result.error) return; @@ -148,6 +154,7 @@ const MainForm = () => { setEnv(result.env ?? "current"); setUpdateDuration(result.update_duration); setMaxAttempts(result.max_attempts); + setNotifySAP(result.notify_sap); } } catch (e) { setMessage(e.message); @@ -239,6 +246,12 @@ const MainForm = () => { value={maxAttempts} setValue={changeMaxAttempts} /> + + } label="Notify SAP for OTA Campaign" />