Skip to main content

Charge Cancel Modal

This section describes the BfmChargeCancelModalComponent component.

Usage​

You must to import the BfmChargeCancelModalComponent 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.

cancel-modal.component.ts
import { BfmChargeCancelModalComponent } from '@celerofinancas/ui-charges';
import { ModalService } from "@celerofinancas/ui-modals";
import { Component, inject } from '@angular/core';

@Component({
standalone: true,
selector: 'cancel-modal',
templateUrl: './cancel-modal.component.html',
})
export class CancelModalComponent {
/**
* Modal service for handling modals
*/
private modalService = inject(ModalService);

/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(BfmChargeCancelModalComponent, {
documentType: CHARGE_DOCUMENT_TYPE,
charge: ItemOrDetails,
readonly: false,
});
};
}

Inputs​

The BfmChargeCancelModalComponent modalRef has the following inputs:

documentType​

Document type

Type
DOCUMENT_TYPES.bill, or DOCUMENT_TYPES.invoice, or DOCUMENT_TYPES.creditCardBilling

charge​

Charge details

Type
ItemOrDetails

readonly​

Readonly mode

TypeDefault
booleanfalse

Events​

The BfmChargeCancelModalComponent modalRef has no events.