RED-9201 - UI for Component Mapping Tables
This commit is contained in:
parent
2b00876e6b
commit
9010677c6d
@ -63,9 +63,10 @@ export class AddEditComponentMappingDialogComponent
|
||||
async ngOnInit() {
|
||||
if (this.data.mapping?.fileName) {
|
||||
this.activeFile = { name: this.data.mapping.fileName } as File;
|
||||
const file = await firstValueFrom(
|
||||
const fileContent = await firstValueFrom(
|
||||
this._componentMappingService.getComponentMappingFile(this.data.dossierTemplateId, this.data.mapping.id),
|
||||
);
|
||||
const file = new Blob([fileContent.body as Blob], { type: 'text/csv' });
|
||||
this.form.get('file').setValue(file);
|
||||
this.initialFormValue = this.form.getRawValue();
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ export class ComponentMappingsService extends EntitiesService<IComponentMapping,
|
||||
file: Blob,
|
||||
): Observable<IComponentMapping> {
|
||||
const formParams = new FormData();
|
||||
formParams.append('file', file);
|
||||
formParams.append('file', file, `${componentMapping.name}.csv`);
|
||||
|
||||
const queryParams: List<QueryParam> = [
|
||||
{ key: 'name', value: componentMapping.name },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user