Skip to content

Commit 6f22c7a

Browse files
authored
Merge pull request #2284 from citizenos/#1712
Fix: With 1 Discussion topic, the Edit button is not visible [#1712]
2 parents f685a33 + 3a06666 commit 6f22c7a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/app/topic/topic.component.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,8 @@
748748
<ng-container *ngIf="
749749
(auth.loggedIn$ | async) &&
750750
TopicService.canEdit(topic) &&
751-
!topic.voteId
751+
!topic.voteId &&
752+
!topic.ideationId
752753
">
753754
<div class="line_separator"></div>
754755
<button class="option" [routerLink]="['/', 'topics', 'edit', topic.id]">
@@ -765,11 +766,12 @@
765766
</ng-container>
766767
<ng-container *ngIf="
767768
(auth.loggedIn$ | async) &&
769+
TopicService.canEdit(topic) &&
768770
topic.ideationId &&
769771
!topic.voteId &&
770-
TopicService.canEdit(topic) &&
771772
[
772773
TopicService.STATUSES.draft,
774+
TopicService.STATUSES.inProgress,
773775
TopicService.STATUSES.ideation,
774776
TopicService.STATUSES.followUp
775777
].indexOf(topic.status) > -1
@@ -795,10 +797,11 @@
795797
</ng-container>
796798
<ng-container *ngIf="
797799
(auth.loggedIn$ | async) &&
798-
topic.voteId &&
799800
TopicService.canEdit(topic) &&
801+
topic.voteId &&
800802
[
801803
TopicService.STATUSES.draft,
804+
TopicService.STATUSES.inProgress,
802805
TopicService.STATUSES.voting,
803806
TopicService.STATUSES.followUp
804807
].indexOf(topic.status) > -1
@@ -1648,7 +1651,8 @@
16481651
<ng-container *ngIf="
16491652
(auth.loggedIn$ | async) &&
16501653
TopicService.canEdit(topic) &&
1651-
!topic.voteId
1654+
!topic.voteId &&
1655+
!topic.ideationId
16521656
">
16531657
<div class="line_separator"></div>
16541658
<button class="option" [routerLink]="['/', 'topics', 'edit', topic.id]">

0 commit comments

Comments
 (0)