Skip to main content

Cost Center

This section describes the BfmCostCenterComponent component.

Usage

You can import the BfmCostCenterComponent directly in your route configuration.

import { BfmCostCenterComponent } from '@celerofinancas/ui-company-kit';

const routes = [
{
path: 'cost-center',
component: BfmCostCenterComponent,
},
];

But if you need more customization, you need to import it in your module and use it in your template.


import { BfmCostCenterComponent } from '@celerofinancas/ui-company-kit';

@Component({
standalone: true,
selector: 'cost-center',
imports: [BfmCostCenterComponent],
templateUrl: './cost-center.component.html',
})
export class CostCenterComponent {}

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


<bfm-cost-center-input
[class]="'custom-class'"
[costCenterName]="'Cost Center Name'"
[forceClear]="true"
[isDisabled]="false"
[styleOptions]="{}"
(costCenterInput)="handleCostCenterInput($event)"
(valueHasBeenSelected)="handleValueSelected($event)"
/>

Inputs

The BfmCostCenterComponent component has the following inputs:

class

Custom class.

TypeDefault
string''

costCenterName

Cost center name.

TypeDefault
string''

forceClear

Force clear.

TypeDefault
booleanfalse

isDisabled

Is disabled.

TypeDefault
booleanfalse

styleOptions

Style options.

TypeDefault

Events

The BfmCostCenterComponent component has the following events:

costCenterInput

Emits the cost center input.

valueHasBeenSelected

Emits the value selected.