diff --git a/e2e/time.spec.ts b/e2e/time.spec.ts index f8315b7f..486f1c88 100644 --- a/e2e/time.spec.ts +++ b/e2e/time.spec.ts @@ -2315,7 +2315,9 @@ test('test that break entries show a break badge and split day total on the time await page.goto(PLAYWRIGHT_BASE_URL + '/time'); await expect(page.getByTestId('break_badge').first()).toBeVisible(); await expect(page.getByTestId('break_badge').first()).toContainText('Break'); - // Day heading shows the break portion separately from worked time + // Day heading shows worked time first, then the break portion await expect(page.getByTestId('day_break_duration').first()).toBeVisible(); - await expect(page.getByTestId('day_break_duration').first()).toContainText('break'); + await expect(page.getByTestId('day_break_duration').first().locator('..')).toContainText( + '2h 00min work · 0h 30min break' + ); }); diff --git a/resources/js/Components/Timesheet/TimesheetGrid.vue b/resources/js/Components/Timesheet/TimesheetGrid.vue index 9cd43ea3..671a96a3 100644 --- a/resources/js/Components/Timesheet/TimesheetGrid.vue +++ b/resources/js/Components/Timesheet/TimesheetGrid.vue @@ -186,19 +186,27 @@ const emit = defineEmits<{ ? 'text-text-primary' : 'text-text-secondary', ]"> - {{ total > 0 ? formatDuration(total) : '-' }} + {{ formatDuration(total) + }} + work - +{{ formatDuration(breakDayTotals[dayIndex] ?? 0) }} break - + class="font-normal text-text-tertiary" + >{{ formatDuration(breakDayTotals[dayIndex] ?? 0) }} break