Add meeting schedule state management services and related models

This commit introduces several new services and models to manage the meeting schedule state within localStorage. The MeetingScheduleState class is created to track scheduled teams, absent students, time slot counts, extended teams, and excluded students. Additionally, the IMeetingScheduleStateService interface and its implementation, MeetingScheduleStateService, are added to handle loading and saving state data. The MeetingScheduleClipboardService and MeetingScheduleDataService are also introduced to facilitate clipboard operations and data loading from the database, respectively. These enhancements improve the overall functionality and user experience of the meeting scheduling feature.
This commit is contained in:
2026-01-19 23:02:55 -05:00
parent 649a0061cf
commit ddb743847d
15 changed files with 766 additions and 467 deletions
@@ -0,0 +1,59 @@
using Core.Entities;
namespace WebApp.Services;
/// <summary>
/// Service for managing meeting schedule state persistence in localStorage.
/// </summary>
public interface IMeetingScheduleStateService
{
/// <summary>
/// Loads scheduled teams from localStorage.
/// </summary>
Task<IEnumerable<Team>> LoadScheduledTeamsAsync(Team[] allTeams);
/// <summary>
/// Saves scheduled teams to localStorage.
/// </summary>
Task SaveScheduledTeamsAsync(IEnumerable<Team> scheduledTeams);
/// <summary>
/// Loads absent students from localStorage.
/// </summary>
Task<IEnumerable<Student>> LoadAbsentStudentsAsync(Student[] allStudents);
/// <summary>
/// Saves absent students to localStorage.
/// </summary>
Task SaveAbsentStudentsAsync(IEnumerable<Student> absentStudents);
/// <summary>
/// Loads time slot count from localStorage.
/// </summary>
Task<int> LoadTimeSlotCountAsync(int defaultValue = 2);
/// <summary>
/// Saves time slot count to localStorage.
/// </summary>
Task SaveTimeSlotCountAsync(int timeSlotCount);
/// <summary>
/// Loads extended teams from localStorage.
/// </summary>
Task<IEnumerable<Team>> LoadExtendedTeamsAsync(Team[] allTeams);
/// <summary>
/// Saves extended teams to localStorage.
/// </summary>
Task SaveExtendedTeamsAsync(IEnumerable<Team> extendedTeams);
/// <summary>
/// Loads excluded students from localStorage.
/// </summary>
Task<Dictionary<(int teamId, int timeSlotIndex, int studentId), bool>> LoadExcludedStudentsAsync();
/// <summary>
/// Saves excluded students to localStorage.
/// </summary>
Task SaveExcludedStudentsAsync(Dictionary<(int teamId, int timeSlotIndex, int studentId), bool> excludedStudents);
}