Create Financial Record
This section describes the BfmCreateFinancialRecordComponent component.
Composition
The BfmCreateFinancialRecordComponent is composed of the following components:
- BfmAmountsFooterComponent - Amounts footer from financial record.
- BfmRecordAmountsComponent - Amounts form from financial record.
- BfmCreateButtonComponent - Creation button.
- BfmDocumentsComponent - A list of documents in the financial record.
- CreateMainRecordInfoComponent - Main record information.
- BfmRecurrencyInfoComponent - Description of BfmRecurrencyInfoComponent.
Usage
You need to import it in your module and use it in your template.
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:
<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']
| Type | Default |
|---|---|
string[] | [] |
checkingAccounts
Checking accounts list
| Type | Default |
|---|---|
| CheckingAccount[] | undefined |
companyPk
Company identifier
| Type | Default |
|---|---|
string | undefined |
enableClassification
User Permissions - Classify Amounts Default value is true for staff users.
| Type | Default |
|---|---|
boolean | true |
hasCostCenter
Whether user has the cost center liberation
| Type | Default |
|---|---|
boolean | undefined |
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
| Key | Description |
|---|---|
blackList | Specifies 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.
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'],
},
},
],
};