@page "/roles"
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using TaskTrackingSystem.Shared.Models.Menu
@using TaskTrackingSystem.Shared.Models.User
@rendermode @(new InteractiveServerRenderMode(prerender: false))
@attribute [Microsoft.AspNetCore.Authorization.Authorize]
@inject ApiClientService ApiClient
@inject IJSRuntime JS
@inject AuthenticationStateProvider AuthStateProvider
@inject MenuAuthorizationService MenuAuthorization
@AppLocalization.Text("role.rolesAccessDesc", "Manage roles, assign access and permissions, and control visibility.")
| @AppLocalization.Text("common.index", "No.") | @AppLocalization.Text("common.role", "Role") | @AppLocalization.Text("common.description", "Description") | @AppLocalization.Text("field.created", "Created") | @AppLocalization.Text("common.actions", "Actions") |
|---|---|---|---|---|
| @((currentPage - 1) * pageSize + entry.index + 1) |
@Content.GetRoleName(role)
|
@(Content.GetText(role.Description, role.DescriptionMy) is { Length: > 0 } description ? description : AppLocalization.Text("common.na", "N/A")) | @DisplayFormats.Date(role.CreatedAt) |
@if (canManageAccess)
{
}
@if (canEditRole)
{
}
@if (canDeleteRole)
{
}
|
@roleNameErrorMsg
} @if (!string.IsNullOrEmpty(roleError)) {@roleError
@AppLocalization.Text("role.createHint", "Choose what this role can see and do on the right. It will be saved with the role.")
}@AppLocalization.Text("role.noAccessItemsFound", "No access items found in database.")
} else {@AppLocalization.Text("role.nothingInsidePage", "Nothing else is available inside this page.")
}@AppLocalization.Text("role.noPagesMatchSearch", "No pages or permissions match your search.")
} }@AppLocalization.Text("role.accessConfigured", "Configure access and permissions")
@AppLocalization.Text("role.noAccessItemsFound", "No access items found in database.")
@AppLocalization.Text("role.nothingInsidePage", "Nothing else is available inside this page.")
}@AppLocalization.Text("role.noPagesMatchSearch", "No pages or permissions match your search.")
} }@accessSaveError
@accessSaveSuccess