Skip to main content

User Clearance

This section describes the BfmUserClearanceComponent component.

Usage​

You need to import it in your module and use it in your template.

user-clearance.component.ts
import { BfmUserClearanceComponent } from '@celerofinancas/ui-user-kit';

@Component({
standalone: true,
selector: 'user-clearance',
imports: [BfmUserClearanceComponent],
templateUrl: './user-clearance.component.html',
})
export class CustomUserClearanceComponent {}

Then, in your template, you can use the component like this:

user-clearance.component.html
<bfm-user-clearance />

Inputs​

The BfmUserClearanceComponent component has no inputs.

Events​

The BfmUserClearanceComponent component has no events.

Configuration​

To customize the BfmUserClearanceComponent, you can inject the USER_MANAGEMENT_CONFIGS token in your module.

This token is used to provide custom values to the component. If is not provided, the default values will be used.

Properties​

KeyDescription
isAvailableIndicates if the feature is available.

Example​

To customize the BfmUserClearanceComponent, you can inject the USER_MANAGEMENT_CONFIGS token in your module.

app.config.ts
import { ApplicationConfig } from '@angular/core';
import { USER_MANAGEMENT_CONFIGS } from '@celerofinancas/ui-user-kit';

export const appConfig: ApplicationConfig = {
providers: [
{
provide: USER_MANAGEMENT_CONFIGS,
useClass: UserManagementVisibility,
},
],
};
user-management-visibilty.service.ts
import { YourCustomService } from './your-custom-service';

export class UserManagementVisibility {
private readonly customService = inject(YourCustomService);

public isAvailable(value: LIBERATIONS): boolean {
return this.customService.activeLiberation.includes(value)
}
}