Skip to main content

Company Address Form

This section describes the BfmCompanyAddressFormComponent component.

Usage

You need to import it in your module and use it in your template.

company-address-form.component.ts
import { BfmCompanyAddressFormComponent } from '@celerofinancas/ui-user-kit';

@Component({
standalone: true,
selector: 'company-address-form',
imports: [BfmCompanyAddressFormComponent],
templateUrl: './company-address-form.component.html',
})
export class CompanyAddressFormComponent {}

Then, in your template, you can use the component like this:

company-address-form.component.html
<bfm-company-address-form 
[dynamicForm$]="dynamicForm$"
[formGroup]="formGroup"
[loading$]="loading$"
[taxRegimeOptions]="taxRegimeOptions"
(submitForm)="handleSubmitForm($event)"
/>

Inputs

The BfmCompanyAddressFormComponent component has the following inputs:

dynamicForm$

Dynamic form

TypeDefault
anyBehaviorSubject({})

formGroup

Form group

Type
UntypedFormGroup

Default value:

new UntypedFormGroup({
fantasy_name: new UntypedFormControl({ value: '', disabled: true }),
official_name: new UntypedFormControl({ value: '', disabled: true }),
masked_identity: new UntypedFormControl({ value: '', disabled: true }),
municipal_registration: new UntypedFormControl(''),
state_registration: new UntypedFormControl(''),
tax_regime: new UntypedFormControl(''),
service_code: new UntypedFormControl(''),
company_type_code: new UntypedFormControl(COMPANY_TYPE.unidentified),
legal_representative: new UntypedFormControl(null),
address: new UntypedFormGroup({
zipcode: new UntypedFormControl(''),
street: new UntypedFormControl(''),
number: new UntypedFormControl(''),
complement: new UntypedFormControl(''),
state: new UntypedFormControl(''),
city: new UntypedFormControl(''),
neighborhood: new UntypedFormControl(''),
}),
})

loading$

Loading state

TypeDefault
anyBehaviorSubject(false)

taxRegimeOptions

Tax regime options

TypeDefault
Array[]

Events

The BfmCompanyAddressFormComponent component has the following events:

submitForm

Submit form event

Type
EventEmitter