mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 11:42:15 +01:00
add date selector to time entries, fixes ST-134
This commit is contained in:
@@ -6,7 +6,7 @@ import dayjs from 'dayjs';
|
||||
import parse from 'parse-duration';
|
||||
import { useCurrentTimeEntryStore } from '@/utils/useCurrentTimeEntry';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { getDayJsInstance } from '@/utils/time';
|
||||
import { formatDuration, getDayJsInstance } from '@/utils/time';
|
||||
const currentTimeEntryStore = useCurrentTimeEntryStore();
|
||||
const { startLiveTimer, stopLiveTimer, updateTimer, startTimer } =
|
||||
currentTimeEntryStore;
|
||||
@@ -34,8 +34,8 @@ const currentTime = computed({
|
||||
}
|
||||
if (now.value && currentTimeEntry.value.start) {
|
||||
const startTime = dayjs(currentTimeEntry.value.start);
|
||||
const diff = now.value.diff(startTime);
|
||||
return dayjs(diff).utc().format('HH:mm:ss');
|
||||
const diff = now.value.diff(startTime, 'seconds');
|
||||
return formatDuration(diff);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user