CEC-749 Fix types (#144)

This commit is contained in:
John Wu
2022-04-19 09:38:30 -07:00
committed by GitHub
parent 77d75c621d
commit 0fd2cf6dba
3 changed files with 13 additions and 13 deletions

View File

@@ -5644,7 +5644,7 @@ exports[`App Route /tools/certificates/add authenticated 1`] = `
class="PrivateSwitchBase-input-1436" class="PrivateSwitchBase-input-1436"
name="cert-type" name="cert-type"
type="radio" type="radio"
value="TREX" value="TBOX"
/> />
<div <div
class="PrivateRadioButtonIcon-root-1437 PrivateRadioButtonIcon-checked-1439" class="PrivateRadioButtonIcon-root-1437 PrivateRadioButtonIcon-checked-1439"
@@ -5678,7 +5678,7 @@ exports[`App Route /tools/certificates/add authenticated 1`] = `
<span <span
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1" class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
> >
TREX TBOX
</span> </span>
</label> </label>
<label <label
@@ -5695,7 +5695,7 @@ exports[`App Route /tools/certificates/add authenticated 1`] = `
class="PrivateSwitchBase-input-1436" class="PrivateSwitchBase-input-1436"
name="cert-type" name="cert-type"
type="radio" type="radio"
value="HMI" value="ICC"
/> />
<div <div
class="PrivateRadioButtonIcon-root-1437" class="PrivateRadioButtonIcon-root-1437"
@@ -5729,7 +5729,7 @@ exports[`App Route /tools/certificates/add authenticated 1`] = `
<span <span
class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1" class="MuiTypography-root MuiFormControlLabel-label MuiTypography-body1"
> >
HMI ICC
</span> </span>
</label> </label>
<label <label
@@ -5746,7 +5746,7 @@ exports[`App Route /tools/certificates/add authenticated 1`] = `
class="PrivateSwitchBase-input-1436" class="PrivateSwitchBase-input-1436"
name="cert-type" name="cert-type"
type="radio" type="radio"
value="CHARGE" value="Charging"
/> />
<div <div
class="PrivateRadioButtonIcon-root-1437" class="PrivateRadioButtonIcon-root-1437"

View File

@@ -14,7 +14,7 @@ import { CertTypes } from "../../Contexts/CertificateContext";
const CreateForm = ({ onCreate, busy }) => { const CreateForm = ({ onCreate, busy }) => {
const classes = useStyles(); const classes = useStyles();
const vinEl = useRef(null); const vinEl = useRef(null);
const [certType, setCertType] = useState(CertTypes.TREX); const [certType, setCertType] = useState(CertTypes.TBOX);
const onSubmit = async (event) => { const onSubmit = async (event) => {
event.preventDefault(); event.preventDefault();
@@ -56,14 +56,14 @@ const CreateForm = ({ onCreate, busy }) => {
margin="normal" margin="normal"
> >
<FormControlLabel <FormControlLabel
value={CertTypes.TREX} value={CertTypes.TBOX}
control={<Radio />} control={<Radio />}
label="TREX" label="TBOX"
/> />
<FormControlLabel <FormControlLabel
value={CertTypes.HMI} value={CertTypes.ICC}
control={<Radio />} control={<Radio />}
label="HMI" label="ICC"
/> />
<FormControlLabel <FormControlLabel
value={CertTypes.Charging} value={CertTypes.Charging}

View File

@@ -5,9 +5,9 @@ import api from "../../services/certificatesAPI";
const CertificateContext = React.createContext(); const CertificateContext = React.createContext();
export const CertTypes = { export const CertTypes = {
TREX: "TREX", TBOX: "TBOX",
HMI: "HMI", ICC: "ICC",
Charging: "CHARGE", Charging: "Charging",
}; };
const validateCreate = (data) => { const validateCreate = (data) => {