Skip to content

Commit

Permalink
Make sure to filter lang and book codes also when searching
Browse files Browse the repository at this point in the history
When filtering by language or book name, make sure that languages and
books that are excluded do not show their names _and_ their codes
  • Loading branch information
linearcombination committed Jan 6, 2024
1 parent de3bfa8 commit e0bde3e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
20 changes: 10 additions & 10 deletions frontend/src/components/MobileBookDisplay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
{#if otBookCodes?.length > 0}
{#each otBookCodes as bookCodeAndName, index}
<label for="bookcode-ot-{index}">
<div class="pl-4 py-2 target">
<div
class="flex items-center justify-between target2"
style={filteredOtBookCodes.includes(bookCodeAndName) ? '' : 'display: none'}
>
<div
class="pl-4 py-2 target"
style={filteredOtBookCodes.includes(bookCodeAndName) ? '' : 'display: none'}
>
<div class="flex items-center justify-between target2">
<div class="flex items-center target3">
<input
id="bookcode-ot-{index}"
Expand Down Expand Up @@ -81,11 +81,11 @@
{#if ntBookCodes?.length > 0}
{#each ntBookCodes as bookCodeAndName, index}
<label for="bookcode-nt-{index}">
<div class="pl-4 py-2 target">
<div
class="flex items-center justify-between target2"
style={filteredNtBookCodes.includes(bookCodeAndName) ? '' : 'display: none'}
>
<div
class="pl-4 py-2 target"
style={filteredNtBookCodes.includes(bookCodeAndName) ? '' : 'display: none'}
>
<div class="flex items-center justify-between target2">
<div class="flex items-center target3">
<input
id="bookcode-nt-{index}"
Expand Down
28 changes: 14 additions & 14 deletions frontend/src/components/MobileLanguageDisplay.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
{#if showGatewayLanguages}
{#each gatewayCodesAndNames as langCodeAndName, index}
<label for="lang-code-{index}">
<div class="pl-4 py-2 target">
<div
class="flex items-center justify-between target2"
style={filteredGatewayCodeAndNames.includes(langCodeAndName)
? ''
: 'display: none'}
>
<div
class="pl-4 py-2 target"
style={filteredGatewayCodeAndNames.includes(langCodeAndName)
? ''
: 'display: none'}
>
<div class="flex items-center justify-between target2">
<div class="flex items-center target3">
<input
id="lang-code-{index}"
Expand All @@ -46,13 +46,13 @@
{:else}
{#each heartCodesAndNames as langCodeAndName, index}
<label for="lang-code-{index}">
<div class="pl-4 py-2 target">
<div
class="flex items-center justify-between target2"
style={filteredHeartCodeAndNames.includes(langCodeAndName)
? ''
: 'display: none'}
>
<div
class="pl-4 py-2 target"
style={filteredGatewayCodeAndNames.includes(langCodeAndName)
? ''
: 'display: none'}
>
<div class="flex items-center justify-between target2">
<div class="flex items-center target3">
<input
id="lang-code-{index}"
Expand Down

0 comments on commit e0bde3e

Please sign in to comment.