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

CBIIT / INS-WebPortal / 25870215283

14 May 2026 03:54PM UTC coverage: 13.041% (+0.1%) from 12.922%
25870215283

push

github

web-flow
Merge pull request #536 from CBIIT/eslint-improvements

ESLint QoL Improvements

403 of 2284 branches covered (17.64%)

Branch coverage included in aggregate %.

1 of 17 new or added lines in 9 files covered. (5.88%)

3 existing lines in 3 files now uncovered.

393 of 3820 relevant lines covered (10.29%)

35.59 hits per line

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

0.0
/src/components/PropertySubsection/projectDetailSubsection.js
1
// Component to display a property
2
import {
×
3
  Grid,
4
  withStyles,
5
} from '@material-ui/core';
6
import React from 'react';
×
7
import ReactHtmlParser from 'html-react-parser';
×
8
import {
×
9
  Anchor,
10
  prepareLinks,
11
} from '@bento-core/util';
12
import { externalLinkIcon } from '../../bento/projectDetailData';
×
13

14
const PropertyItem = ({
×
15
  label,
16
  value,
17
  link,
18
  labelLink,
19
  classes,
20
}) => {
UNCOV
21
  const defaultValue = '';
×
22
  let concatenatedLinks = '';
×
23
  if (link) {
×
24
    const names = value.split(';');
×
25
    const ids = link.split(';');
×
26
    const contentArray = [];
×
27

28
    for (let i = 0; i < ids.length; i += 1) {
×
29
      const url = `#/program/${ids[i]}`;
×
30

31
      const linkElement = `<a key="${i}" href="${url}" style="color: #571AFF;">${names[i]}</a>`;
×
32

33
      contentArray.push(linkElement);
×
34
    }
35

36
    concatenatedLinks = contentArray.join(';');
×
37
  }
38

39
  return (
×
40
    <>
41
      {label ? (
42
        <Grid item container>
×
43
          <Grid item xs={6}>
44
            <span className={classes.title} id={`project_detail_left_section_title_${label}`}>
45
              {labelLink ? <Anchor link={labelLink} text={label} classes={classes} /> : label}
×
46
            </span>
47
          </Grid>
48
          <Grid item xs={6} className={classes.content} id={`project_detail_left_section_description_${label}_${value}`}>
49
            {
50
              value
×
51
                || value === 0
52
                ? (
53
                  link
×
54
                    ? <>{ReactHtmlParser(concatenatedLinks)}</>
×
55
                    : value
56
                ) : defaultValue
57
            }
58
          </Grid>
59
        </Grid>
60
      ) : (
61
        <Grid item container>
62
          <Grid item xs={12} className={classes.content} id={`project_detail_left_section_description_${value}`}>
63
            {value || value === 0 ? (
×
64
              link ? (
×
65
                <>
×
66
                  <a
67
                    href={link}
68
                    target="_blank"
69
                    rel="noopener noreferrer"
70
                    className={classes.link}
71
                  >
72
                    {value}
73
                  </a>
74
                  <img
75
                    src={externalLinkIcon.src}
76
                    alt={externalLinkIcon.alt}
77
                    className={classes.externalLinkIcon}
78
                  />
79
                </>
80
              ) : value
81
            ) : defaultValue}
82
          </Grid>
83
        </Grid>
84
      )}
85
    </>
86
  );
87
};
88

89
// Component to display a subsection
90
const Subsection = ({ config, data, classes }) => {
×
91
  const properties = prepareLinks(config.properties, data);
×
92
  return (
×
93
    <Grid item container className={classes.subsection}>
94
      <Grid item container direction="column" className={classes.subsectionBody} xs={12}>
95
        <Grid item>
96
          <span className={classes.detailContainerHeader}>{config.sectionHeader}</span>
97
        </Grid>
98
        {
99
          config.sectionDesc
100
            ? (
101
              <Grid item container className={classes.descriptionPart}>
×
102
                <Grid item><span className={classes.description}>Description -</span></Grid>
103
                <Grid item><span>{config.sectionDesc}</span></Grid>
104
              </Grid>
105
            ) : ''
106
        }
107
        {properties.slice(0, 10).map((prop, index) => (
108
          <PropertyItem
×
109
            key={index}
110
            label={prop.label}
111
            value={data[prop.dataField]}
112
            classes={classes}
113
            link={prop.link}
114
            labelLink={prop.labelLink}
115
            index
116
          />
117
        ))}
118
      </Grid>
119
      <Grid item xs={3} />
120
    </Grid>
121
  );
122
};
123

NEW
124
const styles = () => ({
×
125
  content: {
126
    fontFamily: 'Nunito',
127
    fontSize: '18px',
128
    fontWeight: '400',
129
    lineHeight: '25px',
130
    position: 'relative',
131
    top: '15px',
132
    marginBottom: '10px',
133
  },
134
  detailContainerHeader: {
135
    textTransform: 'uppercase',
136
    fontFamily: 'Inter',
137
    fontSize: '19px',
138
    fontWeight: '400',
139
    lineHeight: '20px',
140
    color: '#3478A5',
141
  },
142
  subsectionBody: {
143
    paddingBottom: '15px',
144
  },
145
  subsection: {
146
    '&:last-child $subsectionBody': {
147
      borderBottom: 'none',
148
    },
149
  },
150
  title: {
151
    color: '#1C58A1',
152
    fontFamily: 'Inter',
153
    fontSize: '16px',
154
    lineHeight: '20px',
155
    fontWeight: '600',
156
    position: 'relative',
157
    left: '10px',
158
    top: '15px',
159
    marginBottom: '10px',
160
  },
161
  descriptionPart: {
162
    paddingBottom: '26px',
163
  },
164
  description: {
165
    fontWeight: 'bold',
166
  },
167
  link: {
168
    fontWeight: '600',
169
    color: '#571AFF',
170
  },
171
  externalLinkIcon: {
172
    width: '16px',
173
    verticalAlign: 'sub',
174
    marginLeft: '4px',
175
  },
176
});
×
177

178
export default withStyles(styles, { withTheme: true })(Subsection);
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