• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / crdc-datahub-ui / 18789341118

24 Oct 2025 06:57PM UTC coverage: 78.178% (+15.5%) from 62.703%
18789341118

push

github

web-flow
Merge pull request #888 from CBIIT/3.4.0

3.4.0 Release

4977 of 5488 branches covered (90.69%)

Branch coverage included in aggregate %.

8210 of 9264 new or added lines in 257 files covered. (88.62%)

6307 existing lines in 120 files now uncovered.

30203 of 39512 relevant lines covered (76.44%)

213.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

19.28
/src/components/Questionnaire/Repository.tsx
1
import RemoveCircleIcon from "@mui/icons-material/RemoveCircle";
1✔
2
import { Grid, styled } from "@mui/material";
1✔
3
import React, { FC } from "react";
4

5
import DataTypes from "../../config/DataTypesConfig";
1✔
6
import AddRemoveButton from "../AddRemoveButton";
1✔
7
import { Status as FormStatus, useFormContext } from "../Contexts/FormContext";
1✔
8

9
import SelectInput from "./SelectInput";
1✔
10
import TextInput from "./TextInput";
1✔
11

12
const GridContainer = styled(Grid)(() => ({
1✔
UNCOV
13
  border: "0.5px solid #DCDCDC !important",
×
UNCOV
14
  borderRadius: "10px",
×
UNCOV
15
  padding: "18px 15px",
×
16
}));
1✔
17

18
export const repositoryDataTypesOptions = [
1✔
19
  DataTypes.clinicalTrial,
1✔
20
  DataTypes.genomics,
1✔
21
  DataTypes.imaging,
1✔
22
  DataTypes.proteomics,
1✔
23
];
24

25
type Props = {
26
  idPrefix?: string;
27
  index: number;
28
  repository: Repository | null;
29
  readOnly?: boolean;
30
  onDelete: () => void;
31
};
32

33
/**
34
 * Additional Contact Form Group
35
 *
36
 * @param {Props} props
37
 * @returns {JSX.Element}
38
 */
39
const Repository: FC<Props> = ({ idPrefix = "", index, repository, readOnly, onDelete }: Props) => {
1✔
40
  const { status } = useFormContext();
×
41

42
  const { name, studyID, dataTypesSubmitted, otherDataTypesSubmitted } = repository || {};
×
43

44
  return (
×
UNCOV
45
    <GridContainer container>
×
UNCOV
46
      <Grid container item xs={12} rowSpacing={0} columnSpacing={1.5}>
×
UNCOV
47
        <TextInput
×
UNCOV
48
          id={idPrefix.concat(`repository-${index}-name`)}
×
UNCOV
49
          label="Repository Name"
×
UNCOV
50
          name={`study[repositories][${index}][name]`}
×
UNCOV
51
          value={name}
×
UNCOV
52
          placeholder="Enter Repository Name"
×
UNCOV
53
          maxLength={50}
×
UNCOV
54
          gridWidth={6}
×
UNCOV
55
          tooltipText="Name of the repository (e.g., GEO, EGA, etc.)"
×
UNCOV
56
          required
×
UNCOV
57
          readOnly={readOnly}
×
58
        />
UNCOV
59
        <TextInput
×
UNCOV
60
          id={idPrefix.concat(`repository-${index}-study-id`)}
×
UNCOV
61
          label="Study ID"
×
UNCOV
62
          name={`study[repositories][${index}][studyID]`}
×
UNCOV
63
          value={studyID}
×
UNCOV
64
          placeholder="Enter ID"
×
UNCOV
65
          maxLength={50}
×
UNCOV
66
          gridWidth={6}
×
UNCOV
67
          tooltipText="Associated repository study identifier"
×
UNCOV
68
          required
×
UNCOV
69
          readOnly={readOnly}
×
70
        />
UNCOV
71
        <SelectInput
×
UNCOV
72
          id={idPrefix.concat(`repository-${index}-data-types-submitted`)}
×
UNCOV
73
          label="Data Type(s) Submitted"
×
UNCOV
74
          name={`study[repositories][${index}][dataTypesSubmitted]`}
×
75
          options={repositoryDataTypesOptions.map((option) => ({
×
UNCOV
76
            label: option.label,
×
UNCOV
77
            value: option.name,
×
UNCOV
78
          }))}
×
UNCOV
79
          placeholder="Select types"
×
UNCOV
80
          value={dataTypesSubmitted}
×
UNCOV
81
          multiple
×
UNCOV
82
          tooltipText="Data type(s) submitted"
×
UNCOV
83
          required
×
UNCOV
84
          readOnly={readOnly}
×
85
        />
UNCOV
86
        <TextInput
×
UNCOV
87
          id={idPrefix.concat(`repository-${index}-other-data-types-submitted`)}
×
UNCOV
88
          label="Other Data Type(s)"
×
UNCOV
89
          tooltipText='Enter additional Data Types, separated by pipes ("|").'
×
UNCOV
90
          name={`study[repositories][${index}][otherDataTypesSubmitted]`}
×
UNCOV
91
          value={otherDataTypesSubmitted}
×
UNCOV
92
          placeholder="Other, specify as free text"
×
UNCOV
93
          maxLength={100}
×
UNCOV
94
          gridWidth={6}
×
UNCOV
95
          readOnly={readOnly}
×
96
        />
UNCOV
97
      </Grid>
×
UNCOV
98
      <Grid item xs={12}>
×
UNCOV
99
        <AddRemoveButton
×
UNCOV
100
          id={idPrefix.concat(`repository-${index}-remove-repository-button`)}
×
UNCOV
101
          label="Remove Repository"
×
UNCOV
102
          placement="start"
×
UNCOV
103
          onClick={onDelete}
×
UNCOV
104
          startIcon={<RemoveCircleIcon />}
×
UNCOV
105
          iconColor="#E74040"
×
UNCOV
106
          disabled={readOnly || status === FormStatus.SAVING}
×
107
        />
UNCOV
108
      </Grid>
×
UNCOV
109
    </GridContainer>
×
110
  );
UNCOV
111
};
×
112

113
export default Repository;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc