Upload
This section describes the BfmUploadComponent component.
Composition
The BfmUploadComponent is composed of the following components:
- BfmFileUploadComponent - Component for uploading files.
- BfmCreateSuccessComponent - Component for displaying success message after file creation.
- BfmUploadCreationComponent - Component for managing the upload creation process.
Usage
You need to import it in your module and use it in your template.
bfm-upload.component.ts
import { BfmUploadComponent } from '@celerofinancas/ui-cash-flow';
@Component({
standalone: true,
selector: 'bfm-upload',
imports: [BfmUploadComponent],
templateUrl: './bfm-upload.component.html',
})
export class CustomBfmUploadComponent {}
Then, in your template, you can use the component like this:
bfm-upload.component.html
<bfm-upload
[inputName]="'inputValue'"
(eventName)="handleEvent($event)"
/>
Inputs
The BfmUploadComponent component has no inputs.
Events
The BfmUploadComponent component has no events.
Configuration
To customize the BfmUploadComponent, you can inject the FINANCIAL_RECORD_UPLOAD_CONFIGS token in your module.
This token is used to provide custom values to the component. If is not provided, the default values will be used.
Properties
| Key | Description |
|---|---|
csvExampleSrc | Path to the example CSV file for bulk uploads. |
Example
To customize the BfmUploadComponent, you can inject the FINANCIAL_RECORD_UPLOAD_CONFIGS token in your module.
app.config.ts
import { ApplicationConfig } from '@angular/core';
import { FINANCIAL_RECORD_UPLOAD_CONFIGS } from '@celerofinancas/ui-cash-flow';
export const appConfig: ApplicationConfig = {
providers: [
{
provide: FINANCIAL_RECORD_UPLOAD_CONFIGS,
useValue: {
csvExampleSrc: 'assets/files/your-file.csv',
},
},
],
};