Skip to content

Commit

Permalink
remove channels from all SearchFiltersPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Nov 12, 2024
1 parent 0294228 commit fc0bf20
Showing 1 changed file with 0 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@
:style="selectorStyle"
@change="val => handleChange('grade_levels', val)"
/>
<KSelect
v-if="showChannels && channelOptionsList.length"
:options="channelOptionsList"
:disabled="!channelId && enabledChannelOptions.length < 2"
class="selector"
:clearable="!(!channelId && enabledChannelOptions.length < 2)"
:clearText="coreString('clearAction')"
:value="selectedChannel"
:label="coreString('channelLabel')"
:style="selectorStyle"
@change="val => handleChange('channels', val)"
/>
<KSelect
v-if="accessibilityOptionsList.length"
:options="accessibilityOptionsList"
Expand Down Expand Up @@ -68,14 +56,12 @@
availableGradeLevels,
availableAccessibilityOptions,
availableLanguages,
availableChannels,
searchableLabels,
} = injectBaseSearch();
return {
availableGradeLevels,
availableAccessibilityOptions,
availableLanguages,
availableChannels,
searchableLabels,
};
},
Expand All @@ -88,10 +74,6 @@
return inputKeys.every(k => Object.prototype.hasOwnProperty.call(value, k));
},
},
showChannels: {
type: Boolean,
default: true,
},
},
computed: {
selectorStyle() {
Expand Down Expand Up @@ -151,16 +133,6 @@
enabledContentLevels() {
return this.contentLevelsList.filter(c => !c.disabled);
},
channelOptionsList() {
return this.availableChannels.map(channel => ({
value: channel.id,
disabled: this.searchableLabels && !this.searchableLabels.channels.includes(channel.id),
label: channel.name,
}));
},
enabledChannelOptions() {
return this.channelOptionsList.filter(c => !c.disabled);
},
langId() {
return Object.keys(this.value.languages)[0];
},
Expand Down Expand Up @@ -188,15 +160,6 @@
}
return this.contentLevelsList.find(o => o.value === this.levelId) || {};
},
channelId() {
return Object.keys(this.value.channels)[0];
},
selectedChannel() {
if (!this.channelId && this.enabledChannelOptions.length === 1) {
return this.enabledChannelOptions[0];
}
return this.channelOptionsList.find(o => o.value === this.channelId) || {};
},
},
methods: {
handleChange(field, value) {
Expand Down

0 comments on commit fc0bf20

Please sign in to comment.