Skip to main content

Confirmation Modal

This section describes the BfmPaymentConfirmationComponent component.

Usage

You must import the BfmPaymentConfirmationComponent 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 better understand, check the Modals documentation.

payment-confirmation.component.ts
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.

TypeDefault
'Array'[]

balance

Balance amount to be authorized.

TypeDefault
'Number'0

title

Modal title.

TypeDefault
'String''Verificação de autorização'

authorizePaymentText

Text for the authorize payment button.

TypeDefault
'String''Reenviar código'

authorizePaymentSuccess

Success message for the authorize payment action.

TypeDefault
'String''Pagamento autorizado!'

authorizePaymentError

Error message for the authorize payment action.

TypeDefault
'String''Erro ao autorizar o pagamento'

sendSmsText

Text for the send SMS button.

TypeDefault
'String''Send SMS'

sendSmsSuccess

Success message for the send SMS action.

TypeDefault
'String''SMS enviado com sucesso!'

sendSmsError

Error message for the send SMS action.

TypeDefault
'String''Não foi possível enviar o SMS'

Events

The BfmPaymentConfirmationComponent modalRef has no events.