Skip to content
Snippets Groups Projects
Commit 8cacdc07 authored by Ruben Bimberg's avatar Ruben Bimberg :computer:
Browse files

Implement update for users

parent 321edd89
Branches
Tags
No related merge requests found
......@@ -79,7 +79,7 @@
</mat-form-field>
</mat-radio-group>
<mat-card *ngIf="user && user.role > 0 && hasNoKeywords"
<mat-card *ngIf="hasNoKeywords"
class="noKeywords">
<p>{{'topic-cloud-filter.info-no-keywords' | translate}}</p>
<button mat-flat-button
......@@ -90,8 +90,7 @@
</button>
</mat-card>
<app-worker-dialog [inlined]="true"
*ngIf="user && user.role > 0"></app-worker-dialog>
<app-worker-dialog [inlined]="true"></app-worker-dialog>
<ars-row ars-flex-box class="action-button-container">
<ars-col>
......
......@@ -19,6 +19,7 @@ import { Room } from '../../../../models/room';
import { ThemeService } from '../../../../../theme/theme.service';
import { Theme } from '../../../../../theme/Theme';
import { ExplanationDialogComponent } from '../explanation-dialog/explanation-dialog.component';
import { UserRole } from '../../../../models/user-roles.enum';
class CommentsCount {
comments: number;
......@@ -165,9 +166,6 @@ export class TopicCloudFilterComponent implements OnInit {
}
private isUpdatable(): boolean {
if (this.comments.length < 3) {
return false;
}
let count = 0;
let newCount = 0;
this.comments.forEach(comment => {
......@@ -177,6 +175,9 @@ export class TopicCloudFilterComponent implements OnInit {
count++;
}
});
if (this.user && this.user.role === UserRole.PARTICIPANT) {
return newCount < 1;
}
if (count * 2 / 3 < newCount) {
return false;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment