RED-9201 - UI for Component Mapping Tables
This commit is contained in:
parent
c5fd581a62
commit
456ca8cc46
@ -73,19 +73,20 @@ export class AddEditComponentMappingDialogComponent
|
||||
}
|
||||
}
|
||||
|
||||
fileChanged(file: Blob) {
|
||||
fileChanged(file: File) {
|
||||
this.form.get('file').setValue(file);
|
||||
this.form.get('fileName').setValue(file?.name);
|
||||
}
|
||||
|
||||
save() {
|
||||
const fileName = document.getElementById('file-name-label')?.textContent;
|
||||
this.dialogRef.close({ ...this.data.mapping, ...this.form.getRawValue(), fileName });
|
||||
this.dialogRef.close({ ...this.data.mapping, ...this.form.getRawValue() });
|
||||
}
|
||||
|
||||
#getForm(): UntypedFormGroup {
|
||||
return this._formBuilder.group({
|
||||
name: [this.data?.mapping?.name, Validators.required],
|
||||
file: [null, Validators.required],
|
||||
fileName: [this.data?.mapping?.fileName, Validators.required],
|
||||
encoding: this.encodingTypeOptions.find(e => e === this.data?.mapping?.encoding) ?? this.encodingTypeOptions[0],
|
||||
delimiter: [this.data?.mapping?.delimiter ?? ',', Validators.required],
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user