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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
no movement on time entry drop
ulferts2102ae8c7a61
diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sassindex a7b31d04254..52840a30580 100644--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass@@ -60,7 +60,7 @@transition: opacity 1s easebackground: #EAEAEA- .fc-content+ .te-calendar--add-iconcolor: blackwidth: 100%font-weight: normal@@ -69,6 +69,9 @@&.-prohibitedcursor: not-allowed+ .te-calendar--add-icon+ display: none+.te-calendar--time-entry.fc-contentheight: 100%diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.tsindex 00ebdf962b6..d8e51f0a62d 100644--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts@@ -44,6 +44,7 @@ interface CalendarMoveEvent {const TIME_ENTRY_CLASS_NAME = 'te-calendar--time-entry';const DAY_SUM_CLASS_NAME = 'te-calendar--day-sum';const ADD_ENTRY_CLASS_NAME = 'te-calendar--add-entry';+const ADD_ICON_CLASS_NAME = 'te-calendar--add-icon';const ADD_ENTRY_PROHIBITED_CLASS_NAME = '-prohibited';@Component({@@ -279,17 +280,15 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewIprotected addEntry(date:Moment, duration:number) {let classNames = [ADD_ENTRY_CLASS_NAME];- let title = '+';if (duration >= 24) {classNames.push(ADD_ENTRY_PROHIBITED_CLASS_NAME);- title = '';}return {- title: title,start: date.clone().format(),end: date.clone().add(this.maxHour - Math.min(duration * this.scaleRatio, this.maxHour - 1) - 0.5, 'h').format(),+ rendering: "background" as 'background',classNames: classNames};}@@ -406,6 +405,8 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewI}private alterEventEntry(event:CalendarViewEvent) {+ this.appendAddIcon(event);+if (!event.event.extendedProps.entry) {return;}@@ -415,6 +416,17 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewIthis.appendFadeout(event);}+ private appendAddIcon(event:CalendarViewEvent) {+ if (!event.el.classList.contains(ADD_ENTRY_CLASS_NAME)) {+ return;+ }++ let addIcon = document.createElement('div');+ addIcon.classList.add(ADD_ICON_CLASS_NAME);+ addIcon.innerText = '+';+ event.el.append(addIcon);+ }+private addTooltip(event:CalendarViewEvent) {if (this.browserDetector.isMobile) {return;diff --git a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb b/modules/my_page/spec/features/my/time_entries_current_user_spec.rbindex b9698cf6ab5..bb2018f6ae9 100644--- a/modules/my_page/spec/features/my/time_entries_current_user_spec.rb+++ b/modules/my_page/spec/features/my/time_entries_current_user_spec.rb@@ -167,7 +167,7 @@ describe 'My page time entries current user widget spec', type: :feature, js: tr# The add time entry event is invisiblewithin entries_area.area do- find(".fc-content-skeleton td:nth-of-type(5) .fc-event-container .te-calendar--add-entry", visible: false).click+ find(".fc-content-skeleton td:nth-of-type(5) .te-calendar--add-entry", visible: false).clickendexpect(page)