mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
add reporting page, chart and filters
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
import MultiselectDropdown from '@/Components/Common/MultiselectDropdown.vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import type { Task } from '@/utils/api';
|
||||
import { useTasksStore } from '@/utils/useTasks';
|
||||
|
||||
const tasksStore = useTasksStore();
|
||||
const { tasks } = storeToRefs(tasksStore);
|
||||
|
||||
function getKeyFromItem(item: Task) {
|
||||
return item.id;
|
||||
}
|
||||
|
||||
function getNameForItem(item: Task) {
|
||||
return item.name;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<MultiselectDropdown
|
||||
searchPlaceholder="Search for a Task..."
|
||||
:items="tasks"
|
||||
:get-key-from-item="getKeyFromItem"
|
||||
:get-name-for-item="getNameForItem">
|
||||
<template #trigger>
|
||||
<slot name="trigger"></slot>
|
||||
</template>
|
||||
</MultiselectDropdown>
|
||||
</template>
|
||||
Reference in New Issue
Block a user