[OP#65516] completely disable resizing for events without start & end times

This commit is contained in:
Klaus Zanders
2025-07-08 11:10:58 +02:00
parent b2244c73bd
commit c23dea10ac
3 changed files with 6 additions and 2 deletions
@@ -210,6 +210,9 @@ export default class MyTimeTrackingController extends Controller {
);
}
// mark the event explicitly as resizable if it is not an all day event
info.event.setProp('durationEditable', !info.event.allDay);
this.calendar.setOption('defaultTimedEventDuration', this.DEFAULT_TIMED_EVENT_DURATION);
},
eventClick: (info) => {
+1 -1
View File
@@ -57,7 +57,7 @@ module FullCalendar
"title" => title,
"url" => url,
"classNames" => class_names
}.merge(additional_attributes).compact_blank.as_json
}.merge(additional_attributes).compact.as_json
end
def to_json(*)
@@ -47,8 +47,9 @@ module FullCalendar
end
end
def additional_attributes
def additional_attributes # rubocop:disable Metrics/AbcSize
{
durationEditable: time_entry.start_time.present?,
hours: time_entry.hours,
typeId: time_entry.work_package.type_id,
workPackageId: time_entry.work_package.id,