-
+
@formattedName
@@ -40,7 +41,8 @@
OnToggleTeam.InvokeAsync(unassignedTeam))" style="cursor: pointer; display: inline-block;">
+ Color="@chipColor"
+ Variant="@AppIcons.TeamChipVariant()">
@if (isScheduled)
{
diff --git a/WebApp/Components/Features/Students/Registration.razor b/WebApp/Components/Features/Students/Registration.razor
index af22628..eeb466b 100644
--- a/WebApp/Components/Features/Students/Registration.razor
+++ b/WebApp/Components/Features/Students/Registration.razor
@@ -94,6 +94,7 @@
@team
diff --git a/WebApp/Components/Features/Teams/Assignment.razor b/WebApp/Components/Features/Teams/Assignment.razor
index add1779..ed64720 100644
--- a/WebApp/Components/Features/Teams/Assignment.razor
+++ b/WebApp/Components/Features/Teams/Assignment.razor
@@ -153,85 +153,87 @@
.Concat(context.Events)
.Distinct();
}
- @foreach (var e in
- allStudentEvents
- .OrderBy(e =>
- context.Student.EventRankings
- .Find(ser => ser.EventDefinition == e)?.Rank ?? 10))
- {
- var eventRank = context.Student.EventRankings.Find(er => er.EventDefinition == e)?.Rank;
- var isAssigned = context.Events.Contains(e);
-
- var color = AppIcons.RankedEventColor(eventRank ?? 0);
- var style = "border-style: solid;";
-
- if (isAssigned)
+
+ @foreach (var e in
+ allStudentEvents
+ .OrderBy(e =>
+ context.Student.EventRankings
+ .Find(ser => ser.EventDefinition == e)?.Rank ?? 10))
{
- style += "border-color:black; border-width:thin;";
- if (eventRank.HasValue)
+ var eventRank = context.Student.EventRankings.Find(er => er.EventDefinition == e)?.Rank;
+ var isAssigned = context.Events.Contains(e);
+
+ var color = AppIcons.RankedEventColor(eventRank ?? 0);
+ var style = "border-style: solid;";
+
+ if (isAssigned)
{
- style += $"background:{color};";
- if (eventRank == 1)
- style += $"color:black";
+ style += "border-color:black; border-width:thin;";
+ if (eventRank.HasValue)
+ {
+ style += $"background:{color};";
+ if (eventRank == 1)
+ style += $"color:black";
+ }
+ else
+ style += $"background:{Colors.Gray.Lighten3};";
}
else
- style += $"background:{Colors.Gray.Lighten3};";
+ {
+ if (eventRank.HasValue)
+ style += $"border-color:{color}; border-width:medium; color:{Colors.Gray.Lighten1};";
+ }
+
+ var isIncluded = _assignmentRequirements
+ .Find(ar =>
+ ar.EventDefinition == e
+ && ar.Student == context.Student
+ && ar.Requirement == Requirement.Include) == null;
+ var isExcluded = _assignmentRequirements
+ .Find(ar =>
+ ar.EventDefinition == e
+ && ar.Student == context.Student
+ && ar.Requirement == Requirement.Exclude) == null;
+
+
+
+ @e.ShortName
+ @AppIcons.EventAttributes(e)
+
+
+ @if (isIncluded)
+ {
+
+
+
+ }
+ else
+ {
+
+
+
+ }
+
+ @if (isExcluded)
+ {
+
+
+
+ }
+ else
+ {
+
+
+
+ }
+
+
}
- else
- {
- if (eventRank.HasValue)
- style += $"border-color:{color}; border-width:medium; color:{Colors.Gray.Lighten1};";
- }
-
- var isIncluded = _assignmentRequirements
- .Find(ar =>
- ar.EventDefinition == e
- && ar.Student == context.Student
- && ar.Requirement == Requirement.Include) == null;
- var isExcluded = _assignmentRequirements
- .Find(ar =>
- ar.EventDefinition == e
- && ar.Student == context.Student
- && ar.Requirement == Requirement.Exclude) == null;
-
-
-
- @e.ShortName
- @AppIcons.EventAttributes(e)
-
-
- @if (isIncluded)
- {
-
-
-
- }
- else
- {
-
-
-
- }
-
- @if (isExcluded)
- {
-
-
-
- }
- else
- {
-
-
-
- }
-
-
- }
+
diff --git a/WebApp/Components/Features/Teams/Components/TeamStudents.razor b/WebApp/Components/Features/Teams/Components/TeamStudents.razor
index 51c9f0f..70936d7 100644
--- a/WebApp/Components/Features/Teams/Components/TeamStudents.razor
+++ b/WebApp/Components/Features/Teams/Components/TeamStudents.razor
@@ -17,7 +17,7 @@
@if (eventRank.HasValue)
{
diff --git a/WebApp/Models/AppIcons.cs b/WebApp/Models/AppIcons.cs
index 1a1afe6..b889659 100644
--- a/WebApp/Models/AppIcons.cs
+++ b/WebApp/Models/AppIcons.cs
@@ -154,5 +154,20 @@ namespace WebApp.Models
};
return $"{number}{suffix}";
}
+
+ ///
+ /// Returns the standard chip variant for student chips (Outlined).
+ ///
+ public static Variant StudentChipVariant() => Variant.Outlined;
+
+ ///
+ /// Returns the standard chip variant for event chips (Filled).
+ ///
+ public static Variant EventChipVariant() => Variant.Filled;
+
+ ///
+ /// Returns the standard chip variant for team chips (Filled).
+ ///
+ public static Variant TeamChipVariant() => Variant.Filled;
}
}