Skip to content

Commit

Permalink
adding is_upload check on admin eval edit dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
cxjohn committed Aug 30, 2023
1 parent 490cdf6 commit 0f48832
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/components/admin/Evaluation/CreateInvitationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CreateInvitationModalProps = {
const CreateInvitationModal = ({ handleClose, open, store }: CreateInvitationModalProps) => {
const [inputs, setInputs] = useState<any>({ is_sme: false });
const [error, setError] = useState("");

console.log("store", store);
const handleChange = (event: any) => {
const name = event.target.name;
const value = event.target.value;
Expand Down Expand Up @@ -98,16 +98,18 @@ const CreateInvitationModal = ({ handleClose, open, store }: CreateInvitationMod
onChange={handleChange}
/>
</div>
<div>
<EvaluationSubTitle small text="Form Submission" />
<input
type="checkbox"
name="form"
checked={!inputs.is_sme || false}
onChange={() => handleChecked()}
/>{" "}
<span className="text-sm">Required</span>
</div>
{store.evaluation?.is_upload === false ? (
<div>
<EvaluationSubTitle small text="Form Submission" />
<input
type="checkbox"
name="form"
checked={!inputs.is_sme || false}
onChange={() => handleChecked()}
/>{" "}
<span className="text-sm">Required</span>
</div>
) : null}
</div>

{error ? <p className="text-red text-sm">{error}</p> : null}
Expand Down

0 comments on commit 0f48832

Please sign in to comment.