solved some issues
This commit is contained in:
parent
6fffd35338
commit
f1540d1e55
@ -25,6 +25,8 @@ const SORTING_OPTIONS: { [key: string]: SortingOption[] } = {
|
||||
styleUrls: ['./sorting.component.scss']
|
||||
})
|
||||
export class SortingComponent implements OnInit {
|
||||
@Input() initialOption: SortingOption;
|
||||
|
||||
@Input()
|
||||
private type: 'project-overview' | 'project-listing';
|
||||
|
||||
@ -36,7 +38,11 @@ export class SortingComponent implements OnInit {
|
||||
|
||||
constructor() {}
|
||||
|
||||
public ngOnInit(): void {}
|
||||
public ngOnInit(): void {
|
||||
if (this.initialOption) {
|
||||
this.setOption(this.initialOption);
|
||||
}
|
||||
}
|
||||
|
||||
private _addCustomOption(option: Partial<SortingOption>) {
|
||||
const customOption = {
|
||||
|
||||
@ -21,7 +21,7 @@ export class FileDataModel {
|
||||
(e) =>
|
||||
e.status !== 'DECLINED' &&
|
||||
!this.redactionLog.redactionLogEntry.find((r) => r.id === e.id) &&
|
||||
new Date(e.processedDate).getTime() >
|
||||
new Date(e.processedDate).getTime() <
|
||||
new Date(this.fileStatus.lastProcessed).getTime()
|
||||
);
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ export class FileStatusWrapper {
|
||||
}
|
||||
|
||||
get status() {
|
||||
return this.fileStatus.status;
|
||||
return this.fileStatus.status === 'REPROCESS' ? 'PROCESSING' : this.fileStatus.status;
|
||||
}
|
||||
|
||||
get numberOfPages() {
|
||||
|
||||
@ -106,7 +106,7 @@
|
||||
<div
|
||||
*ngIf="displayedProjects?.length === 0"
|
||||
class="no-data heading-l"
|
||||
translate="project-listing.no-projects"
|
||||
translate="project-listing.no-projects-match"
|
||||
></div>
|
||||
|
||||
<div
|
||||
@ -174,10 +174,24 @@
|
||||
>
|
||||
<mat-icon svgIcon="red:trash"></mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
(click)="openEditProjectDialog($event, pw.project)"
|
||||
[matTooltip]="'project-listing.edit.action' | translate"
|
||||
[matTooltipPosition]="'above'"
|
||||
*ngIf="userService.isManager(user)"
|
||||
color="accent"
|
||||
mat-icon-button
|
||||
>
|
||||
<mat-icon svgIcon="red:edit"></mat-icon>
|
||||
</button>
|
||||
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="downloadRedactionReport($event, pw.project)"
|
||||
*ngIf="userService.isManager(user)"
|
||||
*ngIf="
|
||||
appStateService.isManagerAndOwner(user, pw.project) && pw.hasFiles
|
||||
"
|
||||
[matTooltip]="'project-listing.report.action' | translate"
|
||||
[matTooltipPosition]="'above'"
|
||||
color="accent"
|
||||
@ -196,7 +210,9 @@
|
||||
</button>
|
||||
<button
|
||||
color="accent"
|
||||
*ngIf="appStateService.isManagerAndOwner(user, pw.project)"
|
||||
*ngIf="
|
||||
appStateService.isManagerAndOwner(user, pw.project) && pw.hasFiles
|
||||
"
|
||||
(click)="reanalyseProject($event, pw.project)"
|
||||
mat-icon-button
|
||||
[matTooltip]="'project-listing.reanalyse.action' | translate"
|
||||
|
||||
@ -253,4 +253,8 @@ export class ProjectListingScreenComponent implements OnInit {
|
||||
public isProjectSelected(pw: ProjectWrapper): boolean {
|
||||
return this._selectedProjectIds.indexOf(pw.project.projectId) !== -1;
|
||||
}
|
||||
|
||||
openEditProjectDialog($event: MouseEvent, project: Project) {
|
||||
this._dialogService.openEditProjectDialog($event, project);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-24">
|
||||
<div class="mt-24" *ngIf="hasFiles">
|
||||
<redaction-simple-doughnut-chart
|
||||
[config]="documentsChartData"
|
||||
[radius]="70"
|
||||
@ -58,7 +58,7 @@
|
||||
></redaction-simple-doughnut-chart>
|
||||
</div>
|
||||
|
||||
<div class="mt-24 legend">
|
||||
<div class="mt-24 legend" *ngIf="hasFiles">
|
||||
<div>
|
||||
<redaction-annotation-icon
|
||||
[typeValue]="appStateService.getDictionaryTypeValue('hint')"
|
||||
|
||||
@ -79,4 +79,8 @@ export class ProjectDetailsComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
get hasFiles() {
|
||||
return this.appStateService.activeProject.hasFiles;
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,10 @@
|
||||
></div>
|
||||
|
||||
<div *ngIf="appStateService.activeProject" class="page-header">
|
||||
<div class="filters flex-row">
|
||||
<div *ngIf="!appStateService.activeProject.hasFiles">
|
||||
<div class="no-data heading-l" translate="project-overview.no-files"></div>
|
||||
</div>
|
||||
<div class="filters flex-row" *ngIf="appStateService.activeProject.hasFiles">
|
||||
<div translate="filters.filter-by"></div>
|
||||
<redaction-filter
|
||||
(filtersChanged)="filtersChanged()"
|
||||
@ -68,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex red-content-inner">
|
||||
<div class="left-container">
|
||||
<div class="left-container" *ngIf="appStateService.activeProject.hasFiles">
|
||||
<div class="table-header">
|
||||
<div class="select-all-container">
|
||||
<div
|
||||
@ -93,6 +96,7 @@
|
||||
></div>
|
||||
<redaction-sorting
|
||||
#sortingComponent
|
||||
[initialOption]="sortingOption"
|
||||
(optionChanged)="sortingOptionChanged($event)"
|
||||
type="project-overview"
|
||||
></redaction-sorting>
|
||||
@ -151,7 +155,7 @@
|
||||
<div
|
||||
*ngIf="displayedFiles?.length === 0"
|
||||
class="no-data heading-l"
|
||||
translate="project-overview.no-files"
|
||||
translate="project-overview.no-files-match"
|
||||
></div>
|
||||
|
||||
<div
|
||||
|
||||
@ -48,7 +48,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
@ViewChild('projectDetailsComponent', { static: true })
|
||||
private _projectDetailsComponent: ProjectDetailsComponent;
|
||||
|
||||
@ViewChild('sortingComponent', { static: true }) public sortingComponent: SortingComponent;
|
||||
public sortingOption: SortingOption = { column: 'added', order: 'desc' };
|
||||
|
||||
constructor(
|
||||
@ -78,7 +77,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.sortingComponent.setOption(this.sortingOption);
|
||||
this._fileDropOverlayService.initFileDropHandling();
|
||||
this._calculateData();
|
||||
this._displayNewRuleToast();
|
||||
|
||||
@ -63,6 +63,10 @@ export class ProjectWrapper {
|
||||
addedDateMatches(key: string) {
|
||||
return moment(this.projectDate).format('DD/MM/YYYY') === key;
|
||||
}
|
||||
|
||||
get hasFiles() {
|
||||
return this.files?.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
|
||||
@ -34,7 +34,7 @@ section {
|
||||
padding-left: 8px;
|
||||
|
||||
mat-icon {
|
||||
width: 16px;
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,12 +11,28 @@ import { OverlayRef } from '@angular/cdk/overlay';
|
||||
export class UploadStatusOverlay implements OnInit {
|
||||
collapsed = false;
|
||||
|
||||
uploadStatusInterval: number;
|
||||
|
||||
constructor(
|
||||
public readonly uploadService: FileUploadService,
|
||||
private readonly _overlayRef: OverlayRef
|
||||
) {}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
this.uploadStatusInterval = setInterval(() => {
|
||||
if (this.uploadService.files.length > 0) {
|
||||
const result = this.uploadService.files.reduce(
|
||||
(a, file) => a && file.completed && !file.error,
|
||||
true
|
||||
);
|
||||
if (result) {
|
||||
setTimeout(() => {
|
||||
this.closeDialog();
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
cancelItem(item: FileUploadModel) {}
|
||||
|
||||
@ -26,6 +42,10 @@ export class UploadStatusOverlay implements OnInit {
|
||||
}
|
||||
|
||||
closeDialog() {
|
||||
if (this.uploadStatusInterval) {
|
||||
clearInterval(this.uploadStatusInterval);
|
||||
this.uploadStatusInterval = null;
|
||||
}
|
||||
this.uploadService.stopAllUploads();
|
||||
this._overlayRef.detach();
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
}
|
||||
},
|
||||
"filters": {
|
||||
"filter-by": "Filter by:",
|
||||
"filter-by": "Filter:",
|
||||
"status": "Status",
|
||||
"people": "People",
|
||||
"due-date": "Due Date",
|
||||
@ -141,7 +141,8 @@
|
||||
"delete-failed": "Failed to delete project: {{projectName}}"
|
||||
},
|
||||
"add-new": "New Project",
|
||||
"no-projects": "You currently have no projects. You can start your work by creating a new one!"
|
||||
"no-projects": "You currently have no projects. You can start your work by creating a new one!",
|
||||
"no-projects-match": "No Projects match your current filters"
|
||||
},
|
||||
"file-details": {
|
||||
"dialog": {
|
||||
@ -168,6 +169,8 @@
|
||||
"approve": "Approve",
|
||||
"under-review": "Under Review",
|
||||
"no-files": "This Project contains no files yet. You can start your work by uploading some files!",
|
||||
"no-files-match": "No File match your current filters",
|
||||
"upload-files": "Drop files anywhere for upload!",
|
||||
"new-rule": {
|
||||
"label": "Outdated",
|
||||
"toast": {
|
||||
|
||||
@ -16,15 +16,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.no-data {
|
||||
grid-column: 1/-1;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
display: grid;
|
||||
position: relative;
|
||||
|
||||
.no-data {
|
||||
grid-column: 1/-1;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.select-oval-placeholder {
|
||||
border-bottom: 1px solid $separator;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user