All files / projects/organization-management/src/app/pages/users/user-roles-badges user-roles-badges.component.ts

66.66% Statements 4/6
60% Branches 3/5
50% Functions 1/2
66.66% Lines 4/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 252x     2x               2x         1x                
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { Observable } from 'rxjs';
 
import { OrganizationManagementFacade } from '../../../facades/organization-management.facade';
import { B2bRole } from '../../../models/b2b-role/b2b-role.model';
 
@Component({
  selector: 'ish-user-roles-badges',
  templateUrl: './user-roles-badges.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class UserRolesBadgesComponent implements OnChanges {
  @Input({ required: true }) roleIDs: string[];
 
  roles$: Observable<B2bRole[]>;
 
  constructor(private facade: OrganizationManagementFacade) {}
 
  ngOnChanges() {
    Iif (this.roleIDs) {
      this.roles$ = this.facade.roles$(this.roleIDs);
    }
  }
}