-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mvp-2' into amattu2-LocalDocs
- Loading branch information
Showing
43 changed files
with
991 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ window.injectedEnv = { | |
NIH_AUTHORIZE_URL: '', | ||
NIH_CLIENT_ID: '', | ||
NIH_REDIRECT_URL: '', | ||
REACT_APP_DEV_TIER: '' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import { LoadingButton } from "@mui/lab"; | ||
import { Button, DialogProps, styled } from "@mui/material"; | ||
import { FC, useState } from "react"; | ||
import Dialog from "../Shared/Dialog"; | ||
import TextInput from "./TextInput"; | ||
|
||
const StyledDialog = styled(Dialog)({ | ||
"& .MuiDialog-paper": { | ||
maxWidth: "none", | ||
borderRadius: "8px", | ||
width: "567px !important", | ||
}, | ||
}); | ||
|
||
type Props = { | ||
title?: string; | ||
message?: string; | ||
disableActions?: boolean; | ||
loading?: boolean; | ||
onCancel?: () => void; | ||
onSubmit?: (reviewComment: string) => void; | ||
} & DialogProps; | ||
|
||
const InquireFormDialog: FC<Props> = ({ | ||
title, | ||
message, | ||
disableActions, | ||
loading, | ||
onCancel, | ||
onSubmit, | ||
open, | ||
onClose, | ||
...rest | ||
}) => { | ||
const [reviewComment, setReviewComment] = useState(""); | ||
|
||
const handleCommentChange = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
const val = event?.target?.value || ""; | ||
setReviewComment(val); | ||
}; | ||
|
||
const handleOnCancel = () => { | ||
if (typeof onCancel === "function") { | ||
onCancel(); | ||
} | ||
setReviewComment(""); | ||
}; | ||
|
||
return ( | ||
<StyledDialog | ||
open={open} | ||
onClose={onClose} | ||
title={title || "Request Additional Changes"} | ||
actions={( | ||
<> | ||
<Button onClick={handleOnCancel} disabled={disableActions}> | ||
Cancel | ||
</Button> | ||
<LoadingButton | ||
onClick={() => onSubmit(reviewComment)} | ||
loading={loading} | ||
disabled={!reviewComment || disableActions} | ||
autoFocus | ||
> | ||
Confirm to move to Inquired | ||
</LoadingButton> | ||
</> | ||
)} | ||
{...rest} | ||
> | ||
<TextInput | ||
id="review-comment" | ||
name="reviewComment" | ||
value={reviewComment} | ||
onChange={handleCommentChange} | ||
maxLength={500} | ||
placeholder="500 characters allowed" | ||
required | ||
minRows={2} | ||
maxRows={2} | ||
multiline | ||
sx={{ paddingY: "16px" }} | ||
/> | ||
</StyledDialog> | ||
); | ||
}; | ||
|
||
export default InquireFormDialog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* A collection of site-wide supported Data Commons. | ||
*/ | ||
export const DataCommons: DataCommon[] = [ | ||
{ | ||
name: "CDS", | ||
route: "icdc", | ||
config: null, | ||
}, | ||
{ | ||
name: "ICDC", | ||
route: "icdc", | ||
config: null, | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.