mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-15 17:23:16 +01:00
feat: add duplicate time entry fields
This commit is contained in:
committed by
Gregor Vostrak
parent
4a50145329
commit
639f5332e4
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { TrashIcon, PencilIcon } from '@heroicons/vue/20/solid';
|
||||
import { TrashIcon, PencilIcon, DocumentDuplicateIcon } from '@heroicons/vue/20/solid';
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
@@ -10,8 +10,10 @@ import {
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
showEdit?: boolean;
|
||||
showDuplicate?: boolean;
|
||||
}>(),
|
||||
{
|
||||
showDuplicate: true,
|
||||
showEdit: true,
|
||||
}
|
||||
);
|
||||
@@ -19,6 +21,7 @@ const props = withDefaults(
|
||||
const emit = defineEmits<{
|
||||
edit: [];
|
||||
delete: [];
|
||||
duplicate: [];
|
||||
}>();
|
||||
</script>
|
||||
|
||||
@@ -51,6 +54,14 @@ const emit = defineEmits<{
|
||||
<PencilIcon class="w-5" />
|
||||
<span>Edit</span>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
v-if="props.showDuplicate"
|
||||
data-testid="time_entry_duplicate"
|
||||
class="flex items-center space-x-3 cursor-pointer"
|
||||
@click="emit('duplicate')">
|
||||
<DocumentDuplicateIcon class="w-5" />
|
||||
<span>Duplicate</span>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
data-testid="time_entry_delete"
|
||||
class="flex items-center space-x-3 cursor-pointer text-destructive focus:text-destructive"
|
||||
|
||||
Reference in New Issue
Block a user