Finish base of inactivity notice modal
This commit is contained in:
parent
c6c129715d
commit
c057d2eb82
@ -1,17 +1,39 @@
|
|||||||
import {
|
import {
|
||||||
|
Checkbox,
|
||||||
|
CheckboxGroup,
|
||||||
Modal,
|
Modal,
|
||||||
ModalBody,
|
ModalBody,
|
||||||
ModalCloseButton,
|
ModalCloseButton,
|
||||||
ModalContent,
|
ModalContent,
|
||||||
ModalHeader,
|
ModalHeader,
|
||||||
ModalOverlay,
|
ModalOverlay,
|
||||||
|
Text,
|
||||||
|
Textarea,
|
||||||
|
VStack,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function (props: {
|
export default function (props: {
|
||||||
departments: string[];
|
departments: string[];
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}) {
|
}) {
|
||||||
|
const [departments, setDepartments] = useState([] as string[]);
|
||||||
|
function reset() {
|
||||||
|
(document.getElementById("start") as HTMLInputElement).value = "";
|
||||||
|
(document.getElementById("end") as HTMLInputElement).value = "";
|
||||||
|
(document.getElementById("reason") as HTMLTextAreaElement).value = "";
|
||||||
|
|
||||||
|
props.onClose();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submit() {
|
||||||
|
const start = (document.getElementById("start") as HTMLInputElement).value;
|
||||||
|
const end = (document.getElementById("start") as HTMLInputElement).value;
|
||||||
|
const reason = (document.getElementById("reason") as HTMLTextAreaElement)
|
||||||
|
.value;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal isCentered isOpen={props.isOpen} onClose={props.onClose}>
|
<Modal isCentered isOpen={props.isOpen} onClose={props.onClose}>
|
||||||
@ -19,7 +41,32 @@ export default function (props: {
|
|||||||
<ModalContent>
|
<ModalContent>
|
||||||
<ModalHeader>New Inactivity Notice</ModalHeader>
|
<ModalHeader>New Inactivity Notice</ModalHeader>
|
||||||
<ModalCloseButton />
|
<ModalCloseButton />
|
||||||
<ModalBody></ModalBody>
|
<ModalBody>
|
||||||
|
<Text>Start Date</Text>
|
||||||
|
<input id="start" type="date" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<Text>End Date</Text>
|
||||||
|
<input id="end" type="date" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<Text>Reason</Text>
|
||||||
|
<Textarea
|
||||||
|
id="reason"
|
||||||
|
placeholder="Your reason for making this inactivity notice"
|
||||||
|
/>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<CheckboxGroup onChange={(a: string[]) => setDepartments(a)}>
|
||||||
|
<VStack>
|
||||||
|
{props.departments.map((d) => (
|
||||||
|
<Checkbox key={d} value={d}>
|
||||||
|
{d}
|
||||||
|
</Checkbox>
|
||||||
|
))}
|
||||||
|
</VStack>
|
||||||
|
</CheckboxGroup>
|
||||||
|
</ModalBody>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user