Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | 2x 20x 20x 20x 20x 1x 1x 20x 20x | import { useState } from "react"; import { Form, Button, Container, Row, Col } from "react-bootstrap"; import { standardQuarterRange } from "main/utils/quarterUtilities"; import SingleQuarterDropdown from "../Quarters/SingleQuarterDropdown"; import IfStaleCheckBox from "main/components/Jobs/IfStaleCheckBox"; const UpdateCoursesByQuarterJobForm = ({ callback }) => { const quarters = standardQuarterRange(); const [quarter, setQuarter] = useState(quarters[0].yyyyq); const [ifStale, setIfStale] = useState(true); const handleSubmit = (event) => { event.preventDefault(); callback({ quarter, ifStale }); }; // Stryker disable all : Stryker is testing by changing the padding to 0. But this is simply a visual optimization as it makes it look better const padding = { paddingTop: 10, paddingBottom: 10 }; // Stryker restore all return ( <Form onSubmit={handleSubmit}> <Container> <Row> <Col md="auto"> <SingleQuarterDropdown quarters={quarters} quarter={quarter} setQuarter={setQuarter} controlId={"UpdateCoursesByQuarterJobForm.Quarter"} /> </Col> </Row> <Row style={padding}> <Col md="auto"> <Button variant="primary" type="submit" data-testid="updateCoursesByQuarter" > Update Courses </Button> </Col> <Col> <IfStaleCheckBox ifStale={ifStale} setIfStale={setIfStale} /> </Col> </Row> </Container> </Form> ); }; export default UpdateCoursesByQuarterJobForm; |