Skip to content

Commit

Permalink
Merge branch 'staging' into OCD-4350
Browse files Browse the repository at this point in the history
  • Loading branch information
andlar committed Oct 3, 2023
2 parents 250897e + 73e53b2 commit 9a4cada
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 62 deletions.
1 change: 1 addition & 0 deletions XSD-MODIFICATION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OCD-4321: add status field to criteria
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ describe('the Criterion Component', () => {

it('should display removed criteria title correctly', () => {
const header = criterion.criterionHeader(6);
expect(header.getText()).toContain('170.315 (a)(6)');
expect(header.getText().toUpperCase()).toContain('REMOVED');
});
});
20 changes: 10 additions & 10 deletions e2e/resources/listings/2015_CriteriaRelationships.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ const suite = {
description: 'with issues with criteria relationships',
file: '../../../resources/listings/2015_CriteriaRelationships.csv',
listings: [{
listingId: '15.04.04.1722.CRT1.V1.00.1.210607',
listingId: '15.04.04.1722.CRT1.V1.00.1.230607',
expectedErrors: [
'The criterion 170.315 (g)(9) has been removed and may not be added to the listing.',
'The criterion 170.315 (g)(8) has been removed and may not be added to the listing.',
'The criterion 170.315 (g)(6) has been removed and may not be added to the listing.',
'The criterion 170.315 (f)(5) has been removed and may not be added to the listing.',
'The criterion 170.315 (e)(1) has been removed and may not be added to the listing.',
'The criterion 170.315 (d)(3) has been removed and may not be added to the listing.',
'The criterion 170.315 (d)(2) has been removed and may not be added to the listing.',
'The criterion 170.315 (d)(10) has been removed and may not be added to the listing.',
'The criterion 170.315 (c)(3) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(9) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(8) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(7) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(3) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(2) has been removed and may not be added to the listing.',
'The criterion 170.315 (b)(1) has been removed and may not be added to the listing.',
'The criterion 170.315 (g)(9) is unavailable for this listing.',
'The criterion 170.315 (g)(8) is unavailable for this listing.',
'The criterion 170.315 (g)(6) is unavailable for this listing.',
'The criterion 170.315 (f)(5) is unavailable for this listing.',
'The criterion 170.315 (e)(1) is unavailable for this listing.',
'The criterion 170.315 (d)(3) is unavailable for this listing.',
'The criterion 170.315 (d)(2) is unavailable for this listing.',
'The criterion 170.315 (d)(10) is unavailable for this listing.',
'The criterion 170.315 (c)(3) is unavailable for this listing.',
'The criterion 170.315 (b)(9) is unavailable for this listing.',
'The criterion 170.315 (b)(8) is unavailable for this listing.',
'The criterion 170.315 (b)(7) is unavailable for this listing.',
'The criterion 170.315 (b)(3) is unavailable for this listing.',
'The criterion 170.315 (b)(2) is unavailable for this listing.',
'The criterion 170.315 (b)(1) is unavailable for this listing.',
'Listing has not attested to (g)(3), but at least one criteria was found attesting to SED.',
'Cannot select both 170.315 (g)(9) and 170.315 (g)(9) (Cures Update).',
'Cannot select both 170.315 (g)(8) and 170.315 (g)(10) (Cures Update).',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const suite = {
listings: [{
listingId: '15.02.04.2701.RMVD.12.00.1.220920',
expectedErrors: [
'The criterion 170.315 (a)(6) has been removed and may not be added to the listing.',
'The criterion 170.315 (a)(6) is unavailable for this listing.',
],
expectedWarnings: [
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"babel-plugin-angularjs-annotate": "^0.9.0",
"browser-sync": "~2.9.12",
"browser-sync-spa": "~1.0.3",
"chromedriver": "^116.0.0",
"chromedriver": "^117.0.0",
"clean-webpack-plugin": "^0.1.19",
"concurrently": "^7.6.0",
"css-loader": "^0.28.11",
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/listing/details/criteria/criteria.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function ChplCriteria(props) {

return (
<>
{ criteria.filter((cc) => !cc.criterion.removed && (cc.success || viewAll))
{ criteria.filter((cc) => cc.criterion.status !== 'REMOVED' && (cc.success || viewAll))
.map((cc) => (
<ChplCriterion
key={cc.criterion.id}
Expand All @@ -115,7 +115,7 @@ function ChplCriteria(props) {
resources={prepareResources(cc.criterion)}
/>
))}
{ (criteria.filter((cc) => cc.criterion.removed && (cc.success || viewAll)).length > 0)
{ (criteria.filter((cc) => cc.criterion.status === 'REMOVED' && (cc.success || viewAll)).length > 0)
&& (
<div>
<Accordion
Expand All @@ -132,7 +132,7 @@ function ChplCriteria(props) {
</ChplTooltip>
</AccordionSummary>
<AccordionDetails>
<Container>
<Container maxWidth={false}>
{ criteria.filter((cc) => cc.criterion.removed && (cc.success || viewAll))
.map((cc) => (
<ChplCriterion
Expand Down
19 changes: 13 additions & 6 deletions src/app/components/listing/details/criteria/criterion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const useStyles = makeStyles({
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
alignContent: 'center',
alignItems: 'center',
},
iconSpacing: {
marginLeft: '4px',
Expand All @@ -81,6 +81,7 @@ const useStyles = makeStyles({
},
criterionNumber: {
textTransform: 'none',
fontWeight: '700',
},
editCriterion: {
margin: '8px 0px',
Expand Down Expand Up @@ -194,16 +195,22 @@ function ChplCriterion(props) {
)}
</Box>
<Box className={classes.criterionAccordionSummaryData}>
<Typography variant="subtitle1">
{ criterion.criterion.removed
<Typography variant="h6" className={classes.criterionNumber}>
{ criterion.criterion.status === 'REMOVED'
&& (
<>
Removed |
{' '}
</>
)}
<div className={classes.criterionNumber}>
{criterion.criterion.number}
</div>
{ criterion.criterion.status === 'RETIRED'
&& (
<>
Retired |
{' '}
</>
)}
{criterion.criterion.number}
</Typography>
{ pending
&& (
Expand Down
4 changes: 3 additions & 1 deletion src/app/components/listing/details/surveillance/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ <h5>Requirements</h5>
<tbody>
<tr ng-repeat="req in $ctrl.surveillance.requirements track by $index">
<td>{{ req.requirementTypeOther ? 'Other Requirement' : req.requirementType.requirementGroupType.name }}</td>
<td ng-class="{'removed' : req.requirementType.removed}">{{ req.display }}</td>
<td ng-class="{'removed' : req.requirementType.status !== 'ACTIVE'}">
{{ (req.type.status === 'REMOVED' ? 'Removed | ' : '') + (req.type.status === 'RETIRED' ? 'Retired | ' : '') + req.display }}
</td>
<td>{{ req.result.name }}</td>
<td>
<span ng-if="req.nonconformities.length === 0">N/A</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4 class="modal-title" id="edit-nonconformity-label"><span ng-if="$ctrl.workTyp
<label for="nonconformity-type" class="col-sm-3">Non-Conformity Type <span class="text-danger">*</span></label>
<div class="col-sm-9">
<select class="input-sm form-control" ng-model="$ctrl.nonconformityType" id="nonconformity-type" name="nonconformityType"
ng-options="type as ((type.removed ? 'Removed | ' : '') + (type.number ? (type.number + ': '): '') + type.title) for type in $ctrl.nonconformityTypes" required>
ng-options="type as ((type.status === 'REMOVED' ? 'Removed | ' : '') + (type.status === 'RETIRED' ? 'Retired | ' : '') + (type.number ? (type.number + ': '): '') + type.title) for type in $ctrl.nonconformityTypes" required>
</select>
<div class="text-danger" ng-if="($ctrl.showFormErrors || $ctrl.editForm.nonconformityType.$touched) && $ctrl.editForm.nonconformityType.$error.required">Field is required</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h4 class="modal-title" id="inspect-label">Inspect Nonconformities</h4>
<tbody>
<tr>
<th scope="row">Type</th>
<td ng-class="{'removed' : noncon.type.removed}">{{ (noncon.type.removed ? 'Removed | ' : '') + (noncon.type.number ? (noncon.type.number + ': ') : '') + noncon.type.title}}</td>
<td ng-class="{'removed' : (noncon.type.status === 'REMOVED' || noncon.type.status === ' RETIRED')}">{{ (noncon.type.status === 'REMOVED' ? 'Removed | ' : '') + (noncon.type.status === 'RETIRED' ? 'Retired | ' : '') + (noncon.type.number ? (noncon.type.number + ': ') : '') + noncon.type.title}}</td>
</tr>
<tr>
<th scope="row">Date of Determination</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const SurveillanceRequirementEditComponent = {
.sort(sortRequirementTypes)
.map((req) => ({
...req,
display: `${req.removed ? 'Removed | ' : ''}${req.number ? (`${req.number}: `) : ''}${req.title}`,
display: `${req.status === 'REMOVED' ? 'Removed | ' : ''}${req.status === 'RETIRED' ? 'Retired | ' : ''}${req.number ? (`${req.number}: `) : ''}${req.title}`,
}));
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ <h5>Non-Conformities</h5>
</thead>
<tbody>
<tr ng-repeat="noncon in $ctrl.requirement.nonconformities track by $index">
<td ng-class="{'removed' : noncon.type.removed}">
{{ (noncon.type.removed ? 'Removed | ' : '') + (noncon.type.number ? (noncon.type.number + ': ') : '') + noncon.type.title }}
<td ng-class="{'removed' : noncon.type.status !== 'ACTIVE'}">
{{ (noncon.type.status === 'REMOVED' ? 'Removed | ' : '') + (noncon.type.status === 'RETIRED' ? 'Retired | ' : '') + (noncon.type.number ? (noncon.type.number + ': ') : '') + noncon.type.title }}
</td>
<td>{{ noncon.nonconformityStatus }}</td>
<td>{{ noncon.summary }}</td>
Expand Down
4 changes: 4 additions & 0 deletions src/app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ option[label^="Removed"] {
font-style: italic;
}

option[label^="Retired"] {
font-style: italic;
}

.removed {

.btn-link {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function ChplApiDocumentationCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
default: [56, 181, 182].includes(cc.id),
}));
setFilters((f) => f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function ChplCorrectiveActionCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function ChplDecertifiedProductsCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function ChplInactiveCertificatesCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function ChplRealWorldTestingCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/collections/search/search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function ChplSearchPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.certificationEditionId !== 3 ? 'Retired | ' : ''}${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.certificationEditionId !== 3 ? 'Retired | ' : ''}${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.status === 'RETIRED' ? 'Retired | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.status === 'RETIRED' ? 'Retired | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/collections/svap/svap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ function ChplSvapCollectionPage() {
.map((cc) => ({
...cc,
value: cc.id,
display: `${cc.removed ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.removed ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
display: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}${cc.title.includes('Cures Update') ? ' (Cures Update)' : ''}`,
longDisplay: `${cc.status === 'REMOVED' ? 'Removed | ' : ''}${cc.number}: ${cc.title}`,
}));
setFilters((f) => f
.filter((filter) => filter.key !== 'certificationCriteriaIds')
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6568,7 +6568,7 @@ __metadata:
bootstrap-sass: 3.4.3
browser-sync: ~2.9.12
browser-sync-spa: ~1.0.3
chromedriver: ^116.0.0
chromedriver: ^117.0.0
clean-webpack-plugin: ^0.1.19
concurrently: ^7.6.0
css-loader: ^0.28.11
Expand Down Expand Up @@ -6665,9 +6665,9 @@ __metadata:
languageName: node
linkType: hard

"chromedriver@npm:^116.0.0":
version: 116.0.0
resolution: "chromedriver@npm:116.0.0"
"chromedriver@npm:^117.0.0":
version: 117.0.3
resolution: "chromedriver@npm:117.0.3"
dependencies:
"@testim/chrome-version": ^1.1.3
axios: ^1.4.0
Expand All @@ -6678,7 +6678,7 @@ __metadata:
tcp-port-used: ^1.0.1
bin:
chromedriver: bin/chromedriver
checksum: a8d2db81e6f536ce5e9fd347f16b754e78cbaf691dc810880bcfe71128a8916af5b4d915d25ffff8be688cce73ba8bf4f50781b71e62136615d136cdb377fdfb
checksum: 7ac47de10af353a46c0ed49170dca225fcd3471245846cfe47f04d41e8a67ea28cb88a28b57709c09809fb860aa904ccea81e9124fd0b1a0a3e0e5c15a0b7ef1
languageName: node
linkType: hard

Expand Down

0 comments on commit 9a4cada

Please sign in to comment.