pull/84/head
jimmys-box 2 years ago
parent 935c30e57f
commit ac442d1113

@ -82,8 +82,8 @@ const CandidateField = ({avatar, label, description, candIndex, onDelete, onAdd,
setCreateObjectURL(URL.createObjectURL(i));
}
};
const test = {...inputProps};
console.log(test);
return (
<Row className="rowNoMargin">
<div className={className}>

@ -53,8 +53,7 @@ const CandidatesField = ({onChange}) => {
const removeCandidate = index => {
if (candidates.length === 1) {
const newCandidates = []
newCandidates.push({label: "", description: "", fieldRef: createRef()});
newCandidates.push({label: "", description: "", fieldRef: createRef()});
newCandidates.push({label: "", fieldRef: createRef()});
setCandidates(newCandidates);
onChange(newCandidates)
}
@ -65,9 +64,8 @@ const CandidatesField = ({onChange}) => {
}
};
const editCandidate = (index, label, description) => {
const editCandidate = (index, label) => {
candidates[index].label = label
candidates[index].description = description
setCandidates([...candidates]);
onChange(candidates);
};

@ -202,7 +202,7 @@ const CreateElection = (props) => {
}
);
};
const [visibled, setVisibility] = useState(false);
const [visibledGrades, setVisibilityGrades] = useState(false);
const [visibledMails, setVisibilityMails] = useState(false);
@ -240,7 +240,7 @@ const CreateElection = (props) => {
return;
}
changeDisplay();
};
return (
<Container className="addCandidatePage">
@ -491,7 +491,7 @@ const CreateElection = (props) => {
{badgesValues.map(f => (
<Label className="numGrades numGradesMobile">
<Input type="radio" name="radio" value={f} checked={badgesValue === f}
<Input type="radio" name="radio" value={f} checked={badgesValue === f}
onChange={e => setNumGrades(e.currentTarget.value)} />
<div className="customCheckmarck customCheckmarckMobile"><p>{f}</p></div>
</Label>
@ -534,17 +534,14 @@ const CreateElection = (props) => {
</Col>
<Col xs="3">
<div className="numGradesContainer justify-content-end" tabIndex={candidates.length + 3}>
{badgesValues.map(f => (
<Label className="numGrades ">
<Input type="radio" name="radio" value={f} checked={badgesValue === f}
onChange={e => setNumGrades(e.currentTarget.value)} />
<div className="customCheckmarck"><p>{f}</p></div>
</Label>
))}
{badgesValues.map(f => (
<Label className="numGrades ">
<Input type="radio" name="radio" value={f} checked={badgesValue === f}
onChange={e => setNumGrades(e.currentTarget.value)} />
<div className="customCheckmarck"><p>{f}</p></div>
</Label>
))}
</div>
</Col>

Loading…
Cancel
Save