File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -177,16 +177,23 @@ const events = computed(() => {
177177// Daily totals used in day header
178178const dailyTotals = computed (() => {
179179 const totals: Record <string , number > = {};
180- props .timeEntries
181- .filter ((entry ) => entry .end !== null )
182- .forEach ((entry ) => {
183- const date = getDayJsInstance ()(entry .start ).format (' YYYY-MM-DD' );
184- const duration = getDayJsInstance ()(entry .end ! ).diff (
180+ props .timeEntries .forEach ((entry ) => {
181+ const date = getDayJsInstance ()(entry .start ).format (' YYYY-MM-DD' );
182+ let duration: number ;
183+
184+ if (entry .end !== null ) {
185+ // Completed entry
186+ duration = getDayJsInstance ()(entry .end ).diff (
185187 getDayJsInstance ()(entry .start ),
186188 ' minutes'
187189 );
188- totals [date ] = (totals [date ] || 0 ) + duration ;
189- });
190+ } else {
191+ // Running entry - use current time
192+ duration = currentTime .value .diff (getDayJsInstance ()(entry .start ), ' minutes' );
193+ }
194+
195+ totals [date ] = (totals [date ] || 0 ) + duration ;
196+ });
190197 return totals ;
191198});
192199
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ body {
183183 --popover : var (--theme-color-card-background );
184184 --popover-foreground : var (--color-text-primary );
185185 --primary : var (--color-bg-primary );
186- --primary-foreground : var (--theme- color-button -primary-text );
186+ --primary-foreground : var (--color-text -primary );
187187 --secondary : var (--color-bg-secondary );
188188 --secondary-foreground : var (--color-text-primary );
189189 --muted : var (--color-bg-tertiary );
@@ -210,7 +210,7 @@ body {
210210 --popover : var (--theme-color-card-background );
211211 --popover-foreground : var (--color-text-primary );
212212 --primary : var (--color-bg-primary );
213- --primary-foreground : var (--theme- color-button -primary-text );
213+ --primary-foreground : var (--color-text -primary );
214214 --secondary : var (--color-bg-secondary );
215215 --secondary-foreground : var (--color-text-primary );
216216 --muted : var (--color-bg-tertiary );
You can’t perform that action at this time.
0 commit comments