Skip to content

Commit

Permalink
VIH-8295 hide additional flex bar in icons container when user is an …
Browse files Browse the repository at this point in the history
…observer because they will see a bar but no icons such as share-screen to separate the sections
  • Loading branch information
Shaed Parkar authored and shaed-parkar committed Apr 16, 2024
1 parent 49de00d commit 32df206
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BehaviorSubject, Observable, of, Subject, Subscription } from 'rxjs';
import {
ClientSettingsResponse,
ConferenceResponse,
ParticipantForUserResponse,
ParticipantForUserResponse, ParticipantResponse,
ParticipantStatus,
Role
} from 'src/app/services/clients/api-client';
Expand Down Expand Up @@ -1122,4 +1122,21 @@ describe('HearingControlsBaseComponent', () => {
expect(eventsServiceSpy.sendMediaStatus).toHaveBeenCalledTimes(0);
});
});

describe('isObserver', () => {
it('should return true when participant role is QuickLinkObserver', () => {
component.participant = { role: Role.QuickLinkObserver } as ParticipantResponse;
expect(component.isObserver).toBeTrue();
});

it('should return false when participant role is not QuickLinkObserver', () => {
component.participant = { role: Role.Judge } as ParticipantResponse;
expect(component.isObserver).toBeFalse();
});

it('should return false when participant is undefined', () => {
component.participant = undefined;
expect(component.isObserver).toBeFalse();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export abstract class HearingControlsBaseComponent implements OnInit, OnDestroy
return this.participant.role === Role.JudicialOfficeHolder || this.isJudge;
}

get isObserver(): boolean {
return this.participant?.role === Role.QuickLinkObserver;
}

get isJOHRoom(): boolean {
return this.participant?.current_room?.label.startsWith('JudgeJOH');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
</div>
</div>
</div>
<div class="flexBar"></div>
<div *ngIf="!isObserver" class="flexBar"></div>
<div
class="icon-button"
id="toggle-participants-panel"
Expand Down

0 comments on commit 32df206

Please sign in to comment.