mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add aggregation/grouping of time entries with same attributes in time view
This commit is contained in:
@@ -20,6 +20,7 @@ const { currentTimeEntry } = storeToRefs(currentTimeEntryStore);
|
||||
|
||||
const props = defineProps<{
|
||||
timeEntry: TimeEntry;
|
||||
indent?: boolean;
|
||||
}>();
|
||||
|
||||
const { updateTimeEntry, createTimeEntry, fetchTimeEntries } =
|
||||
@@ -69,6 +70,10 @@ function updateTimeEntryTags(tags: string[]) {
|
||||
updateTimeEntry({ ...props.timeEntry, tags });
|
||||
}
|
||||
|
||||
function updateTimeEntryBillable(billable: boolean) {
|
||||
updateTimeEntry({ ...props.timeEntry, billable });
|
||||
}
|
||||
|
||||
function updateProjectAndTask(projectId: string, taskId: string) {
|
||||
updateTimeEntry({
|
||||
...props.timeEntry,
|
||||
@@ -88,13 +93,13 @@ function updateProjectAndTask(projectId: string, taskId: string) {
|
||||
<input
|
||||
type="checkbox"
|
||||
class="h-4 w-4 rounded bg-card-background border-input-border text-accent-500/80 focus:ring-accent-500/80" />
|
||||
<div class="w-7 h-7" v-if="indent === true"></div>
|
||||
<TimeEntryDescriptionInput
|
||||
@changed="updateTimeEntryDescription"
|
||||
class="flex-1"
|
||||
:modelValue="
|
||||
timeEntry.description
|
||||
"></TimeEntryDescriptionInput>
|
||||
|
||||
<TimeTrackerProjectTaskDropdown
|
||||
:showBadgeBorder="false"
|
||||
@changed="updateProjectAndTask"
|
||||
@@ -111,10 +116,7 @@ function updateProjectAndTask(projectId: string, taskId: string) {
|
||||
:modelValue="timeEntry.billable"
|
||||
size="small"
|
||||
@changed="
|
||||
updateTimeEntry({
|
||||
...timeEntry,
|
||||
billable: $event,
|
||||
})
|
||||
updateTimeEntryBillable
|
||||
"></BillableToggleButton>
|
||||
<div class="flex-1">
|
||||
<TimeEntryRangeSelector
|
||||
|
||||
Reference in New Issue
Block a user