Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xsalonx committed Apr 11, 2024
1 parent 202ee8a commit e86fd13
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,28 @@ export class QcFlagTypesSelectionDropdownModel extends SelectionDropdownModel {
* @inheritDoc
*/
_initialize() {

Check warning on line 39 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L39

Added line #L39 was not covered by tests
qcFlagTypesProvider.notArchived$.getCurrent().match({
// eslint-disable-next-line require-jsdoc
const update = () => qcFlagTypesProvider.notArchived$.getCurrent().match({
Success: (data) => {
this.availableOptions = RemoteData.success(data.map(({ id, name, method, bad, color }) => ({
this.setAvailableOptions(RemoteData.success(data.map(({ id, name, method, bad, color }) => ({

Check warning on line 43 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L41-L43

Added lines #L41 - L43 were not covered by tests
value: id,
original: { id, name, method, bad, color },
label: [
qcFlagTypeColoredBadge({ color }),
badge(h('span.flex-row.g1', method)),
] })));
] }))));
},
Failure: (errors) => {
this.availableOptions = RemoteData.failure(errors);
this.setAvailableOptions(RemoteData.failure(errors));

Check warning on line 52 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L51-L52

Added lines #L51 - L52 were not covered by tests
},
NotAsked: () => {
this.availableOptions = RemoteData.notAsked();
this.setAvailableOptions(RemoteData.notAsked());

Check warning on line 55 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L54-L55

Added lines #L54 - L55 were not covered by tests
},
Loading: () => {
this.availableOptions = RemoteData.loading();
this.setAvailableOptions(RemoteData.loading());

Check warning on line 58 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L57-L58

Added lines #L57 - L58 were not covered by tests
},
});
qcFlagTypesProvider.notArchived$.observe(update);
update();

Check warning on line 62 in lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js

View check run for this annotation

Codecov / codecov/patch

lib/public/components/qcFlags/qcFlagTypesSelectionDropdownModel.js#L61-L62

Added lines #L61 - L62 were not covered by tests
}
}
1 change: 1 addition & 0 deletions lib/public/views/QcFlags/Create/QcFlagCreationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class QcFlagCreationModel extends CreationModel {
this._flagTypeSelectionModel = new QcFlagTypesSelectionDropdownModel({

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

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L49

Added line #L49 was not covered by tests
multiple: false,
});
this._flagTypeSelectionModel.bubbleTo(this);
this._flagTypeSelectionModel.visualChange$.bubbleTo(this);

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

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L52-L53

Added lines #L52 - L53 were not covered by tests

this._initilize();

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

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/QcFlagCreationModel.js#L55

Added line #L55 was not covered by tests
Expand Down
8 changes: 4 additions & 4 deletions lib/public/views/QcFlags/Create/qcFlagCreationComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const qcFlagCreationForm = (creationModel) => {
const rightPanel = [

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

View check run for this annotation

Codecov / codecov/patch

lib/public/views/QcFlags/Create/qcFlagCreationComponent.js#L27-L28

Added lines #L27 - L28 were not covered by tests
h(PanelComponent, [
h(LabelPanelHeaderComponent, { for: 'flag-type' }, 'Flag Type'),
// selectionDropdown(
// creationModel.flagTypesSelectionModel,
// { selectorPrefix: 'flag-type' },
// ),
selectionDropdown(
creationModel.flagTypeSelectionModel,
{ selectorPrefix: 'flag-type' },
),
]),
h(
PanelComponent,
Expand Down

0 comments on commit e86fd13

Please sign in to comment.