Skip to content

Commit

Permalink
Merge pull request #12935 from AllanOXDi/filters-are-not-filtering
Browse files Browse the repository at this point in the history
Fixes filters not displayed  on the  imported exercises from QA channel
  • Loading branch information
rtibbles authored Dec 12, 2024
2 parents 7b129f3 + 53267c9 commit d397ff7
Showing 1 changed file with 43 additions and 42 deletions.
85 changes: 43 additions & 42 deletions packages/kolibri-common/components/SearchFiltersPanel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@
v-if="windowIsLarge || !currentCategory"
:class="windowIsLarge ? '' : 'drawer-panel'"
>
<div v-if="Object.keys(availableLibraryCategories).length">
<div v-if="!accordion">
<!-- search by keyword -->
<h2 class="title">
{{ $tr('keywords') }}
</h2>
<SearchBox
key="channel-search"
ref="searchBox"
:placeholder="coreString('findSomethingToLearn')"
:value="value.keywords || ''"
@change="val => $emit('input', { ...value, keywords: val })"
/>
<div v-if="!accordion">
<!-- search by keyword -->
<h2 class="title">
{{ $tr('keywords') }}
</h2>
<SearchBox
key="channel-search"
ref="searchBox"
:placeholder="coreString('findSomethingToLearn')"
:value="value.keywords || ''"
@change="val => $emit('input', { ...value, keywords: val })"
/>
<div v-if="Object.keys(availableLibraryCategories).length">
<h2 class="section title">
{{ $tr('categories') }}
</h2>
Expand Down Expand Up @@ -76,39 +76,40 @@
@click="noCategories"
/>
</div>
<ActivityButtonsGroup
v-if="showActivities"
class="section"
@input="handleActivity"
/>
<!-- Filter results by learning activity, displaying all options -->
<SelectGroup
v-model="inputValue"
:showChannels="showChannels"
class="section"
/>
</div>
<ActivityButtonsGroup
v-if="showActivities"
class="section"
@input="handleActivity"
/>
<!-- Filter results by learning activity, displaying all options -->
<SelectGroup
v-model="inputValue"
:showChannels="showChannels"
class="section"
/>
<div
v-if="Object.keys(availableResourcesNeeded).length"
class="section"
>
<h2 class="title">
{{ coreString('showResources') }}
</h2>
<div
v-if="Object.keys(availableResourcesNeeded).length"
class="section"
v-for="(val, activity) in availableResourcesNeeded"
:key="activity"
span="4"
alignment="center"
>
<h2 class="title">
{{ coreString('showResources') }}
</h2>
<div
v-for="(val, activity) in availableResourcesNeeded"
:key="activity"
span="4"
alignment="center"
>
<KCheckbox
:checked="value.learner_needs[val]"
:label="coreString(activity)"
:disabled="availableNeeds && !availableNeeds[val]"
@change="handleNeed(val)"
/>
</div>
<KCheckbox
:checked="value.learner_needs[val]"
:label="coreString(activity)"
:disabled="availableNeeds && !availableNeeds[val]"
@change="handleNeed(val)"
/>
</div>
</div>

<div v-if="accordion && !currentCategory">
<!-- search by keyword -->
<h2 class="title">
Expand Down

0 comments on commit d397ff7

Please sign in to comment.