Single isntances and some updates shit.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Itenso.TimePeriod;
|
||||
using Wino.Core.Domain.Models.Calendar;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
|
||||
@@ -19,4 +20,13 @@ public interface ICalendarItem
|
||||
bool IsRecurringChild { get; }
|
||||
bool IsRecurringParent { get; }
|
||||
bool IsRecurringEvent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the display title for this calendar item when rendered in a specific day.
|
||||
/// For multi-day events, includes start/end time indicators.
|
||||
/// </summary>
|
||||
/// <param name="displayingPeriod">The period of the day where this item is being rendered.</param>
|
||||
/// <param name="calendarSettings">Calendar settings for time formatting.</param>
|
||||
/// <returns>The formatted title string.</returns>
|
||||
string GetDisplayTitle(ITimePeriod displayingPeriod, CalendarSettings calendarSettings);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
using Itenso.TimePeriod;
|
||||
using Wino.Core.Domain.Entities.Calendar;
|
||||
using Wino.Core.Domain.Models.Calendar;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces;
|
||||
|
||||
/// <summary>
|
||||
/// Temporarily to enforce CalendarItemViewModel. Used in CalendarEventCollection.
|
||||
@@ -6,4 +10,21 @@
|
||||
public interface ICalendarItemViewModel
|
||||
{
|
||||
bool IsSelected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The period of the day where this item is currently being displayed.
|
||||
/// </summary>
|
||||
ITimePeriod DisplayingPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Calendar settings for time formatting.
|
||||
/// </summary>
|
||||
CalendarSettings CalendarSettings { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updates the view model's underlying CalendarItem from new data.
|
||||
/// This allows in-place updates without removing and re-adding items.
|
||||
/// </summary>
|
||||
/// <param name="calendarItem">The updated calendar item data.</param>
|
||||
void UpdateFrom(CalendarItem calendarItem);
|
||||
}
|
||||
|
||||
@@ -24,16 +24,8 @@ public interface ICalendarService
|
||||
/// </summary>
|
||||
/// <param name="calendar">The calendar to retrieve events from.</param>
|
||||
/// <param name="period">The time period to query events for.</param>
|
||||
/// <returns>List of calendar items including regular events and recurring event occurrences.</returns>
|
||||
/// <returns>List of calendar items that fall within the requested period.</returns>
|
||||
Task<List<CalendarItem>> GetCalendarEventsAsync(IAccountCalendar calendar, ITimePeriod period);
|
||||
|
||||
/// <summary>
|
||||
/// Expands a recurring calendar item to check if any of its occurrences fall within the given periods.
|
||||
/// </summary>
|
||||
/// <param name="calendarItem">The calendar item to expand (can be recurring or non-recurring).</param>
|
||||
/// <param name="periods">The list of periods to check against.</param>
|
||||
/// <returns>List of calendar items (either the original item or expanded recurrence instances) that fall within the periods.</returns>
|
||||
Task<List<CalendarItem>> GetExpandedRecurringEventsForPeriodsAsync(CalendarItem calendarItem, IEnumerable<ITimePeriod> periods);
|
||||
|
||||
Task<CalendarItem> GetCalendarItemAsync(Guid accountCalendarId, string remoteEventId);
|
||||
Task UpdateCalendarDeltaSynchronizationToken(Guid calendarId, string deltaToken);
|
||||
|
||||
Reference in New Issue
Block a user