Skip to content

Commit

Permalink
Merge branch 'dev' into feature/stratification-UI-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yagnik56 authored Oct 16, 2023
2 parents eebe03c + 832d4b7 commit df4f186
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
mat-flat-button
class="ft-14-600 button"
(click)="deleteSegment()"
[ngClass]="{ 'button--disabled': permissions && !permissions.segments.delete }"
[disabled]="permissions && !permissions.segments.delete"
[ngClass]="{ 'button--disabled': permissions && !permissions.segments.delete || segmentUsed }"
[disabled]="permissions && !permissions.segments.delete || segmentUsed"
>
{{ 'global.delete.text' | translate }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class ViewSegmentComponent implements OnInit, OnDestroy {
segment: Segment;
segmentSub: Subscription;
members: { type: string; id: string }[] = [];
segmentUsed: boolean;

displayedVariationColumns: string[] = ['value', 'name'];

Expand Down Expand Up @@ -60,6 +61,8 @@ export class ViewSegmentComponent implements OnInit, OnDestroy {
this.members.push({ type: MemberTypes.SEGMENT, id: subSegment.name });
});
});

this.segmentUsed = this.segment?.status === SEGMENT_STATUS.USED;
}

openEditSegmentDialog() {
Expand Down

0 comments on commit df4f186

Please sign in to comment.