Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

add times and counts

Klaus Zandersea0e97f95d23
diff --git a/modules/costs/app/components/my/time_tracking/list_component.rb b/modules/costs/app/components/my/time_tracking/list_component.rb
index 701057a3cbc..885763cbba4 100644
--- a/modules/costs/app/components/my/time_tracking/list_component.rb
+++ b/modules/costs/app/components/my/time_tracking/list_component.rb
@@ -66,8 +66,10 @@ module My
DurationConverter.output(total_hours, format: :hours_and_minutes)
end
- def date_title(date)
- result = [date.strftime("%A %d")]
+ def date_title(date) # rubocop:disable Metrics/AbcSize
+ result = [
+ render(Primer::Beta::Text.new) { date.strftime("%A %d") }
+ ]
if date.today?
result << render(Primer::Beta::Text.new(color: :muted)) { t("label_today") }
@@ -75,6 +77,13 @@ module My
result << render(Primer::Beta::Text.new(color: :muted)) { t("label_yesterday") }
end
+ result << render(Primer::Beta::Text.new(color: :muted)) do
+ count = time_entries_by_day[date].count
+ "#{count} #{TimeEntry.model_name.human(count: count)}"
+ end
+
+ result << render(Primer::Beta::Text.new) { total_hours_per_day(date) }
+
safe_join(result, " ")
end
end