hide download button
This commit is contained in:
@@ -40,6 +40,7 @@ const Timetable = ({
|
|||||||
replaceInputType = "checkbox",
|
replaceInputType = "checkbox",
|
||||||
apiRecordEndPoint = "/api/record",
|
apiRecordEndPoint = "/api/record",
|
||||||
openRecordMode = false,
|
openRecordMode = false,
|
||||||
|
hideDownloadButton = true,
|
||||||
}) => {
|
}) => {
|
||||||
const [editable, setEditable] = React.useState(true);
|
const [editable, setEditable] = React.useState(true);
|
||||||
const ref = React.useRef();
|
const ref = React.useRef();
|
||||||
@@ -251,20 +252,22 @@ const Timetable = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h2 style={{textAlign: 'center'}}>Login as {user}</h2>
|
<h2 style={{ textAlign: "center" }}>Login as {user}</h2>
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
contentEditable={editable}
|
contentEditable={editable}
|
||||||
style={{
|
style={{
|
||||||
overflow: "scroll",
|
overflow: "scroll",
|
||||||
display: 'flex',
|
display: "flex",
|
||||||
justifyContent: 'center',
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
onInput={handleInput}
|
onInput={handleInput}
|
||||||
></div>{" "}
|
></div>{" "}
|
||||||
<p style={{ display: "flex", justifyContent: "center" }}>
|
{!hideDownloadButton && (
|
||||||
<button onClick={DownloadMarks}>Download Selection</button>
|
<p style={{ display: "flex", justifyContent: "center" }}>
|
||||||
</p>
|
<button onClick={DownloadMarks}>Download Selection</button>
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
<div style={{ display: "none" }} id="download-dom"></div>
|
<div style={{ display: "none" }} id="download-dom"></div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export default function Home() {
|
|||||||
disableConflictCheck={true}
|
disableConflictCheck={true}
|
||||||
disableNetwork={true}
|
disableNetwork={true}
|
||||||
replaceInputType={"number"}
|
replaceInputType={"number"}
|
||||||
|
hideDownloadButton={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
Reference in New Issue
Block a user