Skip to main content

Assignment Modal

This section describes the BfmServiceAssignmentModalComponent component.

Composition

The BfmServiceAssignmentModalComponent is composed of the following components:

Usage

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

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

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

/**
* Open the modal
*/
public openModal(): void {
this.modalService.open(BfmServiceAssignmentModalComponent, {
modalType: RECURRENCE_OPERATION.CREATE,
company: { pk: '1', fantasy_name: 'Company' },
charge: {
pk: '1',
description: 'Charge',
value: 100,
due_date: '2022-12-31',
status: 'PENDING',
company: { pk: '1', fantasy_name: 'Company' },
},
index: 0,
isCharges: true,
service: OfferedService,
serviceIndex: 0,
});
};
}

Inputs

The BfmServiceAssignmentModalComponent modalRef has the following inputs:

modalType

Type of recurrence operation.

TypeDefault
RECURRENCE_OPERATIONN/A

company

Company details.

TypeDefault
{ pk: string; fantasy_name: string; }N/A

charge

Charge details.

TypeDefault
Charge.List.ItemDetailsN/A

index

Index of the service.

TypeDefault
numberN/A

isCharges

Flag indicating if it is a charge.

TypeDefault
booleanN/A

service

Service details.

TypeDefault
OfferedServiceN/A

serviceIndex

Index of the service in the list.

TypeDefault
numberN/A

Events

The BfmServiceAssignmentModalComponent modalRef has no events.