Class OrganizationSettings
Blazor component providing organization branding management functionality for OrgAdmin users.
Inherited Members
Namespace: OEMS.UI.Components.Pages
Assembly: OEMS.UI.dll
Syntax
[Route("/organization-settings")]
public class OrganizationSettings : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
Remarks
This component allows OrgAdmin users to view and modify their organization's branding settings, including primary and secondary colors and organization logo. The component implements role-based access control to ensure only authorized users can access these settings.
The component features:
- Role-based authorization (OrgAdmin only)
- Real-time color picker with hex input validation
- Logo upload and preview functionality
- JSON-based branding settings management
- Consistent UI design with application standards
- Comprehensive error handling and user feedback
Access is restricted to users with OrgAdmin role through claims-based authorization. The component automatically detects the user's organization from their authentication claims and loads the corresponding branding settings.
Examples
Navigation to this component:
NavigationManager.NavigateTo("/organization-settings");
The component will automatically:
- Check user authorization (OrgAdmin role required)
- Load current organization branding settings
- Parse color settings from JSON format
- Display current logo if available
Methods
BuildRenderTree(RenderTreeBuilder)
Renders the component to the supplied RenderTreeBuilder.
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type | Name | Description |
---|---|---|
RenderTreeBuilder | __builder |
Overrides
OnInitializedAsync()
Initializes the component and loads organization data.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
This method is called when the component is first initialized. It performs the following operations:
- Checks user authorization (OrgAdmin role required)
- If authorized, loads organization branding data
- Parses JSON branding settings into color properties