Skip to main content

Create Financial Record

This section describes the BfmCreateFinancialRecordComponent component.

Composition​

The BfmCreateFinancialRecordComponent is composed of the following components:

Usage​

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

create-financial-record.component.ts
import { BfmCreateFinancialRecordComponent } from '@celerofinancas/ui-cash-flow';

@Component({
standalone: true,
selector: 'create-financial-record',
imports: [BfmCreateFinancialRecordComponent],
templateUrl: './create-financial-record.component.html',
})
export class CreateFinancialRecordComponent {}

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

create-financial-record.component.html
<bfm-create-financial-record
[checkingAccountBlackList]="[]"
[checkingAccounts]="checkingAccounts"
[companyPk]="'companyPk'"
[enableClassification]="true"
[hasCostCenter]="true"
(companyRelatedCreation)="handleCompanyRelatedCreation($event)"
(financialRecordCreated)="handleFinancialRecordCreated($event)"
/>

Inputs​

The BfmCreateFinancialRecordComponent component has the following inputs:

checkingAccountBlackList​

A list of ids containing the checking accounts that should not be displayed. E.g. ['383', '384']

TypeDefault
string[][]

checkingAccounts​

Checking accounts list

TypeDefault
CheckingAccount[]undefined

companyPk​

Company identifier

TypeDefault
stringundefined

enableClassification​

User Permissions - Classify Amounts Default value is true for staff users.

TypeDefault
booleantrue

hasCostCenter​

Whether user has the cost center liberation

TypeDefault
booleanundefined

Events​

The BfmCreateFinancialRecordComponent component has the following Events:

companyRelatedCreation​

Emits when company related creation is clicked

Type
EventEmitter

financialRecordCreated​

Emits when the financial record has been created

Type
EventEmitter

Configuration​

To customize the BfmCreateFinancialRecordComponent, you can inject the FINANCIAL_RECORD_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
blackListSpecifies a list of items that are restricted or excluded from certain operations.

Example​

To customize the BfmCreateFinancialRecordComponent, you can inject the FINANCIAL_RECORD_CONFIGS token in your module.

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

export const appConfig: ApplicationConfig = {
providers: [
{
provide: FINANCIAL_RECORD_CONFIGS,
useValue: {
blackList: ['paymentDate'],
},
},
],
};