Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcaprice committed Mar 13, 2024
1 parent f04ac14 commit 8d87106
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h4 class="modal-title" i18n="@@gatewayApp.assertionServiceAssertion.import.titl
</div>
<app-error-alert></app-error-alert>
<div class="alerts top right" role="alert" *ngIf="uploaded && !success">
<ngb-alert class="alert alert-danger alert-dismissible" role="alert" ng-reflect-type="danger">
<ngb-alert class="alert alert-danger alert-dismissible" role="alert" [dismissible]="false" ng-reflect-type="danger">
<p i18n="@@gatewayApp.assertionServiceAssertion.import.failure.string">There was a problem uploading your CSV for processing.</p>
</ngb-alert>
</div>
Expand Down
10 changes: 4 additions & 6 deletions ui/src/app/affiliation/affiliation-import-dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ export class AffiliationImportDialogComponent {
if (this.currentFile) {
this.loading = true
const f = this.currentFile.item(0)
this.uploadService.uploadFile(this.resourceUrl, f!, 'json').subscribe((event: any) => {
if (event instanceof HttpResponse) {
this.success = event.body
this.uploaded = true
this.loading = false
}
this.uploadService.uploadFile(this.resourceUrl, f!, 'json').subscribe((event: string) => {
this.success = true
this.uploaded = true
this.loading = false
})
} else {
alert($localize`:@@gatewayApp.msUserServiceMSUser.import.emptyFile.string:`)
Expand Down
1 change: 0 additions & 1 deletion ui/src/app/shared/service/file-upload.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export class FileUploadService {
file: File,
expectedResponseType: 'arraybuffer' | 'blob' | 'json' | 'text' | undefined
): Observable<string> {
console.log('uploading file')
const formdata: FormData = new FormData()
formdata.append('file', file)
const req = new HttpRequest('POST', resourceUrl, formdata, {
Expand Down

0 comments on commit 8d87106

Please sign in to comment.