Upload
This section describes the BfmCostCenterUploadComponent component.
Usage
You can import the BfmCostCenterUploadComponent directly in your route configuration.
import { BfmCostCenterUploadComponent } from '@celerofinancas/ui-company-kit';
const routes = [
{
path: 'cost-center-upload',
component: BfmCostCenterUploadComponent,
},
];
But if you need more customization, you need to import it in your module and use it in your template.
cost-center-upload.component.ts
import { BfmCostCenterUploadComponent } from '@celerofinancas/ui-company-kit';
@Component({
standalone: true,
selector: 'cost-center-upload',
imports: [BfmCostCenterUploadComponent],
templateUrl: './cost-center-upload.component.html',
})
export class CostCenterUploadComponent {}
Then, in your template, you can use the component like this:
cost-center-upload.component.html
<bfm-cost-center-upload
[acceptFile]="'.csv'"
[downloadTemplateModel]="true"
(uploadResult)="handleUploadResult($event)"
/>
Inputs
The BfmCostCenterUploadComponent component has the following inputs:
acceptFile
File extension accepted by the component.
| Type | Default |
|---|---|
string | '.csv' |
downloadTemplateModel
Flag to enable the download of the template model.
| Type | Default |
|---|---|
boolean | true |
Events
The BfmCostCenterUploadComponent component has the following events:
uploadResult
Event emitted when the upload is completed.
| Type | Default |
|---|---|
EventEmitter | new EventEmitter() |