mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add format check, update prettier rules, apply rules consistently
This commit is contained in:
@@ -6,12 +6,12 @@ import { storeToRefs } from 'pinia';
|
||||
import { computed } from 'vue';
|
||||
import { useCurrentTimeEntryStore } from '@/utils/useCurrentTimeEntry';
|
||||
import { getDayJsInstance } from '@/packages/ui/src/utils/time';
|
||||
import type { TimeEntry } from "@/packages/api/src";
|
||||
import { useTasksStore } from "@/utils/useTasks";
|
||||
import { ChevronRightIcon } from "@heroicons/vue/16/solid";
|
||||
import type { TimeEntry } from '@/packages/api/src';
|
||||
import { useTasksStore } from '@/utils/useTasks';
|
||||
import { ChevronRightIcon } from '@heroicons/vue/16/solid';
|
||||
|
||||
const props = defineProps<{
|
||||
timeEntry: TimeEntry
|
||||
timeEntry: TimeEntry;
|
||||
}>();
|
||||
|
||||
const { projects } = storeToRefs(useProjectsStore());
|
||||
@@ -20,7 +20,7 @@ const project = computed(() => {
|
||||
return projects.value.find((project) => project.id === props.timeEntry.project_id);
|
||||
});
|
||||
|
||||
const {tasks} = storeToRefs(useTasksStore());
|
||||
const { tasks } = storeToRefs(useTasksStore());
|
||||
|
||||
const task = computed(() => {
|
||||
return tasks.value.find((task) => task.id === props.timeEntry.task_id);
|
||||
@@ -42,39 +42,31 @@ async function startTaskTimer() {
|
||||
await setActiveState(true);
|
||||
useCurrentTimeEntryStore().fetchCurrentTimeEntry();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="px-3.5 py-2 grid grid-cols-5 border-b border-b-background-separator">
|
||||
<div class="px-3.5 py-2 grid grid-cols-5 border-b border-b-background-separator">
|
||||
<div class="col-span-4">
|
||||
<p class="font-medium text-text-primary text-sm pb-1 truncate">
|
||||
<span v-if="timeEntry.description"> {{ timeEntry.description }}</span>
|
||||
<span v-else class="text-text-tertiary">No description</span>
|
||||
</p>
|
||||
<ProjectBadge
|
||||
size="base"
|
||||
class="min-w-0 max-w-full"
|
||||
:color="project?.color">
|
||||
<ProjectBadge size="base" class="min-w-0 max-w-full" :color="project?.color">
|
||||
<div class="flex items-center lg:space-x-0.5 min-w-0">
|
||||
<span class="whitespace-nowrap ">
|
||||
<span class="whitespace-nowrap">
|
||||
{{ project?.name ?? 'No Project' }}
|
||||
</span>
|
||||
<ChevronRightIcon
|
||||
v-if="task"
|
||||
class="w-4 text-text-secondary shrink-0"></ChevronRightIcon>
|
||||
<div
|
||||
v-if="task"
|
||||
class="min-w-0 shrink truncate">
|
||||
<div v-if="task" class="min-w-0 shrink truncate">
|
||||
{{ task.name }}
|
||||
</div>
|
||||
</div>
|
||||
</ProjectBadge>
|
||||
</div>
|
||||
<div class="flex items-center justify-center">
|
||||
<TimeTrackerStartStop
|
||||
@changed="startTaskTimer"></TimeTrackerStartStop>
|
||||
<TimeTrackerStartStop @changed="startTaskTimer"></TimeTrackerStartStop>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user