Skip to content

Commit fbbfa7a

Browse files
committed
WEB-814 Make easier to upload client Identifiers
1 parent 0437580 commit fbbfa7a

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ export class UploadDocumentDialogComponent implements OnInit {
106106
}
107107

108108
/**
109-
* Sets file form control value and auto-fills fileName.
109+
* Sets file form control value.
110+
* and also sets the fileName
110111
* @param {any} $event file change event.
111112
*/
112-
onFileSelect($event: any) {
113-
if ($event.target.files.length > 0) {
114-
const file = $event.target.files[0];
115-
this.uploadDocumentForm.get('file').setValue(file);
116-
if (!this.uploadDocumentForm.get('fileName').value) {
117-
this.uploadDocumentForm.get('fileName').setValue(file.name);
118-
}
119-
}
113+
onFileSelect($event: any) {
114+
if ($event.target.files.length > 0) {
115+
const file = $event.target.files[0];
116+
this.uploadDocumentForm.get('fileName').setValue(file.name);
117+
this.uploadDocumentForm.get('file').setValue(file);
120118
}
121119
}
120+
}
121+

0 commit comments

Comments
 (0)