Confirm Modal
This section describes the BfmConfirmModalComponent component.
Composition
The BfmConfirmModalComponent has no any composition components.
Usage
You must to import the BfmConfirmModalComponent 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.
confirm-modal.component.ts
import { BfmConfirmModalComponent } from '@celerofinancas/ui-cash-flow';
import { ModalService } from "@celerofinancas/ui-modals";
import { Component, inject } from '@angular/core';
@Component({
standalone: true,
selector: 'confirm-modal',
templateUrl: './confirm-modal.component.html',
})
export class ConfirmModalComponent {
/**
* Modal service for handling modals
*/
private modalService = inject(ModalService);
/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(BfmConfirmModalComponent, {
titleText: 'Confirm Action',
bodyText: 'Are you sure you want to proceed?',
agroupingPk: '12345',
action: 1,
cancelText: 'Cancel',
submitText: 'Submit',
});
};
}
Inputs
The BfmConfirmModalComponent modalRef has the following inputs:
titleText
Modal title
| Type |
|---|
string |
bodyText
Modal body text
| Type |
|---|
string |
agroupingPk
Grouping identifier.
| Type |
|---|
string |
action
Conciliation group action
| Type |
|---|
| CONCILIATION_GROUP_ACTION |
cancelText
Cancel button text
| Type | Default |
|---|---|
string | 'Cancelar' |
submitText
Submit button text
| Type | Default |
|---|---|
string | 'Confirmar' |
Events
The BfmConfirmModalComponent modalRef has the following Events:
conciliationGroupAction
Conciliation group action event
| Type |
|---|
(action: any) => void |