RED-4773: Added confirmation as a toast as soon as a CSV file is imported into a dossier.
This commit is contained in:
parent
e112c320ce
commit
0ca7cb652f
@ -6,11 +6,12 @@ import { ConfigService } from '@services/config.service';
|
|||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { IFileUploadResult, OverwriteFileOption, OverwriteFileOptions } from '@red/domain';
|
import { IFileUploadResult, OverwriteFileOption, OverwriteFileOptions } from '@red/domain';
|
||||||
import { isAcceptedFileType, isCsv, isZip } from '@utils/file-drop-utils';
|
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 { FilesMapService } from '@services/files/files-map.service';
|
||||||
import { switchMap, tap, throttleTime } from 'rxjs/operators';
|
import { switchMap, tap, throttleTime } from 'rxjs/operators';
|
||||||
import { FilesService } from '@services/files/files.service';
|
import { FilesService } from '@services/files/files.service';
|
||||||
import { UploadDownloadDialogService } from './upload-download-dialog.service';
|
import { UploadDownloadDialogService } from './upload-download-dialog.service';
|
||||||
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
|
|
||||||
export interface ActiveUpload {
|
export interface ActiveUpload {
|
||||||
subscription: Subscription;
|
subscription: Subscription;
|
||||||
@ -38,6 +39,7 @@ export class FileUploadService extends GenericService<IFileUploadResult> impleme
|
|||||||
private readonly _configService: ConfigService,
|
private readonly _configService: ConfigService,
|
||||||
private readonly _dialogService: UploadDownloadDialogService,
|
private readonly _dialogService: UploadDownloadDialogService,
|
||||||
private readonly _errorMessageService: ErrorMessageService,
|
private readonly _errorMessageService: ErrorMessageService,
|
||||||
|
private readonly _toaster: Toaster,
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
const fileFetch$ = this.#fetchFiles$.pipe(
|
const fileFetch$ = this.#fetchFiles$.pipe(
|
||||||
@ -235,6 +237,9 @@ export class FileUploadService extends GenericService<IFileUploadResult> impleme
|
|||||||
}
|
}
|
||||||
this._removeUpload(uploadFile);
|
this._removeUpload(uploadFile);
|
||||||
}
|
}
|
||||||
|
if (isCsv(uploadFile)) {
|
||||||
|
this._toaster.success(_('file-upload.type.csv'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: (err: HttpErrorResponse) => {
|
error: (err: HttpErrorResponse) => {
|
||||||
uploadFile.completed = true;
|
uploadFile.completed = true;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ADMIN_CONTACT_NAME": null,
|
"ADMIN_CONTACT_NAME": null,
|
||||||
"ADMIN_CONTACT_URL": 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",
|
"APP_NAME": "RedactManager",
|
||||||
"AUTO_READ_TIME": 3,
|
"AUTO_READ_TIME": 3,
|
||||||
"BACKEND_APP_VERSION": "4.4.40",
|
"BACKEND_APP_VERSION": "4.4.40",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||||
"OAUTH_CLIENT_ID": "redaction",
|
"OAUTH_CLIENT_ID": "redaction",
|
||||||
"OAUTH_IDP_HINT": null,
|
"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,
|
"RECENT_PERIOD_IN_HOURS": 24,
|
||||||
"SELECTION_MODE": "structural",
|
"SELECTION_MODE": "structural",
|
||||||
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"
|
"MANUAL_BASE_URL": "https://docs.redactmanager.com/preview"
|
||||||
|
|||||||
@ -2132,5 +2132,10 @@
|
|||||||
"select": "Select"
|
"select": "Select"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yesterday": "Yesterday"
|
"yesterday": "Yesterday",
|
||||||
|
"file-upload": {
|
||||||
|
"type": {
|
||||||
|
"csv": "File attributes were imported successfully from uploaded CSV file."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user