Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaden505 committed Jan 24, 2025
1 parent 8336f26 commit 6be304c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/public/views/QcFlags/Create/QcFlagCreationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,15 @@ export class QcFlagCreationModel extends CreationModel {

if (!startTime) {
this._startTime = null;

Check warning on line 130 in lib/public/views/QcFlags/Create/QcFlagCreationModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L129-L130

Added lines #L129 - L130 were not covered by tests
} if (!endTime) {
}
if (!endTime) {
this._endTime = null;

Check warning on line 133 in lib/public/views/QcFlags/Create/QcFlagCreationModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L132-L133

Added lines #L132 - L133 were not covered by tests
}

if (startTime > this._startTime) {
this._startTime = startTime;

Check warning on line 137 in lib/public/views/QcFlags/Create/QcFlagCreationModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L136-L137

Added lines #L136 - L137 were not covered by tests
} if (endTime < this._endTime) {
}
if (endTime < this._endTime) {
this._endTime = endTime;

Check warning on line 140 in lib/public/views/QcFlags/Create/QcFlagCreationModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L139-L140

Added lines #L139 - L140 were not covered by tests
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/public/views/QcFlags/Create/qcFlagCreationComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const qcFlagCreationForm = (creationModel) => {
'input#time-based-toggle',
{
checked: Boolean(isTimeBasedQcFlag),
// If times dont overlap, the startTime will be larger than endTime
disabled: !startTime || !endTime || startTime > endTime,

Check warning on line 111 in lib/public/views/QcFlags/Create/qcFlagCreationComponent.js

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/qcFlagCreationComponent.js#L111

Added line #L111 was not covered by tests
onchange: () => {
creationModel.setIsTimeBasedQcFlag(!isTimeBasedQcFlag);
Expand Down

0 comments on commit 6be304c

Please sign in to comment.