remove redundant code
This commit is contained in:
parent
f68d342ee4
commit
f4601c066c
@ -28,21 +28,16 @@ export class RedactionLogEntry implements IRedactionLogEntry {
|
||||
readonly textBefore?: string;
|
||||
readonly type?: string;
|
||||
readonly value?: string;
|
||||
readonly changeLogType?: 'ADDED' | 'REMOVED' | 'CHANGED';
|
||||
readonly isChangeLogEntry?: boolean;
|
||||
readonly hidden?: boolean;
|
||||
readonly legalBasisList: ILegalBasis[];
|
||||
readonly hintDictionary: boolean;
|
||||
|
||||
reason?: string;
|
||||
|
||||
constructor(
|
||||
redactionLogEntry: IRedactionLogEntry,
|
||||
changeLogType: 'ADDED' | 'REMOVED' | 'CHANGED',
|
||||
isChangeLogEntry: boolean,
|
||||
hidden: boolean,
|
||||
hintDictionary: boolean,
|
||||
legalBasisList: ILegalBasis[],
|
||||
readonly changeLogType: 'ADDED' | 'REMOVED' | 'CHANGED',
|
||||
readonly isChangeLogEntry: boolean,
|
||||
readonly hidden: boolean,
|
||||
readonly hintDictionary: boolean,
|
||||
readonly legalBasisList: ILegalBasis[],
|
||||
) {
|
||||
this.changes = redactionLogEntry.changes;
|
||||
this.manualChanges = redactionLogEntry.manualChanges;
|
||||
@ -72,10 +67,5 @@ export class RedactionLogEntry implements IRedactionLogEntry {
|
||||
this.textBefore = redactionLogEntry.textBefore;
|
||||
this.type = redactionLogEntry.type;
|
||||
this.value = redactionLogEntry.value;
|
||||
this.changeLogType = changeLogType;
|
||||
this.isChangeLogEntry = isChangeLogEntry;
|
||||
this.hidden = hidden;
|
||||
this.hintDictionary = hintDictionary;
|
||||
this.legalBasisList = legalBasisList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,7 +421,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
|
||||
async downloadOriginalFile(file: File) {
|
||||
const data = await this._fileManagementService
|
||||
.downloadOriginalFile(this.dossierId, this.fileId, 'response', true, file.cacheIdentifier)
|
||||
.downloadOriginalFile(this.dossierId, this.fileId, 'response', file.cacheIdentifier)
|
||||
.toPromise();
|
||||
download(data, file.filename);
|
||||
}
|
||||
|
||||
@ -74,6 +74,6 @@ export class FilePreviewStateService {
|
||||
}
|
||||
|
||||
#downloadOriginalFile(cacheIdentifier: string): Observable<Blob> {
|
||||
return this._fileManagementService.downloadOriginalFile(this.dossierId, this.fileId, 'body', true, cacheIdentifier);
|
||||
return this._fileManagementService.downloadOriginalFile(this.dossierId, this.fileId, 'body', cacheIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,26 +36,16 @@ export class FileManagementService extends GenericService<unknown> {
|
||||
return this._post(body, `delete/restore/${dossierId}`).pipe(switchMap(() => this._filesService.loadAll(dossierId)));
|
||||
}
|
||||
|
||||
downloadOriginalFile(dossierId: string, fileId: string, observe?: 'body', inline?: boolean, indicator?: string): Observable<Blob>;
|
||||
downloadOriginalFile(
|
||||
dossierId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
inline?: boolean,
|
||||
indicator?: string,
|
||||
): Observable<HttpResponse<Blob>>;
|
||||
downloadOriginalFile(dossierId: string, fileId: string, observe?: 'body', indicator?: string): Observable<Blob>;
|
||||
downloadOriginalFile(dossierId: string, fileId: string, observe?: 'response', indicator?: string): Observable<HttpResponse<Blob>>;
|
||||
@Validate()
|
||||
downloadOriginalFile(
|
||||
@RequiredParam() dossierId: string,
|
||||
@RequiredParam() fileId: string,
|
||||
observe: 'body' | 'response' = 'body',
|
||||
inline?: boolean,
|
||||
indicator?: string,
|
||||
) {
|
||||
const queryParams: QueryParam[] = [];
|
||||
if (inline) {
|
||||
queryParams.push({ key: 'inline', value: inline });
|
||||
}
|
||||
const queryParams: QueryParam[] = [{ key: 'inline', value: true }];
|
||||
|
||||
if (indicator) {
|
||||
queryParams.push({ key: 'indicator', value: indicator });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user