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

short style for everything <= 90m, hide everything except WP title

Klaus Zandersff7c6aa1158a
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 3a2fb76d92a..0018bbe2114 100644
--- a/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/my/time-tracking.controller.ts
@@ -90,7 +90,9 @@ export default class MyTimeTrackingController extends Controller {
defaultTimedEventDuration: this.DEFAULT_TIMED_EVENT_DURATION,
allDayContent: '',
dayMaxEventRows: 4, // 3 + more link
- eventShortHeight: 45,
+ // We want everything including 90 minutes to be short style ... If we set it to 90,
+ // 2 hours is also considered short ... So, magic number at 80 ... Don't ask me why
+ eventShortHeight: 80,
eventMinHeight: 30,
eventMaxStack: 2,
nowIndicator: true,
@@ -118,7 +120,7 @@ export default class MyTimeTrackingController extends Controller {
if (!arg.event.allDay) {
const time = `${toMoment(arg.event.start!, this.calendar).format('LT')} - ${toMoment(arg.event.end!, this.calendar).format('LT')}`;
- timeDetails = `<div class="color-fg-muted mt-2" title="${time}">${time}</div>`;
+ timeDetails = `<div class="fc-entry-time color-fg-muted mt-2" title="${time}">${time}</div>`;
}
return {
@@ -131,7 +133,7 @@ export default class MyTimeTrackingController extends Controller {
${arg.event.extendedProps.workPackageSubject}
</a>
</div>
- <div class="color-fg-muted" title="${arg.event.extendedProps.projectName}">${arg.event.extendedProps.projectName}</div>
+ <div class="fc-project-name color-fg-muted" title="${arg.event.extendedProps.projectName}">${arg.event.extendedProps.projectName}</div>
${timeDetails}
</div>
</div>`,
diff --git a/modules/costs/app/components/my/time_tracking/calendar_component.sass b/modules/costs/app/components/my/time_tracking/calendar_component.sass
index 557e396d368..dfe5e249470 100644
--- a/modules/costs/app/components/my/time_tracking/calendar_component.sass
+++ b/modules/costs/app/components/my/time_tracking/calendar_component.sass
@@ -4,11 +4,6 @@
.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
@@ -22,6 +17,18 @@
.fc-event-time
color: var(--fgColor-default)
+ &.fc-timegrid-event-short, &.fc-daygrid-block-event
+ // background: hotpink !important
+ .fc-event-time::after
+ content: ''
+ display: none
+
+ .fc-project-name
+ display: none
+
+ .fc-entry-time
+ display: none
+
.fc-popover
background: var(--fc-page-bg-color) !important