From 4a30cda96bb9752d1e982246e5d03394b233f81c Mon Sep 17 00:00:00 2001 From: Robert Wilson Date: Sat, 21 Dec 2024 13:59:05 -0800 Subject: [PATCH 01/36] Cleanup --- CaPPMS/Data/DBOperationsService.cs | 152 ++++++++---------- CaPPMS/Data/Student.cs | 25 ++- CaPPMS/Data/StudentScores.cs | 33 +++- CaPPMS/Data/Teams.cs | 39 ++++- .../Pages/StudentReviews/ManageStudents.razor | 93 +++++------ .../StudentReviews/ManageStudents.razor.cs | 32 +--- CaPPMS/Pages/StudentReviews/MyRatings.razor | 74 +++++---- .../{Admin.razor => StudentAdmin.razor} | 89 ++-------- .../{Admin.razor.cs => StudentAdmin.razor.cs} | 0 .../Pages/StudentReviews/StudentReview.razor | 44 ++--- CaPPMS/SQLScripts/StudentDataBaseCreation.sql | 12 +- CaPPMS/Shared/StudentManagementTable.razor | 133 +++++++++++++++ CaPPMS/Shared/UMGCHeader.razor | 27 +++- 13 files changed, 440 insertions(+), 313 deletions(-) rename CaPPMS/Pages/StudentReviews/{Admin.razor => StudentAdmin.razor} (71%) rename CaPPMS/Pages/StudentReviews/{Admin.razor.cs => StudentAdmin.razor.cs} (100%) create mode 100644 CaPPMS/Shared/StudentManagementTable.razor diff --git a/CaPPMS/Data/DBOperationsService.cs b/CaPPMS/Data/DBOperationsService.cs index 811accc..1457655 100644 --- a/CaPPMS/Data/DBOperationsService.cs +++ b/CaPPMS/Data/DBOperationsService.cs @@ -3,6 +3,7 @@ using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; +using System.Data; using System.IO; using System.Reflection; using System.Threading; @@ -61,21 +62,21 @@ public DBOperationsService(string dboperationsFilePath, ILogger logger) } /// - /// Get Students List + /// Get Students List. /// - /// Team ID - /// List of Students - public List RetrieveStudents(int teamId = -1) + /// Team ID. + /// List of Students. + public async Task> RetrieveStudentsAsync(int teamId = -1) { var students = new List(); - string query = "SELECT StudentId, FirstName, LastName, TeamId FROM Students"; + string query = "SELECT * FROM Students"; if (teamId > -1) { query += " WHERE TeamId = @teamId"; } SqliteParameter teamParam = new("@teamId", teamId); - ExecuteQueryAsync( + await ExecuteQueryAsync( query, (reader) => { @@ -88,18 +89,18 @@ public List RetrieveStudents(int teamId = -1) }, teamParam); - return students; + return students.AsReadOnly(); } /// /// Get Student scores. /// /// List of scores. - public List RetrieveStudentScores() + public async Task > RetrieveStudentScoresAsync() { - List studentScores = new(); - ExecuteQueryAsync(readStudentScore, (record) => studentScores.Add(ReadStudentRecord(record))); - return studentScores; + List studentScores = []; + await ExecuteQueryAsync(readStudentScore, (record) => studentScores.Add(StudentScores.GetStudentScores(record))); + return studentScores.AsReadOnly(); } /// @@ -107,32 +108,32 @@ public List RetrieveStudentScores() /// /// /// - public List RetrieveStudentScores(int studentId) + public async Task> RetrieveStudentScoresAsync(int studentId) { - List studentScores = new (); + List studentScores = []; SqliteParameter parameter = new("@studentId", studentId); - ExecuteQueryAsync(readStudentScore, (record) => studentScores.Add(ReadStudentRecord(record)), parameter); - return studentScores; + await ExecuteQueryAsync(readStudentScore, (record) => studentScores.Add(StudentScores.GetStudentScores(record)), parameter); + return studentScores.AsReadOnly(); } /// /// Get student score details. /// /// List of student scores. - public List RetrieveStudentScoreDetails() - { + public async Task> RetrieveStudentScoreDetails() + { List studentScores = new List(); - ExecuteQueryAsync(readStudentScoreDetails, (record) => studentScores.Add(ReadStudentRecord(record))); - return studentScores; + await ExecuteQueryAsync(readStudentScoreDetails, (record) => studentScores.Add(StudentScores.GetStudentScores(record))); + return studentScores.AsReadOnly(); } /// /// Get a team list. /// /// List of teams. - public List RetrieveTeamList() + public async Task> RetrieveTeamListAsync() { - List teamList = new List(); + List teamList = []; using (SqliteConnection connection = new(connectionString)) { @@ -140,20 +141,13 @@ public List RetrieveTeamList() { connection.Open(); - string query = "SELECT TeamId, TeamName FROM Teams"; + string query = "SELECT * FROM Teams"; using (SqliteCommand command = new(query, connection)) { - using (SqliteDataReader reader = command.ExecuteReader()) + using (IDataReader reader = await command.ExecuteReaderAsync()) { - while (reader.Read()) - { - teamList.Add(new Teams() - { - TeamId = Convert.ToInt32(reader["TeamId"]), - Name = reader["TeamName"].ToString() ?? string.Empty - }); - } + teamList.AddRange(Team.GetTeams(reader)); } } } @@ -167,7 +161,7 @@ public List RetrieveTeamList() } } - return teamList; + return teamList.AsReadOnly(); } /// @@ -185,7 +179,7 @@ public List RetrieveWeeks() int weeks = int.Parse(numWeeks); - List result = new List(); + List result = []; for (int i = 1; i <= weeks; i++) { result.Add(i.ToWords(WordForm.Normal).ApplyCase(LetterCasing.Sentence)); @@ -200,7 +194,7 @@ public List RetrieveWeeks() /// Student ID. /// Team ID /// True if successful. - public async Task UpdateTeamAssignmentAsync(int studentId, int teamId) + public async Task UpdateTeamAssignmentAsync(long studentId, long teamId) { string query = "UPDATE Students Set TeamId = @teamId WHERE StudentId = @studentId"; List parameters = @@ -217,16 +211,16 @@ public async Task UpdateTeamAssignmentAsync(int studentId, int teamId) /// /// /// - public async Task RetrieveUsersTeamAsync(string username) + public async Task RetrieveUsersTeamAsync(string username) { - int teamId = -1; + long teamId = -1; string query = "SELECT TeamId FROM Students WHERE Email = @email"; - SqliteParameter parameter = new ("@email", username); + SqliteParameter parameter = new("@email", username); await ExecuteQueryAsync( query, (reader) => { - teamId = reader["TeamId"] == DBNull.Value ? -1 : Convert.ToInt32(reader["TeamId"]); + teamId = reader[nameof(Team.TeamId)] == DBNull.Value ? -1 : Convert.ToInt64(reader[nameof(Team.TeamId)]); }, parameter); @@ -237,7 +231,7 @@ await ExecuteQueryAsync( /// Add Student to the database. /// /// Student to add. - public async Task AddStudent(Student student) + public async Task AddStudentAsync(Student student) { const string insertCommand = @" INSERT INTO Students (FirstName, LastName, Email, TeamId) @@ -276,7 +270,7 @@ public async Task EnsureDbExistsAsync() } } - FileInfo dbFileInfo = new FileInfo(this.databaseFilePath); + FileInfo dbFileInfo = new (this.databaseFilePath); dbFileInfo.Directory?.Create(); if (!dbFileInfo.Exists) @@ -294,7 +288,7 @@ public async Task EnsureDbExistsAsync() dbBroker = 0; } - private async Task ExecuteQueryAsync(string query, Action readerAction, params SqliteParameter[] sqliteParameters) + private async Task ExecuteQueryAsync(string query, Action readerAction, params SqliteParameter[] sqliteParameters) { using (SqliteConnection connection = new(connectionString)) { @@ -309,7 +303,7 @@ private async Task ExecuteQueryAsync(string query, Action read command.Parameters.Add(param); } - using (SqliteDataReader reader = await command.ExecuteReaderAsync()) + using (IDataReader reader = await command.ExecuteReaderAsync()) { while (reader.Read()) { @@ -329,50 +323,6 @@ private async Task ExecuteQueryAsync(string query, Action read } } - private async Task ExecuteNonQueryAsync(string query, params SqliteParameter[] parameters) - { - int result = -1; - try - { - using (SqliteConnection connection = new(connectionString)) - { - connection.Open(); - - using (SqliteCommand command = new(query, connection)) - { - foreach (SqliteParameter param in parameters) - { - command.Parameters.Add(param); - } - - result = await command.ExecuteNonQueryAsync(); - } - - connection.Close(); - } - } - catch(Exception ex) - { - Console.WriteLine($"Error accessing the database: {ex.Message}"); - } - - return result; - } - - private StudentScores ReadStudentRecord(SqliteDataReader reader) - { - return new StudentScores( - Convert.ToInt64(reader["StudentId"]), - reader["FirstName"].NullSafeToString(), - reader["LastName"].NullSafeToString()) - { - AverageScore = reader["AverageScore"] == DBNull.Value ? 0 : Convert.ToInt32(reader["AverageScore"]), - Week = reader["Week"].NullSafeToString(), - Score = reader["Score"] == DBNull.Value ? 0 : Convert.ToDouble(reader["Score"]), - Comment = reader["Comments"].NullSafeToString() - }; - } - private static string GetResourceData(string name) { string data = string.Empty; @@ -406,6 +356,36 @@ private static string GetResourceData(string name) return data; } + private async Task ExecuteNonQueryAsync(string query, params SqliteParameter[] parameters) + { + int result = -1; + try + { + using (SqliteConnection connection = new(connectionString)) + { + connection.Open(); + + using (SqliteCommand command = new(query, connection)) + { + foreach (SqliteParameter param in parameters) + { + command.Parameters.Add(param); + } + + result = await command.ExecuteNonQueryAsync(); + } + + connection.Close(); + } + } + catch (Exception ex) + { + Console.WriteLine($"Error accessing the database: {ex.Message}"); + } + + return result; + } + private async Task CreateDbAsync() { this.logger.LogDebug($"Creating database at {this.databaseFilePath}"); diff --git a/CaPPMS/Data/Student.cs b/CaPPMS/Data/Student.cs index b116eab..4a92884 100644 --- a/CaPPMS/Data/Student.cs +++ b/CaPPMS/Data/Student.cs @@ -1,11 +1,13 @@ +using System; using System.ComponentModel.DataAnnotations; +using System.Data; namespace CaPPMS.Data { public class Student { [Required] - public int StudentId { get; set; } = default(int); + public long StudentId { get; set; } = default(long); public string? FirstName { get; set; } @@ -13,6 +15,25 @@ public class Student public string? Email { get; set; } - public Teams AssignedTeam { get; set; } = new Teams(); + public Team AssignedTeam { get; set; } = new Team(); + + public static Student GetStudent(IDataReader dataReader) + { + if (dataReader.IsClosed) + { + throw new InvalidOperationException("DB is closed."); + } + + Student student = new Student() + { + StudentId = Convert.ToInt64(dataReader[nameof(StudentId)]), + FirstName = dataReader[nameof(FirstName)].NullSafeToString(), + LastName = dataReader[nameof(LastName)].NullSafeToString() + }; + + student.AssignedTeam.TeamId = Convert.ToInt32(dataReader[nameof(Team.TeamId)]); + + return student; + } } } \ No newline at end of file diff --git a/CaPPMS/Data/StudentScores.cs b/CaPPMS/Data/StudentScores.cs index b345e99..4aaaf87 100644 --- a/CaPPMS/Data/StudentScores.cs +++ b/CaPPMS/Data/StudentScores.cs @@ -1,4 +1,7 @@ -namespace CaPPMS.Data +using System; +using System.Data; + +namespace CaPPMS.Data { public class StudentScores { @@ -41,5 +44,33 @@ public StudentScores(long id, string firstName, string lastName) /// Week of class. /// public string Week { get; set; } = string.Empty; + + /// + /// Get from the . + /// + /// Active . + /// . + public static StudentScores GetStudentScores(IDataReader dataReader) + { + if (dataReader.IsClosed) + { + throw new InvalidOperationException("Data Reader is closed."); + } + + return new StudentScores( + Convert.ToInt64(dataReader[nameof(StudentId)]), + dataReader[nameof(FirstName)].NullSafeToString(), + dataReader[nameof(LastName)].NullSafeToString()) + { + AverageScore = dataReader[nameof(AverageScore)] == DBNull.Value + ? 0 + : Convert.ToInt32(dataReader[nameof(AverageScore)]), + Week = dataReader[nameof(Week)].NullSafeToString(), + Score = dataReader[nameof(Score)] == DBNull.Value + ? 0 + : Convert.ToDouble(dataReader[nameof(Score)]), + Comment = dataReader[nameof(Comment)].NullSafeToString() + }; + } } } \ No newline at end of file diff --git a/CaPPMS/Data/Teams.cs b/CaPPMS/Data/Teams.cs index 31b4df6..f13169b 100644 --- a/CaPPMS/Data/Teams.cs +++ b/CaPPMS/Data/Teams.cs @@ -1,9 +1,42 @@ -namespace CaPPMS.Data +using System; +using System.Collections.Generic; +using System.Data; + +namespace CaPPMS.Data { - public class Teams + public class Team { - public int TeamId { get; set; } + /// + /// Id of the team. + /// + public long TeamId { get; set; } + /// + /// Name of the team. + /// public string Name { get; set; } = string.Empty; + + /// + /// Class ID. + /// + public long ClassId { get; set; } + + public static IEnumerable GetTeams(IDataReader dataReader) + { + if (dataReader.IsClosed) + { + throw new InvalidOperationException("Data Reader is closed."); + } + + while (dataReader.Read()) + { + yield return new Team + { + TeamId = Convert.ToInt64(dataReader[nameof(TeamId)]), + Name = dataReader[nameof(Name)].ToString() ?? string.Empty, + ClassId = Convert.ToInt64(dataReader[nameof(ClassId)]) + }; + } + } } } \ No newline at end of file diff --git a/CaPPMS/Pages/StudentReviews/ManageStudents.razor b/CaPPMS/Pages/StudentReviews/ManageStudents.razor index f90724c..7f6d6d1 100644 --- a/CaPPMS/Pages/StudentReviews/ManageStudents.razor +++ b/CaPPMS/Pages/StudentReviews/ManageStudents.razor @@ -11,71 +11,71 @@
@@ -162,20 +162,15 @@
@code { - private List teams; + private IEnumerable teams; SelectedStudent selectedStudent; string teamId = string.Empty; string searchTeam = string.Empty; - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { - teams = RetrieveTeams(); - var students = DBOperationsService.RetrieveStudents(); - - foreach (var student in students) - { - Students.Add(student); - } + teams = await RetrieveTeamsAsync(); + Students.AddRange(await DBOperationsService.RetrieveStudentsAsync()); } public void EditStudent(Student student) @@ -185,7 +180,7 @@ StudentId = student.StudentId, FirstName = student.FirstName, LastName = student.LastName, - AssignedTeam = new Teams() { TeamId = student.AssignedTeam.TeamId, Name = student.AssignedTeam.Name } + AssignedTeam = new Team() { TeamId = student.AssignedTeam.TeamId, Name = student.AssignedTeam.Name } }; HidePanel = false; @@ -236,7 +231,7 @@ foreach (Student student in students) { - DBOperationsService.AddStudent(student); + await DBOperationsService.AddStudentAsync(student); } } catch (Exception ex) @@ -254,13 +249,13 @@ { public SelectedStudent() { - AssignedTeam = new Teams(); + AssignedTeam = new Team(); } - public int StudentId { get; set; } + public long StudentId { get; set; } public string? FirstName { get; set; } public string? LastName { get; set; } - public Teams? AssignedTeam { get; set; } + public Team? AssignedTeam { get; set; } } static List ParseData(string data) diff --git a/CaPPMS/Pages/StudentReviews/ManageStudents.razor.cs b/CaPPMS/Pages/StudentReviews/ManageStudents.razor.cs index 0332335..b440111 100644 --- a/CaPPMS/Pages/StudentReviews/ManageStudents.razor.cs +++ b/CaPPMS/Pages/StudentReviews/ManageStudents.razor.cs @@ -8,41 +8,17 @@ public partial class ManageStudents { public bool HidePanel { get; set; } = true; - private List value = new List(); - - public List Students - { - get - { - if (value != null && value.Count > 0) - { - var tempTeam = teams.Find(e => e.TeamId == value[0].AssignedTeam.TeamId); - - if (value.Count > 0 && tempTeam != null) - { - value[0].AssignedTeam.Name = tempTeam.Name; - } - } - else - { - value = new List(); - } - - return value; - } - - set { this.Students = value; } - } + public List Students { get; set; } = []; public ManageStudents() { - teams = new List(); + teams = new List(); selectedStudent = new SelectedStudent(); } - public List RetrieveTeams() + public async Task> RetrieveTeamsAsync() { - return DBOperationsService.RetrieveTeamList(); + return await DBOperationsService.RetrieveTeamListAsync(); } public async Task UpdateTeamAssignmentsAsync() diff --git a/CaPPMS/Pages/StudentReviews/MyRatings.razor b/CaPPMS/Pages/StudentReviews/MyRatings.razor index 3cf6d3f..0c0e6a6 100644 --- a/CaPPMS/Pages/StudentReviews/MyRatings.razor +++ b/CaPPMS/Pages/StudentReviews/MyRatings.razor @@ -5,77 +5,79 @@ @page "/StudentReviews/MyRatings" My Ratings - +@{ + // TODO: Remove style and use site.css +} @@ -122,10 +124,12 @@ @code { - private List? studentScores; + private List studentScores = []; - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { - studentScores = DBOperationsService.RetrieveStudentScores(18); + // TODO: Replace the hardcoded student ID with the actual student ID + studentScores.AddRange(await DBOperationsService.RetrieveStudentScoresAsync(18)); + await base.OnInitializedAsync(); } } \ No newline at end of file diff --git a/CaPPMS/Pages/StudentReviews/Admin.razor b/CaPPMS/Pages/StudentReviews/StudentAdmin.razor similarity index 71% rename from CaPPMS/Pages/StudentReviews/Admin.razor rename to CaPPMS/Pages/StudentReviews/StudentAdmin.razor index d367764..7731e01 100644 --- a/CaPPMS/Pages/StudentReviews/Admin.razor +++ b/CaPPMS/Pages/StudentReviews/StudentAdmin.razor @@ -1,85 +1,14 @@ -@using Microsoft.AspNetCore.Components.Forms -@using CaPPMS.Pages.StudentReviews +@using CaPPMS.Pages.StudentReviews +@using Microsoft.AspNetCore.Components.Forms +@using Microsoft.Identity.Web +@attribute [Authorize] @page "/StudentReviews/Admin" @inject DBOperationsService DBOperationsService +@inject MicrosoftIdentityConsentAndConditionalAccessHandler consentHandler Student Scores - - -
Student Scores
@@ -170,13 +99,13 @@ private long previousId = 0; private SelectedStudent selectedStudent = new SelectedStudent(); - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { - studentScores = DBOperationsService.RetrieveStudentScores(); - base.OnInitialized(); + studentScores.AddRange(await DBOperationsService.RetrieveStudentScoresAsync()); + await base.OnInitializedAsync(); } - public List studentScores; + public List studentScores = []; public bool HidePanel { get; set; } = true; public void EditStudent(StudentScores student) diff --git a/CaPPMS/Pages/StudentReviews/Admin.razor.cs b/CaPPMS/Pages/StudentReviews/StudentAdmin.razor.cs similarity index 100% rename from CaPPMS/Pages/StudentReviews/Admin.razor.cs rename to CaPPMS/Pages/StudentReviews/StudentAdmin.razor.cs diff --git a/CaPPMS/Pages/StudentReviews/StudentReview.razor b/CaPPMS/Pages/StudentReviews/StudentReview.razor index 8aa1d79..0e48201 100644 --- a/CaPPMS/Pages/StudentReviews/StudentReview.razor +++ b/CaPPMS/Pages/StudentReviews/StudentReview.razor @@ -12,43 +12,43 @@ @@ -108,7 +108,7 @@ Evaluated Team Member:* - @foreach (var student in DBOperationsService.RetrieveStudents()) + @foreach (var student in DBOperationsService.RetrieveStudentsAsync().GetAwaiter().GetResult()) { } diff --git a/CaPPMS/SQLScripts/StudentDataBaseCreation.sql b/CaPPMS/SQLScripts/StudentDataBaseCreation.sql index ef4587a..527558f 100644 --- a/CaPPMS/SQLScripts/StudentDataBaseCreation.sql +++ b/CaPPMS/SQLScripts/StudentDataBaseCreation.sql @@ -14,12 +14,22 @@ CREATE TABLE "Students" ( "LastName" TEXT NOT NULL, "Email" TEXT, "TeamId" INTEGER, + "ClassId" INTEGER PRIMARY KEY("StudentId" AUTOINCREMENT) ); CREATE TABLE "Teams" ( "TeamId" INTEGER NOT NULL, "TeamName" TEXT NOT NULL, - PRIMARY KEY("TeamId") + "ClassId" Text NOT NULL + PRIMARY KEY("TeamId" AUTOINCREMENT) + +CREATE TABLE "ClassInformation" ( + "ClassId" INTEGER NOT NULL, + "ClassName" TEXT NOT NULL, + "Course" TEXT NOT NULL, + "StartDate" Date, + "EndDate" Date + PRIMARY KEY("ClassId" AUTOINCREMENT) ); diff --git a/CaPPMS/Shared/StudentManagementTable.razor b/CaPPMS/Shared/StudentManagementTable.razor new file mode 100644 index 0000000..66ddc1a --- /dev/null +++ b/CaPPMS/Shared/StudentManagementTable.razor @@ -0,0 +1,133 @@ +@using CaPPMS.Data +@using CaPPMS.Model +@using CaPPMS.Model.Table +@namespace CaPPMS.Shared +@inherits CaPPMS.Model.Table.Table +@inject DBOperationsService dbOperations + +

Student List

+ +@if (this.HeaderRow.Count == 0) +{ +
Loading ...
+ return; +} + + + +@code { + + [CascadingParameter] + private Task? authenticationState { get; set; } + + [Parameter] + public string CssClass + { + get + { + return string.Join(" ", this.CssClass); + } + set + { + this.TableCssClasses.Clear(); + this.TableCssClasses.AddRange(value.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); + } + } + + private List TableCssClasses = new List(); + + protected override async Task OnInitializedAsync() + { + if (authenticationState == null) + { + return; + } + + var authState = await authenticationState; + InitializeCollapseMap(); + + this.DataSourceChanged += (o, e) => + { + this.ShouldProcessStateChange(); + InitializeCollapseMap(); + }; + + this.FilterChanged += (o, e) => + { + this.SetPageNumber(1); + this.ShouldProcessStateChange(); + InitializeCollapseMap(); + }; + + // ProjectManagerService.ProjectIdeasChanged += (o, e) => + // { + // var ideas = o as ICollection; + + // this.DataSource = ideas; + // }; + + await base.OnInitializedAsync(); + } + + public void CloseIdea(Idea idea) + { + // this.idea = null; + ShouldProcessStateChange(); + } + + private void PageRight(MouseEventArgs e) + { + this.SetPageNumber(this.CurrentPage + 1); + } + + private void ShowView(ProjectInformation idea) + { + // this.idea = idea; + } + + private void ShouldProcessStateChange() + { + this.InvokeAsync(() => + { + this.StateHasChanged(); + }); + } + + private void InitializeCollapseMap() + { + // Dictionary oldCollapseMap = new Dictionary(); + // foreach (ProjectInformation info in projectListCollapseMap.Keys) + // { + // oldCollapseMap.Add(info.ProjectID, projectListCollapseMap[info]); + // } + + // projectListCollapseMap.Clear(); + // foreach (Row row in this.GetRows()) + // { + // if (!projectListCollapseMap.ContainsKey(row.DataBoundItem as ProjectInformation)) + // { + // ProjectInformation newInfo = row.DataBoundItem as ProjectInformation; + // projectListCollapseMap.Add(newInfo, true); + // if (oldCollapseMap.ContainsKey(newInfo.ProjectID)) + // { + // projectListCollapseMap[newInfo] = oldCollapseMap[newInfo.ProjectID]; + // } + // } + // } + } + + private void SortByColumn(int column) + { + Console.Error.WriteLine(column + " clicked"); + if (SortColumnIndex == column) + { + IsColumnSortAscending = !IsColumnSortAscending; + } + else + { + IsColumnSortAscending = true; + SortColumnIndex = column; + } + InitializeCollapseMap(); + } +} diff --git a/CaPPMS/Shared/UMGCHeader.razor b/CaPPMS/Shared/UMGCHeader.razor index d992a25..2879cdf 100644 --- a/CaPPMS/Shared/UMGCHeader.razor +++ b/CaPPMS/Shared/UMGCHeader.razor @@ -1,4 +1,7 @@ -
+@using Extensions; +@using Microsoft.Identity.Web +@inject MicrosoftIdentityConsentAndConditionalAccessHandler consentHandler +