RED-4773: Added confirmation as a toast as soon as a CSV file is imported into a dossier.

This commit is contained in:
Nicoleta Panaghiu 2022-07-28 11:23:49 +03:00
parent e112c320ce
commit 0ca7cb652f
3 changed files with 14 additions and 4 deletions

View File

@ -6,11 +6,12 @@ import { ConfigService } from '@services/config.service';
import { TranslateService } from '@ngx-translate/core';
import { IFileUploadResult, OverwriteFileOption, OverwriteFileOptions } from '@red/domain';
import { isAcceptedFileType, isCsv, isZip } from '@utils/file-drop-utils';
import { ErrorMessageService, GenericService, HeadersConfiguration, RequiredParam, Validate } from '@iqser/common-ui';
import { ErrorMessageService, GenericService, HeadersConfiguration, RequiredParam, Toaster, Validate } from '@iqser/common-ui';
import { FilesMapService } from '@services/files/files-map.service';
import { switchMap, tap, throttleTime } from 'rxjs/operators';
import { FilesService } from '@services/files/files.service';
import { UploadDownloadDialogService } from './upload-download-dialog.service';
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
export interface ActiveUpload {
subscription: Subscription;
@ -38,6 +39,7 @@ export class FileUploadService extends GenericService<IFileUploadResult> impleme
private readonly _configService: ConfigService,
private readonly _dialogService: UploadDownloadDialogService,
private readonly _errorMessageService: ErrorMessageService,
private readonly _toaster: Toaster,
) {
super();
const fileFetch$ = this.#fetchFiles$.pipe(
@ -235,6 +237,9 @@ export class FileUploadService extends GenericService<IFileUploadResult> impleme
}
this._removeUpload(uploadFile);
}
if (isCsv(uploadFile)) {
this._toaster.success(_('file-upload.type.csv'));
}
},
error: (err: HttpErrorResponse) => {
uploadFile.completed = true;

View File

@ -1,7 +1,7 @@
{
"ADMIN_CONTACT_NAME": null,
"ADMIN_CONTACT_URL": null,
"API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1",
"API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1",
"APP_NAME": "RedactManager",
"AUTO_READ_TIME": 3,
"BACKEND_APP_VERSION": "4.4.40",
@ -11,7 +11,7 @@
"MAX_RETRIES_ON_SERVER_ERROR": 3,
"OAUTH_CLIENT_ID": "redaction",
"OAUTH_IDP_HINT": null,
"OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction",
"OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction",
"RECENT_PERIOD_IN_HOURS": 24,
"SELECTION_MODE": "structural",
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"

View File

@ -2132,5 +2132,10 @@
"select": "Select"
}
},
"yesterday": "Yesterday"
"yesterday": "Yesterday",
"file-upload": {
"type": {
"csv": "File attributes were imported successfully from uploaded CSV file."
}
}
}