Refactors event extraction to utility function
Moves event extraction logic to a shared utility function for reusability. Removes redundant code and improves consistency in event handling. The original duration is now mandatory.
This commit is contained in:
parent
0d33b51ff8
commit
8b5420f367
2 changed files with 12 additions and 76 deletions
|
|
@ -164,7 +164,7 @@ export class SwpEventElement extends BaseEventElement {
|
|||
/**
|
||||
* Extract CalendarEvent from DOM element
|
||||
*/
|
||||
private static extractCalendarEventFromElement(element: HTMLElement): CalendarEvent {
|
||||
public static extractCalendarEventFromElement(element: HTMLElement): CalendarEvent {
|
||||
return {
|
||||
id: element.dataset.eventId || '',
|
||||
title: element.dataset.title || '',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue