File

feature-libs/organization/administration/components/shared/table/status/status-cell.component.ts

Extends

CellComponent

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector cx-org-status-cell
templateUrl ./status-cell.component.html

Index

Accessors

Accessors

label
getlabel()
isActive
getisActive()
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { CellComponent } from '../cell.component';

@Component({
  selector: 'cx-org-status-cell',
  templateUrl: './status-cell.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StatusCellComponent extends CellComponent {
  get label() {
    if (this.isActive === undefined) {
      return;
    }
    return this.isActive ? 'organization.enabled' : 'organization.disabled';
  }

  get isActive(): boolean {
    return this.model.active;
  }
}
<a
  *ngIf="linkable; else text"
  [routerLink]="{ cxRoute: route, params: routeModel } | cxUrl"
  [tabindex]="tabIndex"
>
  <ng-container *ngTemplateOutlet="text"></ng-container>
</a>

<ng-template #text>
  <span
    class="text"
    title="{{ label | cxTranslate }}"
    [class.is-active]="isActive"
    *ngIf="label"
  >
    {{ label | cxTranslate }}</span
  >
</ng-template>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""