+
diff --git a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts
index 5c8f4e60a..1371ac55e 100644
--- a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts
@@ -1,12 +1,4 @@
-import {
- Component,
- ElementRef,
- HostBinding,
- Input,
- OnChanges,
- OnInit,
- ViewChild
-} from '@angular/core';
+import { Component, ElementRef, HostBinding, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
@Component({
selector: 'redaction-round-checkbox',
diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html
index 7b97cafac..22eb999b5 100644
--- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html
+++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html
@@ -1,5 +1 @@
-
+
diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts
index 2bffab9f9..3fc06e497 100644
--- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts
@@ -19,14 +19,8 @@ export class DictionaryAnnotationIconComponent implements OnChanges {
ngOnChanges(): void {
if (this.dictionaryKey) {
- const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue(
- this.dictionaryKey,
- this.dossierTemplateId
- );
- this.color = this._appStateService.getDictionaryColor(
- this.dictionaryKey,
- this.dossierTemplateId
- );
+ const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue(this.dictionaryKey, this.dossierTemplateId);
+ this.color = this._appStateService.getDictionaryColor(this.dictionaryKey, this.dossierTemplateId);
this.type = typeValue.hint ? 'circle' : 'square';
this.label = this.dictionaryKey[0].toUpperCase();
}
diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts
index 73a37074e..a6d438dcf 100644
--- a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts
@@ -80,8 +80,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
.subscribe(entries => {
this.diffEditorText = entries;
this.showDiffEditor = true;
- if (this.showDiffEditor)
- this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText);
+ if (this.showDiffEditor) this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText);
});
}
@@ -136,9 +135,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
@debounce()
codeEditorTextChanged() {
- const newDecorations = this.currentEntries
- .filter(entry => this._isNew(entry))
- .map(entry => this._getDecoration(entry));
+ const newDecorations = this.currentEntries.filter(entry => this._isNew(entry)).map(entry => this._getDecoration(entry));
this._decorations = this._codeEditor.deltaDecorations(this._decorations, newDecorations);
}
@@ -162,13 +159,11 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
}
private _applySearchDecorations() {
- this._searchDecorations =
- this._codeEditor?.deltaDecorations(this._searchDecorations, []) || [];
+ this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, []) || [];
const decorations = this.findMatches.map(match => this._getSearchDecoration(match));
- this._searchDecorations =
- this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || [];
+ this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || [];
}
private _getMatches(text: string): FindMatch[] {
@@ -199,15 +194,8 @@ export class DictionaryManagerComponent implements OnChanges, OnInit {
this._codeEditor.revealLineInCenter(range.startLineNumber, SMOOTH_SCROLL);
}
- private _onDossierChanged({
- dossierId,
- dossierTemplateId
- }: DossierWrapper): Observable
{
- const dictionary$ = this._dictionaryControllerService.getDictionaryForType(
- dossierTemplateId,
- 'dossier_redaction',
- dossierId
- );
+ private _onDossierChanged({ dossierId, dossierTemplateId }: DossierWrapper): Observable {
+ const dictionary$ = this._dictionaryControllerService.getDictionaryForType(dossierTemplateId, 'dossier_redaction', dossierId);
return dictionary$.pipe(map(data => this._toString(data.entries)));
}
diff --git a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts
index 7cca79894..296f0219d 100644
--- a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts
@@ -1,12 +1,4 @@
-import {
- ChangeDetectorRef,
- Component,
- EventEmitter,
- Input,
- OnChanges,
- Output,
- TemplateRef
-} from '@angular/core';
+import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, TemplateRef } from '@angular/core';
import { FilterModel } from './model/filter.model';
import { handleCheckedValue } from './utils/filter-utils';
import { MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox';
@@ -42,10 +34,7 @@ export class PopupFilterComponent implements OnChanges {
atLeastOneFilterIsExpandable = false;
atLeastOneSecondaryFilterIsExpandable = false;
- constructor(
- private readonly _changeDetectorRef: ChangeDetectorRef,
- private readonly _translateService: TranslateService
- ) {}
+ constructor(private readonly _changeDetectorRef: ChangeDetectorRef, private readonly _translateService: TranslateService) {}
get hasActiveFilters(): boolean {
return !!this._allFilters.find(f => f.checked || f.indeterminate);
@@ -57,9 +46,7 @@ export class PopupFilterComponent implements OnChanges {
ngOnChanges(): void {
this.atLeastOneFilterIsExpandable = !!this.primaryFilters?.find(f => this.isExpandable(f));
- this.atLeastOneSecondaryFilterIsExpandable = !!this.secondaryFilters?.find(f =>
- this.isExpandable(f)
- );
+ this.atLeastOneSecondaryFilterIsExpandable = !!this.secondaryFilters?.find(f => this.isExpandable(f));
}
filterCheckboxClicked($event: any, filter: FilterModel, parent?: FilterModel) {
diff --git a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts
index c2401b8a8..c7157206e 100644
--- a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts
@@ -1,11 +1,4 @@
-import {
- ChangeDetectionStrategy,
- ChangeDetectorRef,
- Component,
- Input,
- OnChanges,
- OnDestroy
-} from '@angular/core';
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy } from '@angular/core';
import { UserService } from '@services/user.service';
import { User } from '@redaction/red-ui-http';
import { TranslateService } from '@ngx-translate/core';
diff --git a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html
index 61fb9d393..b8646c687 100644
--- a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html
+++ b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html
@@ -1,9 +1,4 @@
-
+
|
|
-
+
diff --git a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts
index b6ce6b86d..951c66126 100644
--- a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts
@@ -50,11 +50,7 @@ export class PaginationComponent {
if (Math.max(1, this.currentPage - 1) > 1) {
this.displayedPages.push('...');
}
- for (
- let page = Math.max(1, this.currentPage - 1);
- page <= Math.min(this.currentPage + 1, this.totalPages - 1);
- ++page
- ) {
+ for (let page = Math.max(1, this.currentPage - 1); page <= Math.min(this.currentPage + 1, this.totalPages - 1); ++page) {
this.displayedPages.push(page);
}
if (Math.min(this.currentPage + 1, this.totalPages - 1) !== this.totalPages - 1) {
diff --git a/apps/red-ui/src/app/modules/shared/components/select/select.component.html b/apps/red-ui/src/app/modules/shared/components/select/select.component.html
index 64daca14b..0e8028605 100644
--- a/apps/red-ui/src/app/modules/shared/components/select/select.component.html
+++ b/apps/red-ui/src/app/modules/shared/components/select/select.component.html
@@ -1,26 +1,13 @@
-
+
{{ translatePrefix + option | translate }}
diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html
index 577055adb..31ec0b241 100644
--- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html
+++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html
@@ -23,10 +23,7 @@
-
+
{{ displayedDataTotal }}
{{ subtitle | translate }}
@@ -45,10 +42,7 @@
length: val.value,
color: val.color,
label: getLabel(val),
- cssClass:
- val.color === 'PROCESSING' || val.color === 'OCR_PROCESSING'
- ? 'loading'
- : ''
+ cssClass: val.color === 'PROCESSING' || val.color === 'OCR_PROCESSING' ? 'loading' : ''
}
]"
[small]="true"
diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts
index a21012acd..24a90e150 100644
--- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts
+++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts
@@ -86,9 +86,7 @@ export class SimpleDoughnutChartComponent
implements OnChanges {
}
getLabel(config: DoughnutChartConfig): string {
- return this.totalType === 'sum'
- ? `${config.value} ${config.label}`
- : `${config.label} (${config.value} ${this.counterText})`;
+ return this.totalType === 'sum' ? `${config.value} ${config.label}` : `${config.label} (${config.value} ${this.counterText})`;
}
selectValue(key: string) {
diff --git a/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html b/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html
index 02583b6bd..e06bd34f9 100644
--- a/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html
+++ b/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html
@@ -1,9 +1,5 @@
-
+
-
-
+
diff --git a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts
index 403caff1f..764ff07f7 100644
--- a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts
+++ b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts
@@ -48,8 +48,7 @@ export class ConfirmationDialogComponent {
) {
this.config = _confirmationDialogInput ?? new ConfirmationDialogInput();
this.config = this.translate(this.config);
- this.inputLabel =
- this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`;
+ this.inputLabel = this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`;
}
get isDeleteAction() {
@@ -78,12 +77,9 @@ export class ConfirmationDialogComponent {
translate
(obj: T): T {
const translateKeys = ['title', 'question', 'details', 'confirmationText', 'denyText'];
- if (typeof obj === 'string')
- return this._translateService.instant(obj, this.config.translateParams);
+ if (typeof obj === 'string') return this._translateService.instant(obj, this.config.translateParams);
- const stringKeys = Object.keys(obj).filter(
- key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key)
- );
+ const stringKeys = Object.keys(obj).filter(key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key));
stringKeys.forEach(key => (obj[key] = this.translate(obj[key])));
return obj;
diff --git a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts
index 8fb57ac82..d0c832652 100644
--- a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts
+++ b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts
@@ -10,10 +10,7 @@ export class HasScrollbarDirective implements AfterContentChecked {
constructor(private readonly _elementRef: ElementRef) {}
get hasScrollbar() {
- return (
- this._elementRef?.nativeElement.clientHeight <
- this._elementRef?.nativeElement.scrollHeight
- );
+ return this._elementRef?.nativeElement.clientHeight < this._elementRef?.nativeElement.scrollHeight;
}
ngAfterContentChecked() {
diff --git a/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts b/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts
index 0f1b5f46b..2f6affe25 100644
--- a/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts
+++ b/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts
@@ -1,11 +1,4 @@
-import {
- AfterViewInit,
- Directive,
- ElementRef,
- HostListener,
- Input,
- OnDestroy
-} from '@angular/core';
+import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnDestroy } from '@angular/core';
import { debounce } from '@utils/debounce';
@Directive({
@@ -32,9 +25,7 @@ export class SyncWidthDirective implements AfterViewInit, OnDestroy {
@debounce(10)
matchWidth() {
const headerItems = this._elementRef.nativeElement.children;
- const tableRows = this._elementRef.nativeElement.parentElement.getElementsByClassName(
- this.redactionSyncWidth
- );
+ const tableRows = this._elementRef.nativeElement.parentElement.getElementsByClassName(this.redactionSyncWidth);
if (!tableRows || !tableRows.length) {
return;
@@ -48,12 +39,8 @@ export class SyncWidthDirective implements AfterViewInit, OnDestroy {
for (let idx = 0; idx < length - hasExtraColumns - 1; ++idx) {
if (headerItems[idx]) {
- headerItems[idx].style.width = `${
- tableRow.children[idx].getBoundingClientRect().width
- }px`;
- headerItems[idx].style.minWidth = `${
- tableRow.children[idx].getBoundingClientRect().width
- }px`;
+ headerItems[idx].style.width = `${tableRow.children[idx].getBoundingClientRect().width}px`;
+ headerItems[idx].style.minWidth = `${tableRow.children[idx].getBoundingClientRect().width}px`;
}
}
diff --git a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts
index 4de9e5b87..fe9f71c85 100644
--- a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts
+++ b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts
@@ -10,20 +10,12 @@ const MINUTES_IN_AN_HOUR = 60;
name: 'date'
})
export class DatePipe extends BaseDatePipe implements PipeTransform {
- constructor(
- @Inject(LOCALE_ID) private readonly _locale: string,
- private readonly _translateService: TranslateService
- ) {
+ constructor(@Inject(LOCALE_ID) private readonly _locale: string, private readonly _translateService: TranslateService) {
super(_locale);
}
transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null;
- transform(
- value: Date | string | number | null | undefined,
- format?: string,
- timezone?: string,
- locale?: string
- ): string | null;
+ transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null;
transform(value: any, format?: string, timezone?: string, locale?: string): string {
if (format === 'timeFromNow') return this._getTimeFromNow(value);
return super.transform(value, format, timezone, locale);
@@ -39,8 +31,7 @@ export class DatePipe extends BaseDatePipe implements PipeTransform {
const minutesFromNow = date.diff(now, 'minutes');
const minutesLeft = minutesFromNow - HOURS_IN_A_DAY * MINUTES_IN_AN_HOUR * daysLeft;
- if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0)
- return this._translate('time.less-than-an-hour');
+ if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0) return this._translate('time.less-than-an-hour');
const hoursSuffix = this._translate(`time.hour${hoursLeft === 1 ? '' : 's'}`);
const hoursDisplay = `${hoursLeft} ${hoursSuffix}`;
diff --git a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts
index d821b264c..1714cc862 100644
--- a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts
+++ b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts
@@ -26,13 +26,7 @@ export abstract class DialogService {
protected constructor(protected readonly _dialog: MatDialog) {}
- openDialog(
- type: T,
- $event: MouseEvent,
- data: any,
- cb?: Function,
- finallyCb?: Function
- ): MatDialogRef {
+ openDialog(type: T, $event: MouseEvent, data: any, cb?: Function, finallyCb?: Function): MatDialogRef {
const config = this._config[type];
$event?.stopPropagation();
diff --git a/apps/red-ui/src/app/modules/shared/services/filter.service.ts b/apps/red-ui/src/app/modules/shared/services/filter.service.ts
index 172f17ef4..50d87d3ca 100644
--- a/apps/red-ui/src/app/modules/shared/services/filter.service.ts
+++ b/apps/red-ui/src/app/modules/shared/services/filter.service.ts
@@ -1,9 +1,6 @@
import { ChangeDetectorRef, Injectable } from '@angular/core';
import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model';
-import {
- getFilteredEntities,
- processFilters
-} from '@shared/components/filters/popup-filter/utils/filter-utils';
+import { getFilteredEntities, processFilters } from '@shared/components/filters/popup-filter/utils/filter-utils';
import { FilterWrapper } from '@shared/components/filters/popup-filter/model/filter-wrapper.model';
import { ScreenStateService } from '@shared/services/screen-state.service';
import { SearchService } from '@shared/services/search.service';
@@ -98,8 +95,7 @@ export class FilterService {
}
private _toFlatFilters(entities: FilterWrapper[]): FilterModel[] {
- const flatChildren = (filters: FilterModel[]) =>
- (filters ?? []).reduce((acc, f) => [...acc, ...(f?.filters ?? [])], []);
+ const flatChildren = (filters: FilterModel[]) => (filters ?? []).reduce((acc, f) => [...acc, ...(f?.filters ?? [])], []);
return entities.reduce((acc, f) => [...acc, ...f.values, ...flatChildren(f.values)], []);
}
diff --git a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts
index 6c6c0d86d..d52457f7a 100644
--- a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts
+++ b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts
@@ -55,10 +55,7 @@ export class ScreenStateService {
}
get areAllEntitiesSelected(): boolean {
- return (
- this.displayedEntities.length !== 0 &&
- this.selectedEntitiesIds.length === this.displayedEntities.length
- );
+ return this.displayedEntities.length !== 0 && this.selectedEntitiesIds.length === this.displayedEntities.length;
}
get areSomeEntitiesSelected$(): Observable {
@@ -76,9 +73,7 @@ export class ScreenStateService {
return this.setSelectedEntitiesIds([...this.selectedEntitiesIds, currentEntityId]);
}
- this.setSelectedEntitiesIds(
- this.selectedEntitiesIds.filter((el, idx) => idx !== currentEntityIdx)
- );
+ this.setSelectedEntitiesIds(this.selectedEntitiesIds.filter((el, idx) => idx !== currentEntityIdx));
}
toggleSelectAll(): void {
diff --git a/apps/red-ui/src/app/modules/shared/services/search.service.ts b/apps/red-ui/src/app/modules/shared/services/search.service.ts
index 49279535a..3098c3be3 100644
--- a/apps/red-ui/src/app/modules/shared/services/search.service.ts
+++ b/apps/red-ui/src/app/modules/shared/services/search.service.ts
@@ -12,10 +12,7 @@ export class SearchService {
query: ['']
});
- constructor(
- private readonly _screenStateService: ScreenStateService,
- private readonly _formBuilder: FormBuilder
- ) {
+ constructor(private readonly _screenStateService: ScreenStateService, private readonly _formBuilder: FormBuilder) {
this.searchForm.valueChanges.subscribe(() => this.executeSearch());
}
@@ -26,17 +23,14 @@ export class SearchService {
}
executeSearchImmediately(): void {
- const displayed =
- this._screenStateService.filteredEntities || this._screenStateService.entities;
+ const displayed = this._screenStateService.filteredEntities || this._screenStateService.entities;
if (!this._searchKey) {
return this._screenStateService.setDisplayedEntities(displayed);
}
this._screenStateService.setDisplayedEntities(
- displayed.filter(entity =>
- this._searchField(entity).toLowerCase().includes(this._searchValue)
- )
+ displayed.filter(entity => this._searchField(entity).toLowerCase().includes(this._searchValue))
);
this._screenStateService.updateSelection();
}
diff --git a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts
index feb65ed38..e045fab1e 100644
--- a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts
+++ b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts
@@ -15,13 +15,7 @@ import { FileDropOverlayService } from './services/file-drop-overlay.service';
imports: [CommonModule, SharedModule, OverlayModule],
declarations: [FileDropComponent, UploadStatusOverlayComponent, OverwriteFilesDialogComponent],
entryComponents: [FileDropComponent, UploadStatusOverlayComponent],
- providers: [
- UploadDownloadDialogService,
- FileUploadService,
- FileDownloadService,
- StatusOverlayService,
- FileDropOverlayService
- ],
+ providers: [UploadDownloadDialogService, FileUploadService, FileDownloadService, StatusOverlayService, FileDropOverlayService],
exports: [FileDropComponent, UploadStatusOverlayComponent]
})
export class FileUploadDownloadModule {}
diff --git a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts
index 4c38d2973..9d1742de0 100644
--- a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts
+++ b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts
@@ -6,15 +6,8 @@ export class DownloadStatusWrapper {
constructor(private _downloadStatus: DownloadStatus) {}
get size() {
- const i =
- this._downloadStatus.fileSize === 0
- ? 0
- : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024));
- return (
- (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) +
- ' ' +
- ['B', 'kB', 'MB', 'GB', 'TB'][i]
- );
+ const i = this._downloadStatus.fileSize === 0 ? 0 : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024));
+ return (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i];
}
get creationDate() {
diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
index 9b7287ad3..4abf26af6 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts
@@ -34,10 +34,7 @@ export class FileDownloadService {
});
}
- downloadFiles(
- fileStatusWrappers: FileStatusWrapper[],
- dossier: DossierWrapper
- ): Observable {
+ downloadFiles(fileStatusWrappers: FileStatusWrapper[], dossier: DossierWrapper): Observable {
return this._downloadControllerService
.prepareDownload({
fileIds: fileStatusWrappers.map(f => f.fileId),
@@ -49,9 +46,7 @@ export class FileDownloadService {
getDownloadStatus() {
return this._downloadControllerService.getDownloadStatus().pipe(
tap(statusResponse => {
- this.downloads = statusResponse.downloadStatus.map(
- d => new DownloadStatusWrapper(d)
- );
+ this.downloads = statusResponse.downloadStatus.map(d => new DownloadStatusWrapper(d));
this.hasPendingDownloads = !!this.downloads.find(f => !f.lastDownload && f.isReady);
})
);
diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts
index 35e02614d..930bb3e96 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts
@@ -42,25 +42,15 @@ export class FileDropOverlayService {
};
initFileDropHandling() {
- document
- .getElementsByTagName('body')[0]
- .addEventListener('dragenter', this.dragListener, false);
- document
- .getElementsByTagName('body')[0]
- .addEventListener('mouseenter', this.mouseIn, false);
+ document.getElementsByTagName('body')[0].addEventListener('dragenter', this.dragListener, false);
+ document.getElementsByTagName('body')[0].addEventListener('mouseenter', this.mouseIn, false);
document.getElementsByTagName('body')[0].addEventListener('mouseout', this.mouseOut, false);
}
cleanupFileDropHandling() {
- document
- .getElementsByTagName('body')[0]
- .removeEventListener('dragenter', this.dragListener, false);
- document
- .getElementsByTagName('body')[0]
- .removeEventListener('mouseenter', this.mouseIn, false);
- document
- .getElementsByTagName('body')[0]
- .removeEventListener('mouseout', this.mouseOut, false);
+ document.getElementsByTagName('body')[0].removeEventListener('dragenter', this.dragListener, false);
+ document.getElementsByTagName('body')[0].removeEventListener('mouseenter', this.mouseIn, false);
+ document.getElementsByTagName('body')[0].removeEventListener('mouseout', this.mouseOut, false);
}
openFileDropOverlay() {
diff --git a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts
index 091c8425b..2bd7148bd 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts
@@ -12,11 +12,7 @@ export class StatusOverlayService {
}
openUploadStatusOverlay() {
- const component = new ComponentPortal(
- UploadStatusOverlayComponent,
- null,
- this._createUploadInjector()
- );
+ const component = new ComponentPortal(UploadStatusOverlayComponent, null, this._createUploadInjector());
if (!this._uploadStatusOverlayRef.hasAttached()) {
this._uploadStatusOverlayRef.attach(component);
}
diff --git a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
index c797e32d0..7e29b6ece 100644
--- a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
+++ b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts
@@ -12,9 +12,7 @@ const dialogConfig = {
export class UploadDownloadDialogService {
constructor(private readonly _dialog: MatDialog) {}
- openOverwriteFileDialog(
- filename: string
- ): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> {
+ openOverwriteFileDialog(filename: string): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> {
const ref = this._dialog.open(OverwriteFilesDialogComponent, {
...dialogConfig,
data: filename
diff --git a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html
index 060b49cf5..a4ecde75f 100644
--- a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html
+++ b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html
@@ -1,30 +1,17 @@