Skip to content

Commit

Permalink
Move Upload Metadata tooltip to config
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Jan 27, 2025
1 parent 8c1a773 commit c82e573
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/DataSubmissions/MetadataUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useAuthContext } from "../Contexts/AuthContext";
import FlowWrapper from "./FlowWrapper";
import { Logger } from "../../utils";
import { hasPermission } from "../../config/AuthPermissions";
import { TOOLTIP_TEXT } from "../../config/DashboardTooltips";

const StyledUploadTypeText = styled(Typography)(() => ({
color: "#083A50",
Expand Down Expand Up @@ -317,8 +318,8 @@ const MetadataUpload = ({ submission, readOnly, onCreateBatch, onUpload }: Props
titleAdornment={
<StyledTooltip
placement="right"
title="The metadata uploaded will be compared with existing data within the submission. All new data will be added to the submission, including updates to existing information."
open={undefined} // will use hoverListener to open
title={TOOLTIP_TEXT.FILE_UPLOAD.UPLOAD_METADATA}
open={undefined}
disableHoverListener={false}
/>
}
Expand Down
4 changes: 4 additions & 0 deletions src/config/DashboardTooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
* Data Submission Dashboard only.
*/
export const TOOLTIP_TEXT = {
FILE_UPLOAD: {
UPLOAD_METADATA:
"The metadata uploaded will be compared with existing data within the submission. All new data will be added to the submission, including updates to existing information.",
},
VALIDATION_CONTROLS: {
VALIDATION_TYPE: {
VALIDATE_METADATA:
Expand Down

0 comments on commit c82e573

Please sign in to comment.