Add presubmission filter functionality to MeetingSchedule component
This commit introduces a new filter for presubmission teams in the MeetingSchedule component. It adds an AddRemoveFilter for managing teams whose events require presubmission, allowing users to add or remove these teams from the scheduled list. The corresponding methods for adding and removing presubmission teams are implemented, enhancing the component's functionality and improving user experience in managing event teams.
This commit is contained in:
@@ -87,6 +87,13 @@
|
||||
AddTooltip="Add regional event teams"
|
||||
RemoveTooltip="Remove regional event teams" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" lg="4">
|
||||
<AddRemoveFilter Label="Presubmission"
|
||||
OnAdd="AddPresubmission"
|
||||
OnRemove="RemovePresubmission"
|
||||
AddTooltip="Add teams whose events require presubmission"
|
||||
RemoveTooltip="Remove teams whose events require presubmission" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" lg="4">
|
||||
<AddRemoveFilter Label="Individual"
|
||||
OnAdd="AddIndividual"
|
||||
@@ -246,6 +253,13 @@
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void AddPresubmission()
|
||||
{
|
||||
var presubmissionTeams = _teams.Where(t => t.Event?.Presubmission == true);
|
||||
_scheduledTeams = _scheduledTeams.Concat(presubmissionTeams).Distinct();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void AddHighLevelOfEffort()
|
||||
{
|
||||
_scheduledTeams = _scheduledTeams.AddHighLevelOfEffort(_teams);
|
||||
@@ -266,6 +280,16 @@
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void RemovePresubmission()
|
||||
{
|
||||
var presubmissionTeamIds = _teams
|
||||
.Where(t => t.Event?.Presubmission == true)
|
||||
.Select(t => t.Id)
|
||||
.ToHashSet();
|
||||
_scheduledTeams = _scheduledTeams.Where(t => !presubmissionTeamIds.Contains(t.Id));
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void AddIndividual()
|
||||
{
|
||||
var individualTeams = _teams.Where(t => t.Event.EventFormat == EventFormat.Individual);
|
||||
|
||||
Reference in New Issue
Block a user