redirect to correct dashboard after registration

This commit is contained in:
jojo aquino 2025-01-02 20:53:48 +00:00
parent fc98e4eb65
commit b1803fbd27
3 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,4 @@
@page
@model EnotaryoPH.Web.Pages.Notary.Dashboard.DashboardModel
@{
}

View File

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace EnotaryoPH.Web.Pages.Notary.Dashboard
{
public class DashboardModel : PageModel
{
public void OnGet()
{
}
}
}

View File

@ -74,7 +74,9 @@ namespace EnotaryoPH.Web.Pages
_notaryoDBContext.SaveChanges(); _notaryoDBContext.SaveChanges();
return RedirectToPage("/Principal/Dashboard"); return RoleType == "Principal"
? Redirect("/Principal/Dashboard/Dashboard")
: Redirect("/Notary/Dashboard/Dashboard");
} }
[BindProperty] [BindProperty]