Skip to content

Commit c0f371c

Browse files
belka09ilmartyrk
authored andcommitted
remove possibility to edit and remove anonymous ideas
1 parent 16804ac commit c0f371c

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/app/ideation/components/idea/idea-dialog.component.html

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,9 @@
193193
<span translate="COMPONENTS.IDEABOX.OPTION_ADD_TO_FOLDER"></span>
194194
</button>
195195
</ng-container>
196-
<ng-container *ngIf="canEditIdea() || showDisabledFunctionality()">
196+
<ng-container *ngIf="canEditIdea()">
197197
<div class="line_separator"></div>
198-
<button
199-
class="option" (click)="ideaEditMode()"
200-
[disabled]="showDisabledFunctionality()"
201-
[ngClass]="{
202-
disabled: showDisabledFunctionality()
203-
}"
204-
>
198+
<button class="option" (click)="ideaEditMode()">
205199
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
206200
<path
207201
d="M8.8143 4.18517L11.8147 7.18569L5.29947 13.7012L2.62438 13.9965C2.26626 14.0361 1.96369 13.7333 2.00354 13.3752L2.30118 10.6981L8.8143 4.18517ZM13.6704 3.73845L12.2616 2.3296C11.8222 1.89013 11.1095 1.89013 10.67 2.3296L9.34467 3.65501L12.3451 6.65553L13.6704 5.33011C14.1099 4.89042 14.1099 4.17791 13.6704 3.73845Z"
@@ -242,15 +236,10 @@
242236
<span translate="COMPONENTS.IDEABOX.OPTION_VIEW_PREVIOUS_VERSIONS"></span>
243237
</button>
244238
</ng-container>
245-
<ng-container *ngIf="canEditIdea() || showDisabledFunctionality()">
239+
<ng-container *ngIf="canEditIdea()">
246240
<div class="line_separator"></div>
247241
<button
248-
class="option error_text" (click)="doShowDeleteIdea()"
249-
[disabled]="showDisabledFunctionality()"
250-
[ngClass]="{
251-
disabled: showDisabledFunctionality()
252-
}"
253-
>
242+
class="option error_text" (click)="doShowDeleteIdea()">
254243
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
255244
<path fill-rule="evenodd" clip-rule="evenodd"
256245
d="M10 3H6V4H10V3ZM11 4V3C11 2.44772 10.5523 2 10 2H6C5.44772 2 5 2.44772 5 3V4H4H2.5C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H4V13C4 13.5523 4.44772 14 5 14H11C11.5523 14 12 13.5523 12 13V5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H12H11ZM7 7H6V11H7V7ZM10 7H9V11H10V7Z"

src/app/ideation/components/ideabox/ideabox.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ export class IdeaboxComponent implements AfterViewInit {
7474
canEditIdea() {
7575
return (this.idea.author?.id === this.Auth.user.value.id && !this.idea.deletedAt && [this.TopicService.STATUSES.draft, this.TopicService.STATUSES.ideation].indexOf(this.topic.status) > -1);
7676
};
77-
showDisabledFunctionality() {
78-
return this.ideation.allowAnonymous;
79-
}
8077

8178
goToView(showReplies?: boolean) {
8279
if (this.idea.status === IdeaStatus.draft) {

0 commit comments

Comments
 (0)