Bank Agreement Modal
This section describes the BfmBankAgreementModalComponent component.
Composition
The BfmBankAgreementModalComponent has no any composition component.
Usage
You must to import the BfmBankAgreementModalComponent and provide it to ModalService to open the modal.
Modals are not components. They must be used with the ModalService to be opened.
To a better understanding, check the Modals documentation.
import { BfmBankAgreementModalComponent } from '@celerofinancas/ui-cash-flow';
import { ModalService } from "@celerofinancas/ui-modals";
import { Component, inject } from '@angular/core';
import { BANK } from '@celerofinancas/core-ts';
@Component({
standalone: true,
selector: 'bank-agreement-modal',
templateUrl: './bank-agreement-modal.component.html',
})
export class BankAgreementModalComponent {
/**
* Modal service for handling modals
*/
private modalService = inject(ModalService);
/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(BfmBankAgreementModalComponent, {
layout: layoutData,
keychain: keychainData,
company: { fantasy_name: 'Company Name' },
checkingAccounts: checkingAccountsData,
showAgreementTypeDropdown: false,
accountsWhiteList: [ BANK.if], // Will show only the IF bank in the dropdown
cancelText: 'Cancel',
submitText: 'Submit',
disabledTooltipText: 'Disabled',
});
};
}
Inputs
The BfmBankAgreementModalComponent modalRef has the following inputs:
layout
Configurations related to the layout of the modal
| Type |
|---|
| LayoutData |
keychain
Current keychain data
| Type |
|---|
| Keychain |
company
Active company data
| Type |
|---|
{ fantasy_name: string } |
checkingAccounts
Checking accounts data
| Type |
|---|
| CheckingAccount[] |
cancelText
Cancel button text
| Type | Default |
|---|---|
| string | 'Cancelar' |
submitText
Submit button text
| Type | Default |
|---|---|
| string | Atualizar dados' |
disabledTooltipText
Disabled tooltip text
| Type | Default |
|---|---|
| string | 'Preencha todos os campos obrigatórios (*) com valores diferentes dos atuais' |
showAgreementTypeDropdown
Controls when agreement type dropdown should display
| Type | Default |
|---|---|
| boolean | true |
accountsWhiteList
White list of accepted banks to be displayed in the checking accounts dropdown
| Type | Default |
|---|---|
BANK[] | [] |
Events
The BfmBankAgreementModalComponent modalRef has the following Events:
onTracking
Tracking event
| Type |
|---|
(track: string) => void |