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

final styling

Klaus Zandersfb8d3237350e
diff --git a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
index bade0239f41..1363089c097 100644
--- a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
@@ -53,7 +53,7 @@ export default class MyTimeTrackingController extends Controller {
locale: this.localeValue,
events: this.timeEntriesValue,
headerToolbar: false,
- aspectRatio: 2,
+ height: '100%',
initialDate: this.initialDateValue,
selectable: this.canCreateValue,
editable: this.canEditValue,
diff --git a/modules/costs/app/components/my/time_tracking/calendar.sass b/modules/costs/app/components/my/time_tracking/calendar.sass
index aa0392402be..21366a456a6 100644
--- a/modules/costs/app/components/my/time_tracking/calendar.sass
+++ b/modules/costs/app/components/my/time_tracking/calendar.sass
@@ -1,8 +1,31 @@
-.calendar-time-entry-event
- display: flex
- user-select: none
- border: 1px solid var(--borderColor-default)
- border-radius: 5px
- background: var(--body-background)
- color: var(--body-font-color)
- font-size: var(--body-font-size)
+.time-entry-calendar
+ height: calc(100% - 110px)
+
+ .op-fc-wrapper
+ flex-grow: 1
+
+ .fc-timegrid-event-short
+ .fc-event-time::after
+ content: ''
+ display: none
+
+ .calendar-time-entry-event
+ display: flex
+ user-select: none
+ border: 1px solid var(--borderColor-default)
+ border-radius: 5px
+ background: var(--body-background)
+ color: var(--body-font-color)
+ font-size: var(--body-font-size)
+
+ .fc-popover
+ background: var(--fc-page-bg-color) !important
+
+ .fc-daygrid-event
+ background: var(--body-background) !important
+
+ .fc-event-title-container
+ margin: 0 !important
+
+ .fc-event-time
+ font-weight: normal
diff --git a/modules/costs/app/components/my/time_tracking/calendar_component.html.erb b/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
index edd6f7c9dd8..0cebef6a5f5 100644
--- a/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
+++ b/modules/costs/app/components/my/time_tracking/calendar_component.html.erb
@@ -1,4 +1,5 @@
-<%= component_wrapper(tag: "div", data: wrapper_data) do %>
+<%= flex_layout(data: wrapper_data, classes: "time-entry-calendar") do |calendar_page| %>
+<% calendar_page.with_row do %>
<%= render(Primer::OpenProject::SubHeader.new) do |component|
component.with_text { title }
@@ -20,12 +21,14 @@
href: dialog_time_entries_path(onlyMe: true)
) { "Log Time" }
end %>
-
- <div data-my--time-tracking-target="calendar"></div>
+ <% end %>
+ <% calendar_page.with_row(classes: "op-fc-wrapper", data: { "my--time-tracking-target" => "calendar" }) %>
<% if mode != :day %>
+<% calendar_page.with_row do %>
<%= flex_layout(align_items: :flex_end) do |flex| %>
<% flex.with_row(mt: 2, font_weight: :bold) { total_hours } %>
<% end %>
+ <% end %>
<% end %>
<% end %>