All files / apps/developer-portal/layers/health/app/components HealthIssuesToolbar.vue

100% Statements 10/10
100% Branches 4/4
100% Functions 5/5
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35  9x     1x         9x     9x                             7x 7x   7x   7x    
<template>
    <UDashboardToolbar>
        <template #left>
            <UInput
                v-model="search"
                icon="i-lucide-search"
                :placeholder="$t('healthIssuesToolbar.search')"
                size="sm"
                class="w-56"
            />
        </template>
        <template #right>
            <USelect v-model="label" :items value-key="value" size="sm" class="w-40" />
        </template>
    </UDashboardToolbar>
</template>
 
<script setup lang="ts">
import { labelsOf, type Issue } from "#layers/github/app/utils/issues.ts";
 
interface Props {
    /** Every live issue, whose labels the filter offers. */
    issues: Issue[];
}
 
const { issues } = defineProps<Props>();
 
const search = defineModel<string>("search", { required: true });
const label = defineModel<string>("label", { required: true });
 
const { t } = useI18n();
 
const items = computed(() => filterItems(t("healthIssuesToolbar.everyLabel"), labelsOf(issues)));
</script>