Skip to main content

List Component

This section describes the BfmAmountListComponent component.

Composition​

The BfmAmountListComponent is composed of the following components:

Usage​

You can import the BfmAmountListComponent directly in your route configuration.

amount-list.component.html
import { BfmAmountListComponent } from "@celerofinancas/ui-cash-flow";

@Component({
standalone: true,
selector: 'bfm-amount-list',
imports: [BfmAmountListComponent],
templateUrl: './list.component.html',
})
export class CustomListComponent {}

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

amount-list.component.html
<bfm-amount-list
[addEntriesIndividuallyText]="'Adicionar lançamento individual'"
[amounts]="amountsList"
[disabled]="false"
[isEditFinancialRecords]="false"
[companyPk]="companyPkValue"
[financialRecordPk]="financialRecordPkValue"
[paidAt]="paidAtValue"
[hasCostCenter]="true"
[enableClassification]="true"
[hasInvoice]="false"
[enableSelection]="true"
[hiddenClassification]="false"
[selectAllText]="Selecionar todos"
(amountExpandedChanges)="handleAmountExpandedChanges($event)"
(formChanges)="handleFormChanges($event)"
(delete)="handleDelete($event)"
(newRecord)="handleNewRecord($event)"
(refreshData)="handleRefreshData($event)"
(editCompanyRelated)="handleEditCompanyRelated($event)"
(createCompanyRelated)="handleCreateCompanyRelated($event)"
(addAmount)="handleAddAmount($event)"
(appliedToAll)="handleappliedToAll($event)"
/>

Inputs​

The BfmAmountListComponent component has the following inputs:

addEntriesIndividuallyText​

Add entries individually text for the button.

TypeDefault
string'Adicionar lançamento individual'

amounts​

Amounts list.

TypeDefault
any[][]

companyPk​

Companies identifier.

TypeDefault
string''

disabled​

Controls form disabled.

TypeDefault
booleanfalse

enableClassification​

User Permissions Classify Amounts.

TypeDefault
booleantrue

enableSelection​

Whether amount selection is enabled.

TypeDefault
booleantrue

financialRecordPk​

Financial record PK.

TypeDefault
string''

hasCostCenter​

Whether user has the cost center liberation.

TypeDefault
booleanfalse

hasInvoice​

Whether the financial record has a platform-generated invoice attached.

TypeDefault
booleanfalse

hiddenClassification​

Whether financial record has to_check status hidden all classification values.

TypeDefault
booleanfalse

isEditFinancialRecords​

Controls form disabled.

TypeDefault
booleanfalse

paidAt​

Payment date to get the corresponding coa pk.

TypeDefault
string''

selectAllText​

Select all text for the input.

TypeDefault
string'Selecionar todos'

showUploadButtons​

Whether to show the upload buttons.

TypeDefault
booleantrue

Events​

The BfmAmountListComponent component has the following Events:

addAmount​

Emits when a new amount is added.

Type
EventEmitter

amountExpandedChanges​

Emits a value when isExpanded$ changes to track on mixpanel.

Type
EventEmitter

appliedToAll​

Emits when any "apply to all" button is clicked.

Type
EventEmitter

createCompanyRelated​

Create company related event emitter.

Type
EventEmitter

delete​

Emits delete event for an amount.

Type
EventEmitter

editCompanyRelated​

Edit company related event emitter.

Type
EventEmitter

formChanges​

Form changes emitter - Emits form changes.

Type
EventEmitter

newRecord​

Emits when a new financial record is created from some amounts.

Type
EventEmitter

refreshData​

Emits event requesting for new data.

Type
EventEmitter

Configuration​

TOKEN VISIBILITY_AMOUNT_LIST_TOKEN​

To customize the BfmAmountListComponent, you can inject the VISIBILITY_AMOUNT_LIST_TOKEN 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
multipleAmountsDeletionEnabledIndicates whether the feature to delete multiple amounts at once is enabled.
showCoaLastLevelDetermines if the last level of the Chart of Accounts (CoA) should be displayed.
blackListSpecifies a list of items that are restricted or excluded from certain operations.

Example​

To customize the BfmAmountListComponent, you can inject the VISIBILITY_AMOUNT_LIST_TOKEN token in your module.

app.config.ts
import { ApplicationConfig } from '@angular/core';
import { VISIBILITY_AMOUNT_LIST_TOKEN } from '@celerofinancas/ui-cash-flow';

export const appConfig: ApplicationConfig = {
providers: [
{
provide: VISIBILITY_AMOUNT_LIST_TOKEN,
useValue: {
multipleAmountsDeletionEnabled: false,
showCoaLastLevel: false,
blackList: [],
},
},
],
};

TOKEN FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_CONFIGS​

To customize the BfmAmountListComponent, you can inject the FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_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​

KeyDescriptionDefault
showSelectCheckboxWhether to show the select checkbox.true
showUploadButtonsWhether to show the upload buttons.true

The FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_CONFIGS default values are:

{
"showSelectCheckbox": true,
"showUploadButtons": true,
}

Example​

To customize the BfmAmountListComponent, you can inject the FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_CONFIGS token in your module.

app.config.ts
import { ApplicationConfig } from '@angular/core';
import { FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_CONFIGS } from '@celerofinancas/ui-cash-flow';

export const appConfig: ApplicationConfig = {
providers: [
{
provide: FINANCIAL_RECORD_AMOUNT_LIST_DEFAULT_CONFIGS,
useValue: {
showSelectCheckbox: false,
showUploadButtons: false,
},
},
],
};