diff --git a/src/lib/components/workflow/filter-search/filter-list.svelte b/src/lib/components/workflow/filter-search/filter-list.svelte index f03e66ddc..9f1ad75dd 100644 --- a/src/lib/components/workflow/filter-search/filter-list.svelte +++ b/src/lib/components/workflow/filter-search/filter-list.svelte @@ -20,6 +20,7 @@ import { formatDate } from '$lib/utilities/format-date'; import { isDateTimeFilter, + isStatusFilter, isTextFilter, } from '$lib/utilities/query/filter-search'; import { emptyFilter } from '$lib/utilities/query/to-list-workflow-filters'; @@ -52,7 +53,9 @@ let totalFiltersInView = 5; - $: visibleFilters = $workflowFilters.slice(0, totalFiltersInView); + $: visibleFilters = $workflowFilters + .filter((f) => !isStatusFilter(f.attribute)) + .slice(0, totalFiltersInView); $: hasMoreFilters = totalFiltersInView < $workflowFilters.length; const viewMoreFilters = () => { diff --git a/src/lib/components/workflow/filter-search/index.svelte b/src/lib/components/workflow/filter-search/index.svelte index 60885b203..5ea7f596b 100644 --- a/src/lib/components/workflow/filter-search/index.svelte +++ b/src/lib/components/workflow/filter-search/index.svelte @@ -22,7 +22,7 @@ import WorkflowAdvancedSearch from '$lib/components/workflow/workflow-advanced-search.svelte'; import Button from '$lib/holocene/button.svelte'; import Icon from '$lib/holocene/icon/icon.svelte'; -import Input from '$lib/holocene/input/input.svelte'; + import Input from '$lib/holocene/input/input.svelte'; import { Menu, MenuButton, @@ -54,7 +54,6 @@ import Input from '$lib/holocene/input/input.svelte'; import DateTimeFilter from './datetime-filter.svelte'; import FilterList from './filter-list.svelte'; import NumberFilter from './number-filter.svelte'; - import StatusFilter from './status-filter.svelte'; import TextFilter from './text-filter.svelte'; const filter = writable(emptyFilter()); @@ -143,9 +142,10 @@ import Input from '$lib/holocene/input/input.svelte'; $: $activeQueryIndex, updateFocusedElementId(); let searchAttributeValue = ''; + // TODO: Add KeywordList support $: options = $sortedSearchAttributeOptions.filter( - (option) => !isListFilter(option.value), + (option) => !isListFilter(option.value) && !isStatusFilter(option.value), ); $: filteredOptions = !searchAttributeValue @@ -193,51 +193,47 @@ import Input from '$lib/holocene/input/input.svelte'; class:filter={!showClearAllButton} on:keyup={handleKeyUp} > - {#if isStatusFilter($filter.attribute)} - - {:else} - - - - {#if !$filter.attribute} - - {/if} - - {$filter.attribute || translate('workflows', 'filter')} - - - - - {#each filteredOptions as { value, label }} - {@const disabled = isOptionDisabled(value, $workflowFilters)} - { - handleNewQuery(value); - }} - {disabled} - > - {label} - - {:else} - {translate('no-results')} - {/each} - - - {/if} + + + + {#if !$filter.attribute} + + {/if} + + {$filter.attribute || translate('workflows', 'filter')} + + + + + {#each filteredOptions as { value, label }} + {@const disabled = isOptionDisabled(value, $workflowFilters)} + { + handleNewQuery(value); + }} + {disabled} + > + {label} + + {:else} + {translate('no-results')} + {/each} + + {#if isTextFilter($filter.attribute)}
diff --git a/src/lib/components/workflow/workflow-count.svelte b/src/lib/components/workflow/workflow-count.svelte index d1a862c1b..7fa702632 100644 --- a/src/lib/components/workflow/workflow-count.svelte +++ b/src/lib/components/workflow/workflow-count.svelte @@ -1,5 +1,9 @@