Skip to main content

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.

info

Modals are not components. They must be used with the ModalService to be opened.

To a better understanding, check the Modals documentation.

bank-agreement-modal.component.ts
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

TypeDefault
string'Cancelar'

submitText

Submit button text

TypeDefault
stringAtualizar dados'

disabledTooltipText

Disabled tooltip text

TypeDefault
string'Preencha todos os campos obrigatórios (*) com valores diferentes dos atuais'

showAgreementTypeDropdown

Controls when agreement type dropdown should display

TypeDefault
booleantrue

accountsWhiteList

White list of accepted banks to be displayed in the checking accounts dropdown

TypeDefault
BANK[][]

Events

The BfmBankAgreementModalComponent modalRef has the following Events:

onTracking

Tracking event

Type
(track: string) => void