Search Results for

    Show / Hide Table of Contents

    Class OrganizationSettings

    Blazor component providing organization branding management functionality for OrgAdmin users.

    Inheritance
    object
    ComponentBase
    OrganizationSettings
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    Inherited Members
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.SetParametersAsync(ParameterView)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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:

    1. Check user authorization (OrgAdmin role required)
    2. Load current organization branding settings
    3. Parse color settings from JSON format
    4. 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
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    OnInitializedAsync()

    Initializes the component and loads organization data.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task
    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

    This method is called when the component is first initialized. It performs the following operations:

    1. Checks user authorization (OrgAdmin role required)
    2. If authorized, loads organization branding data
    3. Parses JSON branding settings into color properties
    If the user is not authorized, only the authorization check is performed and the component will display an access denied message.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    In this article
    Back to top Generated by DocFX