Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

1.7 KB
Raw Blame
<div class="mb-2 row">
  <div class="col-md-6 d-flex">
    <div
      class="align-items-center d-flex flex-grow-1 h5 mb-0 py-2 text-truncate"
    >
      <span i18n>Performance</span>
      @if (user()?.subscription?.type === 'Basic') {
        <gf-premium-indicator class="ms-1" />
      }
    </div>
  </div>
  <div class="col-md-6 d-flex justify-content-end">
    <mat-form-field
      appearance="outline"
      class="gf-form-field-dense w-100 without-hint"
      color="accent"
    >
      <mat-label i18n>Compare with...</mat-label>
      <mat-select
        name="benchmark"
        [disabled]="user()?.subscription?.type === 'Basic'"
        [value]="benchmark()?.id"
        (selectionChange)="onChangeBenchmark($event.value)"
      >
        <mat-option [value]="null" />
        @for (symbolProfile of benchmarks(); track symbolProfile) {
          <mat-option [value]="symbolProfile.id">{{
            symbolProfile.name
          }}</mat-option>
        }
        @if (hasPermissionToAccessAdminControl) {
          <mat-option [routerLink]="routerLinkAdminControlMarketData">
            <div class="align-items-center d-flex">
              <ion-icon
                class="me-2 text-body-secondary"
                name="arrow-forward-outline"
              />
              <span i18n>Manage Benchmarks</span>
            </div>
          </mat-option>
        }
      </mat-select>
    </mat-form-field>
  </div>
</div>
<div class="chart-container">
  @if (isLoading()) {
    <ngx-skeleton-loader
      animation="pulse"
      [theme]="{
        height: '100%',
        width: '100%'
      }"
    />
  }
  <canvas
    #chartCanvas
    class="h-100"
    [style.display]="isLoading() ? 'none' : 'block'"
  ></canvas>
</div>