<app-schedule-tab>
  <ng-container *ngIf="isReady">
    <!-- message: remove-->
    <p class="alert alert-success" @toggleVertically *ngIf="isRemoveSuccessMessageVisible">
      Harmonogram został przywrócony do realizacji
    </p>
    <app-schedule-table
      [columns]="columns"
      [config]="config"
      [dataSource]="dataSource"
      (scheduleSettingsUpdated)="updateScheduleAfterSettingsChanged($event)">
      <!--  Table header-->
      <div class="schedule-header font-weight-bold" *ngIf="dataSource">
        <p *ngIf="!isSchedulesView && !isAdmin" class="d-inline-block mt-2">Okres: {{ dataSource.periodName }}</p>
        <ng-container *ngIf="isRepresentativeView">
          <h2 *hasPermission="[Role.ADMIN]" class="heading heading--sm mt-4">
            Harmonogram przypisany do: {{ dataSource.representativeEmail }}
          </h2></ng-container
        >
      </div>
    </app-schedule-table>
  </ng-container>
</app-schedule-tab>

<!-- delete confirmation modal -->
<app-confirmation-modal
  *ngIf="isDeleteConfirmationModalVisible"
  [isOutsideTable]="true"
  [message]="'Czy na pewno chcesz przywrócić zgłoszenie do realizacji?'"
  (closeDialog)="closeDialog($event)"
  (selectedItemId)="restoreScheduleToPlanning()"></app-confirmation-modal>

<ng-template #linkTemplateRef let-column>
  <a class="font-weight-bold" [href]="column.data.link">{{ column.data.link }}</a>
</ng-template>
