Add Team Meeting History functionality with dialog and badge components
This commit introduces a new feature to display meeting history for teams. It adds a `TeamMeetingHistoryDialog` component that shows the meeting history in a dialog format, including a loading state and error handling. Additionally, a `TeamMeetingHistoryBadge` component is created to display the count of meetings for each team, enhancing the user interface with tooltips for better interaction. The `Details` and `Index` components are updated to integrate these new features, allowing users to view meeting history directly from the team details and index pages. These changes improve the overall functionality and user experience in managing team meetings.
This commit is contained in:
@@ -3,9 +3,11 @@
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using WebApp.Components.Shared.Components
|
||||
@using WebApp.Components.Features.Teams.Components
|
||||
@using MudBlazor
|
||||
@inject AppDbContext Context
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IJSRuntime JSRuntime
|
||||
@inject IDialogService DialogService
|
||||
|
||||
@if (Team is null)
|
||||
{
|
||||
@@ -29,6 +31,11 @@
|
||||
Href="@($"/teams/edit?id={Team.Id}&returnUrl={ReturnUrl ?? "/teams"}")"
|
||||
Variant="Variant.Outlined">Edit</MudButton>
|
||||
</MudTooltip>
|
||||
<MudTooltip Text="View Meeting History">
|
||||
<MudButton StartIcon="@Icons.Material.Filled.History"
|
||||
OnClick="ShowMeetingHistory"
|
||||
Variant="Variant.Outlined">Meeting History</MudButton>
|
||||
</MudTooltip>
|
||||
</div>
|
||||
</ActionButtons>
|
||||
</PageHeader>
|
||||
@@ -86,4 +93,26 @@
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("window.print");
|
||||
}
|
||||
|
||||
private async Task ShowMeetingHistory()
|
||||
{
|
||||
if (Team == null) return;
|
||||
|
||||
var teamName = Team.ToString();
|
||||
var parameters = new DialogParameters
|
||||
{
|
||||
["TeamId"] = Team.Id,
|
||||
["TeamName"] = teamName
|
||||
};
|
||||
|
||||
var options = new DialogOptions
|
||||
{
|
||||
CloseOnEscapeKey = true,
|
||||
CloseButton = true,
|
||||
MaxWidth = MaxWidth.Medium,
|
||||
FullWidth = true
|
||||
};
|
||||
|
||||
await DialogService.ShowAsync<TeamMeetingHistoryDialog>($"{teamName} Meeting History", parameters, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user