Enhance authentication flow by adding return URL support
This commit updates the authentication process to include a return URL parameter, allowing users to be redirected back to their original page after logging in. Changes were made to the AuthController, Login component, and Routes component to handle the return URL appropriately. Additionally, improvements were made to the TeamScheduler and TeamSchedulerSolution classes for better team and student management. These enhancements improve user experience and navigation within the application.
This commit is contained in:
@@ -85,7 +85,7 @@ public class TeamScheduler
|
||||
var m = new int[_students.Length,_teams.Length];
|
||||
foreach (var i in _students)
|
||||
foreach (var t in _teams)
|
||||
m[i, t] = _studentObjects[i].Teams.Contains(_teamObjects[t]) ? 1 : 0;
|
||||
m[i, t] = _studentObjects[i].Teams.Any(team => team.Id == _teamObjects[t].Id) ? 1 : 0;
|
||||
|
||||
// Decision variables:
|
||||
// x[t,s] = 1 if meeting of team t takes place at time slot s, else 0
|
||||
|
||||
@@ -84,6 +84,7 @@ public class TeamSchedulerSolution(
|
||||
public Team[] StudentUnassignedTeams(Student student)
|
||||
{
|
||||
var meetingTeams = TimeSlots.SelectMany(t => t.Teams);
|
||||
return student.Teams.Where(e => !meetingTeams.Contains(e)).ToArray();
|
||||
var meetingTeamIds = meetingTeams.Select(t => t.Id).ToHashSet();
|
||||
return student.Teams.Where(e => !meetingTeamIds.Contains(e.Id)).ToArray();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user