Confirmation Modal
This section describes the BfmPaymentConfirmationComponent component.
Usage
You must import the BfmPaymentConfirmationComponent and provide it to ModalService to open the modal.
Modals are not components. They must be used with the ModalService to be opened.
To better understand, check the Modals documentation.
import { BfmPaymentConfirmationComponent } from '@celerofinancas/ui-charges';
import { ModalService } from "@celerofinancas/ui-modals";
import { Component, inject } from '@angular/core';
@Component({
standalone: true,
selector: 'payment-confirmation',
templateUrl: './payment-confirmation.component.html',
providers: [provideNgxMask()],
})
export class PaymentConfirmationComponent {
/**
* Modal service for handling modals
*/
private modalService = inject(ModalService);
/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(BfmPaymentConfirmationComponent, {
selectedFinancialRecords: [],
balance: 0,
title: 'Payment Confirmation',
authorizePaymentText: 'Authorize Payment',
authorizePaymentSuccess: 'Payment authorized successfully',
authorizePaymentError: 'Error authorizing payment',
sendSmsText: 'Send SMS',
sendSmsSuccess: 'SMS sent successfully',
sendSmsError: 'Error sending SMS',
});
};
}
Inputs
The BfmPaymentConfirmationComponent modalRef has the following inputs
selectedFinancialRecords
Selected financial records to be authorized.
| Type | Default |
|---|---|
| 'Array' | [] |
balance
Balance amount to be authorized.
| Type | Default |
|---|---|
| 'Number' | 0 |
title
Modal title.
| Type | Default |
|---|---|
| 'String' | 'Verificação de autorização' |
authorizePaymentText
Text for the authorize payment button.
| Type | Default |
|---|---|
| 'String' | 'Reenviar código' |
authorizePaymentSuccess
Success message for the authorize payment action.
| Type | Default |
|---|---|
| 'String' | 'Pagamento autorizado!' |
authorizePaymentError
Error message for the authorize payment action.
| Type | Default |
|---|---|
| 'String' | 'Erro ao autorizar o pagamento' |
sendSmsText
Text for the send SMS button.
| Type | Default |
|---|---|
| 'String' | 'Send SMS' |
sendSmsSuccess
Success message for the send SMS action.
| Type | Default |
|---|---|
| 'String' | 'SMS enviado com sucesso!' |
sendSmsError
Error message for the send SMS action.
| Type | Default |
|---|---|
| 'String' | 'Não foi possível enviar o SMS' |
Events
The BfmPaymentConfirmationComponent modalRef has no events.