Add recomendations for meeting scheduler
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)" : ""))
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user