Refactor: Remove cshtml duplication for back/url buttons in wizards

This commit is contained in:
nicolas.dorier
2025-02-07 16:13:44 +09:00
parent 4fbcd89bb6
commit c37584328b
17 changed files with 74 additions and 87 deletions

View File

@@ -12,6 +12,10 @@ namespace Microsoft.AspNetCore.Mvc
public static class UrlHelperExtensions
{
#nullable enable
public static string? WalletSend(this IUrlHelper helper, WalletId walletId) => helper.Action(nameof(UIWalletsController.WalletSend), new { walletId });
public static string? WalletTransactions(this IUrlHelper helper, string walletId) => WalletTransactions(helper, WalletId.Parse(walletId));
public static string? WalletTransactions(this IUrlHelper helper, WalletId walletId)
=> helper.Action(nameof(UIWalletsController.WalletTransactions), new { walletId });
public static Uri ActionAbsolute(this IUrlHelper helper, HttpRequest request, string? action, string? controller, object? values)
=> request.GetAbsoluteUriNoPathBase(new Uri(helper.Action(action, controller, values) ?? "", UriKind.Relative));
public static Uri ActionAbsolute(this IUrlHelper helper, HttpRequest request, string? action, string? controller)