fixed various issues
This commit is contained in:
parent
fd3b738ecc
commit
00ab0252e9
@ -163,12 +163,7 @@ export function HttpLoaderFactory(httpClient: HttpClient) {
|
||||
component: ProjectOverviewScreenComponent,
|
||||
canActivate: [CompositeRouteGuard],
|
||||
data: {
|
||||
routeGuards: [
|
||||
AuthGuard,
|
||||
RedRoleGuard,
|
||||
ProjectMemberGuard,
|
||||
AppStateGuard
|
||||
]
|
||||
routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
@import '../../../assets/styles/red-variables';
|
||||
|
||||
.flex-row {
|
||||
width: fit-content;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@ -11,6 +11,11 @@
|
||||
*ngIf="appStateService.fileNotUpToDateWithDictionary()"
|
||||
class="pill"
|
||||
translate="project-overview.new-rule.label"
|
||||
></span>
|
||||
<span
|
||||
*ngIf="!appStateService.canPerformAnnotationActionsOnCurrentFile()"
|
||||
class="pill"
|
||||
translate="readonly-pill"
|
||||
></span
|
||||
> <span>{{ appStateService.activeFile.filename }}</span>
|
||||
</div>
|
||||
|
||||
@ -94,6 +94,10 @@ export class FileStatusWrapper {
|
||||
return this.status === 'APPROVED' || this.status === 'UNDER_APPROVAL';
|
||||
}
|
||||
|
||||
get isUnassigned() {
|
||||
return this.status === 'UNASSIGNED';
|
||||
}
|
||||
|
||||
get canApprove() {
|
||||
return this.status === 'UNDER_REVIEW' || this.status === 'UNDER_APPROVAL';
|
||||
}
|
||||
|
||||
@ -191,13 +191,11 @@
|
||||
| translate
|
||||
"
|
||||
[matTooltipPosition]="'above'"
|
||||
*ngIf="appStateService.isManagerAndOwner(pw.project) && pw.hasFiles"
|
||||
>
|
||||
<button
|
||||
mat-icon-button
|
||||
(click)="downloadRedactionReport($event, pw.project)"
|
||||
*ngIf="
|
||||
appStateService.isManagerAndOwner(pw.project) && pw.hasFiles
|
||||
"
|
||||
[disabled]="!pw.allFilesApproved"
|
||||
color="accent"
|
||||
>
|
||||
|
||||
@ -99,7 +99,8 @@ export class ProjectListingScreenComponent implements OnInit {
|
||||
}
|
||||
|
||||
public canOpenProject(pw: ProjectWrapper): boolean {
|
||||
return this.userService.isManager(this.user) || pw.project.memberIds.includes(this.user.id);
|
||||
// return this.userService.isManager(this.user) || pw.project.memberIds.includes(this.user.id);
|
||||
return true;
|
||||
}
|
||||
|
||||
public openAddProjectDialog(): void {
|
||||
|
||||
@ -1,21 +1,32 @@
|
||||
<div class="actions-row">
|
||||
<div class="actions-row" *ngIf="userService.isManager()">
|
||||
<button
|
||||
(click)="openDeleteProjectDialog($event)"
|
||||
*ngIf="userService.isManager(user)"
|
||||
*ngIf="userService.isManager()"
|
||||
mat-icon-button
|
||||
>
|
||||
<mat-icon svgIcon="red:trash"></mat-icon>
|
||||
</button>
|
||||
<button
|
||||
(click)="openEditProjectDialog($event)"
|
||||
*ngIf="userService.isManager(user)"
|
||||
mat-icon-button
|
||||
>
|
||||
<button (click)="openEditProjectDialog($event)" *ngIf="userService.isManager()" mat-icon-button>
|
||||
<mat-icon svgIcon="red:edit"></mat-icon>
|
||||
</button>
|
||||
<button (click)="downloadRedactionReport($event)" mat-icon-button>
|
||||
<mat-icon svgIcon="red:report"></mat-icon>
|
||||
</button>
|
||||
<div
|
||||
[matTooltip]="
|
||||
(appStateService.activeProject.allFilesApproved
|
||||
? 'report.action'
|
||||
: 'report.unavailable'
|
||||
) | translate
|
||||
"
|
||||
*ngIf="appStateService.isActiveProjectOwnerAndManager"
|
||||
[matTooltipPosition]="'above'"
|
||||
>
|
||||
<button
|
||||
(click)="downloadRedactionReport($event)"
|
||||
mat-icon-button
|
||||
[disabled]="!appStateService.activeProject.allFilesApproved"
|
||||
>
|
||||
<mat-icon svgIcon="red:report"></mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="heading-xl mt-16">
|
||||
@ -40,7 +51,7 @@
|
||||
</div>
|
||||
<div
|
||||
(click)="openAssignProjectMembersDialog()"
|
||||
*ngIf="userService.isManager(user)"
|
||||
*ngIf="userService.isManager()"
|
||||
class="member pointer"
|
||||
>
|
||||
<div class="oval red-white large">+</div>
|
||||
|
||||
@ -237,7 +237,9 @@
|
||||
(click)="openDeleteFileDialog($event, fileStatus)"
|
||||
*ngIf="
|
||||
userService.isManager(user) ||
|
||||
appStateService.isActiveProjectOwnerAndManager
|
||||
appStateService.isActiveProjectOwnerAndManager ||
|
||||
fileStatus.isUnassigned ||
|
||||
fileStatus.isError
|
||||
"
|
||||
[matTooltip]="'project-overview.delete.action' | translate"
|
||||
[matTooltipPosition]="'above'"
|
||||
@ -254,6 +256,7 @@
|
||||
: 'report.unavailable-single'
|
||||
) | translate
|
||||
"
|
||||
*ngIf="appStateService.isActiveProjectOwnerAndManager"
|
||||
[matTooltipPosition]="'above'"
|
||||
>
|
||||
<button
|
||||
|
||||
@ -101,10 +101,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
}
|
||||
|
||||
public toggleBulkSelect() {
|
||||
this.bulkSelectActive = !this.bulkSelectActive;
|
||||
}
|
||||
|
||||
private _displayNewRuleToast() {
|
||||
// @ts-ignore
|
||||
if (
|
||||
@ -158,7 +154,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
private _calculateData(): void {
|
||||
this._computeAllFilters();
|
||||
this._filterFiles();
|
||||
console.log('calculate parent');
|
||||
this._projectDetailsComponent?.calculateChartConfig();
|
||||
this._changeDetectorRef.detectChanges();
|
||||
}
|
||||
@ -251,7 +246,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
return (
|
||||
!this.isError(fileStatusWrapper) &&
|
||||
!this.isProcessing(fileStatusWrapper) &&
|
||||
this.appStateService.isReviewerOrOwner(fileStatusWrapper)
|
||||
this.appStateService.isActiveProjectMember
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -330,5 +330,6 @@
|
||||
"number-of-pages": "Number of pages",
|
||||
"number-of-analyses": "Number of analyses",
|
||||
"custom": "Custom"
|
||||
}
|
||||
},
|
||||
"readonly-pill": "Readonly"
|
||||
}
|
||||
|
||||
@ -43,19 +43,7 @@ body {
|
||||
.actions-row {
|
||||
display: flex;
|
||||
height: 40px;
|
||||
|
||||
> div {
|
||||
padding: 10px;
|
||||
|
||||
mat-icon {
|
||||
cursor: pointer;
|
||||
width: 14px;
|
||||
|
||||
&:hover {
|
||||
color: $primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
margin-left: -10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user