add basic crud frontend for clients, tags and projects

This commit is contained in:
Gregor Vostrak
2024-04-03 16:07:23 +02:00
parent 824e3d99ae
commit 0081aa7a6e
77 changed files with 2670 additions and 330 deletions

View File

@@ -56,7 +56,7 @@ watch(focused, (newValue, oldValue) => {
<template #content>
<div
ref="dropdownContent"
class="grid grid-cols-2 divide-x divide-card-background-seperator text-center py-1">
class="grid grid-cols-2 divide-x divide-card-background-separator text-center py-1">
<div>
<div class="font-bold text-white text-sm pb-1">
Start

View File

@@ -74,6 +74,11 @@ function deleteTimeEntry() {
function updateTimeEntryDescription(description: string) {
updateTimeEntry({ ...props.timeEntry, description });
}
function updateTimeEntryTags(tags: string[]) {
console.log(tags);
updateTimeEntry({ ...props.timeEntry, tags });
}
</script>
<template>
@@ -97,7 +102,7 @@ function updateTimeEntryDescription(description: string) {
</div>
<div class="flex items-center font-medium space-x-2">
<TimeEntryRowTagDropdown
@changed="updateTimeEntry(timeEntry)"
@changed="updateTimeEntryTags"
:modelValue="timeEntry.tags"></TimeEntryRowTagDropdown>
<div>
<TimeEntryRangeSelector

View File

@@ -19,7 +19,7 @@ const timeEntryTags = computed<Tag[]>(() => {
</script>
<template>
<TagDropdown @changed="emit('changed')" v-model="model">
<TagDropdown @changed="emit('changed', model)" v-model="model">
<template #trigger>
<button data-testid="time_entry_tag_dropdown">
<TagBadge