Event definiteion updates
This commit is contained in:
@@ -311,8 +311,8 @@ namespace Core.Calculation
|
||||
|
||||
//var teamsCount = (int)Math.Ceiling(teamDivs);
|
||||
var teamCount = (int)Math.Round(teamDivs);
|
||||
if (teamCount > evt.MaxTeamCountState)
|
||||
teamCount = evt.MaxTeamCountState;
|
||||
if (teamCount > evt.ChapterEligibilityCountState)
|
||||
teamCount = evt.ChapterEligibilityCountState;
|
||||
|
||||
// limit to one team for group events
|
||||
if (_parameters.LimitTeamsToOne
|
||||
|
||||
@@ -9,8 +9,7 @@ public class EventDefinition
|
||||
[Required]
|
||||
[StringLength(100, MinimumLength = 2)]
|
||||
[Display(Name = "Event Name")]
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(40, MinimumLength = 2)]
|
||||
@@ -31,45 +30,53 @@ public class EventDefinition
|
||||
? MinTeamSize.ToString()
|
||||
: $"{MinTeamSize.ToString()}-{MaxTeamSize.ToString()}";
|
||||
|
||||
[StringLength(100, MinimumLength = 3)]
|
||||
public string? SemifinalistActivity { get; set; }
|
||||
|
||||
public bool InterviewOrPresentation
|
||||
=> SemifinalistActivity != null && (SemifinalistActivity.Contains("Interview") || SemifinalistActivity.Contains("Presentation"));
|
||||
|
||||
public bool OnSiteActivity
|
||||
=> SemifinalistActivity != null
|
||||
&& (SemifinalistActivity.Contains("Challenge")
|
||||
|| SemifinalistActivity.Contains("Race")
|
||||
|| SemifinalistActivity.Contains("Speech")
|
||||
|| SemifinalistActivity.Contains("Test")
|
||||
|| SemifinalistActivity.Contains("Flight")
|
||||
|| Name.Contains("Leadership")
|
||||
|| Name.Contains("Forensic")
|
||||
|| Name.Contains("Flight")
|
||||
|| Name.Contains("Coding")
|
||||
|| SemifinalistActivity.Contains("Debate")
|
||||
|| SemifinalistActivity.Contains("Photography")
|
||||
|| SemifinalistActivity.Contains("Build")
|
||||
|| Name.Contains("Chapter")
|
||||
|| Name.Contains("Podcast"));
|
||||
public bool OnSiteActivity { get; set; }
|
||||
//=> SemifinalistActivity != null
|
||||
// && (SemifinalistActivity.Contains("Challenge")
|
||||
// || SemifinalistActivity.Contains("Race")
|
||||
// || SemifinalistActivity.Contains("Speech")
|
||||
// || SemifinalistActivity.Contains("Test")
|
||||
// || SemifinalistActivity.Contains("Flight")
|
||||
// || Name.Contains("Leadership")
|
||||
// || Name.Contains("Forensic")
|
||||
// || Name.Contains("Flight")
|
||||
// || Name.Contains("Coding")
|
||||
// || SemifinalistActivity.Contains("Debate")
|
||||
// || SemifinalistActivity.Contains("Photography")
|
||||
// || SemifinalistActivity.Contains("Build")
|
||||
// || Name.Contains("Chapter")
|
||||
// || Name.Contains("Podcast"));
|
||||
|
||||
[StringLength(1024, MinimumLength = 3)]
|
||||
public string? Notes { get; set; }
|
||||
|
||||
[Range(0, 3)]
|
||||
public int ChapterEligibilityCountRegionals { get; set; }
|
||||
|
||||
[Range(1, 3)]
|
||||
public int MaxTeamCountState { get; set; }
|
||||
public bool RegionalEvent { get; set; }
|
||||
public int ChapterEligibilityCountState { get; set; }
|
||||
|
||||
public bool RegionalPresubmit { get; set; }
|
||||
public bool StatePresubmission { get; set; }
|
||||
public bool StatePretesting { get; set; }
|
||||
public bool StatePreliminaryRound { get; set; }
|
||||
public bool RegionalEvent => ChapterEligibilityCountRegionals > 0;
|
||||
|
||||
public string? Documentation { get; set; }
|
||||
public bool Presubmission { get; set; }
|
||||
|
||||
|
||||
[StringLength(64)]
|
||||
public string? Documentation { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Eligibility { get; set; }
|
||||
[StringLength(256)]
|
||||
public string Eligibility { get; set; }
|
||||
[StringLength(4096)]
|
||||
public string? Theme { get; set; }
|
||||
public string? Description { get; set; }
|
||||
[StringLength(1024)]
|
||||
public string? Description { get; set; }
|
||||
public int? LevelOfEffort { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
@@ -80,16 +87,4 @@ public class EventDefinition
|
||||
public static readonly EventDefinition GeneralSchedule = new(){Name = "General Schedule"};
|
||||
public static readonly EventDefinition VotingDelegates = new(){Name = "Voting Delegates"};
|
||||
|
||||
|
||||
public string EventAttributes ()
|
||||
{
|
||||
var st = new List<string>();
|
||||
|
||||
if (EventFormat is EventFormat.Individual)
|
||||
st.Add( "Ind.");
|
||||
if (RegionalEvent)
|
||||
st.Add( "Reg.");
|
||||
|
||||
return string.Join(", ", st);
|
||||
}
|
||||
}
|
||||
@@ -56,17 +56,17 @@ public class EventDefinitionParser : CsvParserBase
|
||||
Name = name.Trim(),
|
||||
ShortName = shortName.Trim(),
|
||||
EventFormat = format,
|
||||
MaxTeamCountState = stateTeams,
|
||||
ChapterEligibilityCountState = stateTeams,
|
||||
MinTeamSize = min,
|
||||
MaxTeamSize = max,
|
||||
SemifinalistActivity = semifinalistActivity,
|
||||
RegionalEvent = !string.IsNullOrEmpty(regionalCount),
|
||||
RegionalPresubmit = regionalPresubmit.Trim() == "TRUE",
|
||||
//RegionalEvent = !string.IsNullOrEmpty(regionalCount),
|
||||
//RegionalPresubmit = regionalPresubmit.Trim() == "TRUE",
|
||||
Notes = regionalNotes,
|
||||
Documentation= documentation,
|
||||
StatePresubmission = statePresubmission.Trim() == "TRUE",
|
||||
StatePretesting = statePretesting.Trim() == "TRUE",
|
||||
StatePreliminaryRound = statePreliminary.Trim() == "TRUE",
|
||||
Presubmission = statePresubmission.Trim() == "TRUE",
|
||||
//StatePretesting = statePretesting.Trim() == "TRUE",
|
||||
//StatePreliminaryRound = statePreliminary.Trim() == "TRUE",
|
||||
Eligibility = eligibility,
|
||||
Theme = theme,
|
||||
Description = description,
|
||||
|
||||
Reference in New Issue
Block a user