Skip to content

Commit

Permalink
Merge branch 'dev' into feature/version-bump-all-packages-script
Browse files Browse the repository at this point in the history
  • Loading branch information
danoswaltCL authored Oct 13, 2023
2 parents dfd14d8 + 832d4b7 commit aa6b342
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,11 @@ export class ExperimentAssignmentService {

filteredExperiments = alreadyAssignedExperiment.flat().concat(filteredExperiments);

// return if no experiment
if (filteredExperiments.length === 0) {
return [];
}

// assign remaining experiment
const experimentAssignment = await Promise.all(
filteredExperiments.map((experiment) => {
Expand Down
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 aa6b342

Please sign in to comment.