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