-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add filters for gt labelling and gt script-type (#88)
* feat: filter by workflow and processor * feat: filter by date range * feat: implement multi-selectable workflow steps filtering * fix: make only related workflows visible while filtering by processors * fix: set all checkboxes of processor filter to selected on page load * ref: highlight selected processors * fix: refactor to own component and prepare visual filtering * fix: show filter also when no data is selected * fix: workflow filter label * feat: hide workflow when neither workflow or processor in workflow are selected * refactor: remove unused imports/vars, style * fix: remove search from workflow filter * feat: change date range dropdown to multiselect * refactor: change order * feat: add i18n translations * fix: adjust filter position for smaller screens * fix: changed faulty imported that failed build * wip: add label filter * wip: added label and script-type filter * fix: adjust styling for all screen sizes * style: clearer indentation * fix: readd missing comparision * style: break filter condition into multiple lines * docs: add comment explaining the computed ref labellingOptions * feat: add select all label; refactor to own component * fix: make color of select all variable --------- Co-authored-by: amtul.noor <[email protected]> Co-authored-by: noornoorie <[email protected]> Co-authored-by: jfrer <[email protected]>
- Loading branch information
1 parent
4f02e8c
commit 65da64d
Showing
5 changed files
with
142 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue' | ||
import MultiSelect from "primevue/multiselect" | ||
import { computed, ref } from 'vue' | ||
import { useI18n } from "vue-i18n" | ||
import type { DropdownOption } from '@/types' | ||
const { t } = useI18n() | ||
const props = defineProps<{ | ||
filter?: boolean | ||
allSelectedLabel?: string | ||
options: DropdownOption[] | ||
}>() | ||
const allItemsSelected = ref(true) | ||
const dropdownLabel = computed(() => { | ||
if (allItemsSelected.value) { | ||
return props.allSelectedLabel | ||
} | ||
return undefined | ||
}) | ||
</script> | ||
<template> | ||
<MultiSelect | ||
@change="allItemsSelected = $event.value.length === options.length" | ||
:filter="filter?? false" | ||
:selected-items-label="dropdownLabel" | ||
:options="options" | ||
option-label="label" | ||
:pt="{ | ||
filterContainer: { | ||
class: { 'ml-20': props.filter } | ||
} | ||
}"> | ||
<template #headercheckboxicon="{ allSelected }"> | ||
<Icon v-show="allSelected" icon="prime:check" class="p-checkbox-icon h-5 w-5" data-pc-section="headercheckboxicon"/> | ||
<span :class="['ml-[7.5rem] absolute w-20 z-[1001]', allSelected ? 'text-highlight' : 'text-black']">{{ t('select_all') }}</span> | ||
</template> | ||
</MultiSelect> | ||
</template> | ||
|
||
<style scoped lang="scss"> | ||
.text-highlight { | ||
color: var(--highlight-text-color); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters