From f9c3f42289464ce3090ef02ce67c3cf7cd6f06eb Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Mon, 12 May 2025 22:06:24 +0200 Subject: [PATCH] improve time entry range design issue in 12-h format --- .../js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue | 4 ++-- .../js/packages/ui/src/TimeEntry/TimeEntryRangeSelector.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue b/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue index 21b03236..23075bc8 100644 --- a/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue +++ b/resources/js/packages/ui/src/TimeEntry/TimeEntryAggregateRow.vue @@ -25,7 +25,7 @@ import TimeEntryRow from '@/packages/ui/src/TimeEntry/TimeEntryRow.vue'; import GroupedItemsCountButton from '@/packages/ui/src/GroupedItemsCountButton.vue'; import type { TimeEntriesGroupedByType } from '@/types/time-entries'; import { Checkbox } from '@/packages/ui/src'; - +import { twMerge } from 'tailwind-merge'; const props = defineProps<{ timeEntry: TimeEntriesGroupedByType; projects: Project[]; @@ -154,7 +154,7 @@ function onSelectChange(checked: boolean) { ">
diff --git a/resources/js/packages/ui/src/TimeEntry/TimeEntryRangeSelector.vue b/resources/js/packages/ui/src/TimeEntry/TimeEntryRangeSelector.vue index 75c5f138..1e66c6fb 100644 --- a/resources/js/packages/ui/src/TimeEntry/TimeEntryRangeSelector.vue +++ b/resources/js/packages/ui/src/TimeEntry/TimeEntryRangeSelector.vue @@ -39,10 +39,11 @@ const organization = inject>('organization'); data-testid="time_entry_range_selector" :class=" twMerge( - 'text-text-secondary w-[110px] px-2 bg-transparent text-center hover:bg-card-background rounded-lg border border-transparent hover:border-card-border focus-visible:outline-none focus:outline-none focus-visible:ring-2 focus-visible:text-text-primary focus-visible:ring-ring focus-visible:bg-tertiary', + 'text-text-secondary px-2 bg-transparent text-center hover:bg-card-background rounded-lg border border-transparent hover:border-card-border focus-visible:outline-none focus:outline-none focus-visible:ring-2 focus-visible:text-text-primary focus-visible:ring-ring focus-visible:bg-tertiary', showDate ? 'text-xs py-1.5 font-semibold' : 'text-sm py-1.5 font-medium', + organization?.time_format === '12-hours' ? 'w-[160px]' : 'w-[110px]', open && 'border-card-border bg-card-background' ) ">