Replies: 1 comment
-
|
@rameshb66 this is not really an Oqtane question but a Blazor question. The error is related to the form within your module component not being declared correctly. Do you even need a form, as it appears that you are simply using the module component to redirect based on existing state? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Each role has its own dedicated dashboard. I created a page named DeptPage using Page Management and assigned it to the Department role. When a user with the Department role logs in, they are automatically redirected to the DeptPage. I tried didn't work.
elements have a @formname attribute with any unique value, or pass a FormName parameter if using .Error Message: The POST request does not specify which form is being submitted. To fix this, ensure
Here is code snippet:
if (roles.Any(r => r.Name == "Administrators"))
{
NavigationManager.NavigateTo("/admin-dashboard");
}
else if (roles.Any(r => r.Name == "department"))
{
NavigationManager.NavigateTo("/department-dashboard");
}
else if (roles.Any(r => r.Name == "End User"))
{
NavigationManager.NavigateTo("/home");
}
Beta Was this translation helpful? Give feedback.
All reactions