<mat-tab-group>
    <mat-tab *ngFor="let weeklySummary of summary" label="{{ weeklySummary.dateFrom | date:'d.M.'}} - {{ weeklySummary.dateTo | date:'d.M.Y'}}">
        <div *ngFor="let course of weeklySummary.courses" class="card-wrapper">
            <mat-card>
                <mat-card-header>
                    <mat-card-title *ngIf="course.dateStart != null && course.dateEnd != null">
                        {{ getDayName(course.dateStart) }} - {{ getDayName(course.dateEnd) }}: {{ course.text }} 
                    </mat-card-title>
                    <mat-card-subtitle>{{ course.dateStart | date:"d.M." }} - {{ course.dateEnd | date:"d.M.Y" }}</mat-card-subtitle>
                </mat-card-header>
                <mat-card-content>
                    <div class="summary-row">
                        <span class="label">Instruktoři: </span>
                        <span class="value">{{ course.maleInstructorCount }} {{ getWordShape(course.maleInstructorCount, 'muz') }} a {{ course.femaleInstructorCount }} {{ getWordShape(course.femaleInstructorCount, 'zena') }}</span>
                    </div>
                    <div class="summary-row" *ngIf="course.filledQuestionnaire == true">
                        <span class="label">Učitelé: </span>
                        <span class="value">{{ course.maleTeacherCount }} {{ getWordShape(course.maleTeacherCount, 'muz') }} a {{ course.femaleTeacherCount }} {{ getWordShape(course.femaleTeacherCount, 'zena') }}</span>
                    </div>
                    <div class="summary-row" *ngIf="course.filledQuestionnaire == true">
                        <span class="label">Žáci: </span>
                        <span class="value">{{ course.maleStudentCount }} {{ getWordShape(course.maleStudentCount, 'kluk') }} a {{ course.femaleStudentCount }} {{ getWordShape(course.femaleStudentCount, 'holka') }}</span>
                    </div>
                    <div class="no-data" *ngIf="course.filledQuestionnaire == false">
                        škola ještě nevyplnila dotazník před kurzem
                    </div>
                </mat-card-content>
            </mat-card>
        </div>
    </mat-tab>
</mat-tab-group>
  
