Add recomendations for meeting scheduler

This commit is contained in:
2025-10-31 13:29:43 -04:00
parent cf9949876d
commit b7fa7fcbe1
4 changed files with 93 additions and 61 deletions
+16
View File
@@ -0,0 +1,16 @@
using Core.Entities;
namespace Core.Calculation;
public class TeamIdComparer : IEqualityComparer<Team>
{
public bool Equals(Team? x, Team? y)
{
return x != null && y != null && x.Id == y.Id;
}
public int GetHashCode(Team obj)
{
return obj.Id.GetHashCode();
}
}
+3 -1
View File
@@ -11,7 +11,9 @@ public class TeamSchedulerSolution(
public TeamScheduleTimeSlot[] TimeSlots { get; set; }
= timeSlots.Select( (teams,i) =>
new TeamScheduleTimeSlot{Name = i.ToString(), Teams = teams,
new TeamScheduleTimeSlot{
Name = "Time Slot " + (i + 1),
Teams = teams,
StudentOverlaps = GetStudentTeamOverlaps(teams),
UnscheduledStudents = GetStudentsNotInTimSlot(teams, students)
}
+13
View File
@@ -62,4 +62,17 @@ public class Team
{
return $"{Event.Name} {(Identifier != null ? $"({Identifier})" : "")}";
}
public string StudentsFirstNames
{
get
{
return
string.Join(", ",
Students.Select(e =>
e.FirstName
+ (Captain != null && (Captain.Equals(e)) ? "(Cpt)" : ""))
);
}
}
}