Update event and team edit links to include return URL for better navigation
This commit modifies the edit links in the Events and Teams components to append a return URL parameter. This change allows users to be redirected back to the appropriate page after editing an event or team, enhancing the user experience and navigation flow. The affected files include Details.razor, Index.razor, and Registration.razor.
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Print"
|
||||
OnClick="PrintPage"
|
||||
Variant="Variant.Outlined">Print</MudButton>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Edit" Href="@($"/events/edit?id={eventdefinition.Id}")" Variant="Variant.Outlined">Edit</MudButton>
|
||||
<MudButton StartIcon="@Icons.Material.Filled.Edit" Href="@($"/events/edit?id={eventdefinition.Id}&returnUrl={ReturnUrl ?? "/events"}")" Variant="Variant.Outlined">Edit</MudButton>
|
||||
</div>
|
||||
</ActionButtons>
|
||||
</PageHeader>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<PropertyColumn Property="@(e => e.Name)" Title="Event Name" Sortable="true">
|
||||
<CellTemplate>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Spacing="1">
|
||||
<MudLink Href="@($"/events/details?id={context.Item.Id}")"
|
||||
<MudLink Href="@($"/events/details?id={context.Item.Id}&returnUrl=/events")"
|
||||
Underline="Underline.Hover"
|
||||
Color="Color.Primary">
|
||||
@context.Item.Name
|
||||
@@ -39,7 +39,7 @@
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Filled.Edit"
|
||||
TooltipText="Edit"
|
||||
Href="@($"/events/edit?id={context.Item.Id}")" />
|
||||
Href="@($"/events/edit?id={context.Item.Id}&returnUrl=/events")" />
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
|
||||
TooltipText="Delete"
|
||||
HoverColor="Color.Error"
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<MudTooltip Text="@teamMembers">
|
||||
<MudChip Size="Size.Small"
|
||||
Color="Color.Default"
|
||||
Href="@($"/teams/edit?id={team.Id}")"
|
||||
Href="@($"/teams/edit?id={team.Id}&returnUrl=/students/teams")"
|
||||
Style="cursor: pointer;">
|
||||
@team
|
||||
@if (isCaptain && team.Event.EventFormat != EventFormat.Individual)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<TemplateColumn Title="Event" Sortable="true" SortBy="@(t => t.Event.Name)">
|
||||
<CellTemplate>
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Spacing="1">
|
||||
<MudLink Href="@($"/teams/details?id={context.Item.Id}")"
|
||||
<MudLink Href="@($"/teams/details?id={context.Item.Id}&returnUrl=/teams")"
|
||||
Underline="Underline.Hover"
|
||||
Color="Color.Primary">
|
||||
@context.Item.ToString()
|
||||
@@ -45,7 +45,7 @@
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Filled.Edit"
|
||||
TooltipText="Edit"
|
||||
Href="@($"/teams/edit?id={context.Item.Id}")" />
|
||||
Href="@($"/teams/edit?id={context.Item.Id}&returnUrl=/teams")" />
|
||||
<IconButtonWithTooltip Icon="@Icons.Material.Outlined.Delete"
|
||||
TooltipText="Delete"
|
||||
HoverColor="Color.Error"
|
||||
|
||||
Reference in New Issue
Block a user