|
1 |
| -<section class="ev-sm-container ev-view challenge-container"> |
2 |
| - |
| 1 | +<section class="ev-sm-container ev-view challenge-container noScroll"> |
3 | 2 | <!-- ongoing challenges -->
|
4 |
| - <div *ngIf="routerPublic.url === allChallengesRoutePathCommon"> |
5 |
| - <div class="challenge-page-title" id = "ongoing-challenges" ><strong class="text-med-black fs-18">Ongoing Challenges</strong></div> |
6 |
| - <div *ngIf="ongoingChallenges.length === 0">None</div> |
7 |
| - <div class="row"> |
8 |
| - <div class="col s12 m3" *ngFor="let challenge of ongoingChallenges"> |
9 |
| - <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
10 |
| - <app-challengecard [challenge]="challenge" ></app-challengecard> |
11 |
| - </a> |
12 |
| - </div> |
13 |
| - </div> |
14 |
| - </div> |
| 3 | + <div *ngIf="routerPublic.url === allChallengesRoutePathCommon" [@.disabled]="true"> |
| 4 | + <mat-tab-group> |
| 5 | + <mat-tab label="Ongoing Challenges ({{ongoingChallenges.length}})"> |
| 6 | + <div *ngIf="ongoingChallenges.length === 0" class="none">None</div> |
| 7 | + <div class="row"> |
| 8 | + <div class="col s12 m3" *ngFor="let challenge of ongoingChallenges"> |
| 9 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
| 10 | + <app-challengecard [challenge]="challenge" ></app-challengecard> |
| 11 | + </a> |
| 12 | + </div> |
| 13 | + </div> |
| 14 | + </mat-tab> |
15 | 15 |
|
16 |
| - <!-- upcoming challenges --> |
17 |
| - <div *ngIf="routerPublic.url === allChallengesRoutePathCommon"> |
18 |
| - <div class="challenge-page-title" ><strong class="text-med-black fs-18">Upcoming Challenges</strong></div> |
19 |
| - <div *ngIf="upcomingChallenges.length === 0">None</div> |
20 |
| - <div class="row"> |
21 |
| - <div class="col s12 m3" *ngFor="let challenge of upcomingChallenges"> |
22 |
| - <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
23 |
| - <app-challengecard [challenge]="challenge" ></app-challengecard> |
24 |
| - </a> |
25 |
| - </div> |
26 |
| - </div> |
27 |
| - </div> |
| 16 | + <mat-tab label="Upcoming Challenges ({{ upcomingChallenges.length }})"> |
| 17 | + <!-- upcoming challenges --> |
| 18 | + <div *ngIf="upcomingChallenges.length === 0" class="none">None</div> |
| 19 | + <div class="row"> |
| 20 | + <div class="col s12 m3" *ngFor="let challenge of upcomingChallenges"> |
| 21 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
| 22 | + <app-challengecard [challenge]="challenge" ></app-challengecard> |
| 23 | + </a> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + </mat-tab> |
28 | 27 |
|
29 |
| - <!-- past challenges --> |
30 |
| - <div *ngIf="routerPublic.url === allChallengesRoutePathCommon"> |
31 |
| - <div class="challenge-page-title" ><strong class="text-med-black fs-18">Past Challenges</strong></div> |
32 |
| - <div *ngIf="pastChallenges.length === 0">None</div> |
33 |
| - <div class="row"> |
34 |
| - <div class="col s12 m3" *ngFor="let challenge of pastChallenges"> |
35 |
| - <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
36 |
| - <app-challengecard [challenge]="challenge" ></app-challengecard> |
37 |
| - </a> |
38 |
| - </div> |
39 |
| - </div> |
| 28 | + <mat-tab label="Past Challenges ({{ pastChallenges.length }})"> |
| 29 | + <!-- past challenges --> |
| 30 | + <div *ngIf="pastChallenges.length === 0" class="none">None</div> |
| 31 | + <div class="row"> |
| 32 | + <div class="col s12 m3" *ngFor="let challenge of pastChallenges"> |
| 33 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge.id]"> |
| 34 | + <app-challengecard [challenge]="challenge" ></app-challengecard> |
| 35 | + </a> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + </mat-tab> |
| 39 | + </mat-tab-group > |
40 | 40 | </div>
|
41 |
| - |
42 |
| - |
43 |
| - <!-- my challenges --> |
44 |
| - <div *ngIf="routerPublic.url === myChallengesRoutePathCommon"> |
45 |
| - <div class="challenge-page-title" id = "ongoing-challenges" ><strong class="text-med-black fs-18">My Hosted Challenges</strong></div> |
46 |
| - <div *ngIf="!filteredChallenges.length"> |
47 |
| - You haven't hosted any challenge. Please <a [routerLink]="hostTeamsRoutePathCommon" class="highlight-link">click here</a> to host one! |
48 |
| - </div> |
49 |
| - <div class="row" *ngIf="filteredChallenges.length"> |
50 |
| - <div class="col s12 m3" *ngFor="let challenge of filteredChallenges"> |
51 |
| - <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge['id']]"> |
52 |
| - <app-challengecard [challenge]="challenge"></app-challengecard> |
53 |
| - </a> |
54 |
| - </div> |
55 |
| - </div> |
| 41 | + <!-- my challenges --> |
| 42 | + <div *ngIf="routerPublic.url === myChallengesRoutePathCommon" [@.disabled]="true"> |
| 43 | + <mat-tab-group> |
| 44 | + <mat-tab label="My Ongoing Challenges ({{ filteredOngoingChallenges.length }})"> |
| 45 | + <div class="challenge-page-title" id = "ongoing-challenges" ><strong class="text-med-black fs-18">My Hosted Challenges</strong></div> |
| 46 | + <div *ngIf="!filteredOngoingChallenges.length"> |
| 47 | + You haven't hosted any challenge. Please <a [routerLink]="hostTeamsRoutePathCommon" class="highlight-link">click here</a> to host one! |
| 48 | + </div> |
| 49 | + <div class="row" *ngIf="filteredOngoingChallenges.length"> |
| 50 | + <div class="col s12 m3" *ngFor="let challenge of filteredOngoingChallenges"> |
| 51 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge['id']]"> |
| 52 | + <app-challengecard [challenge]="challenge"></app-challengecard> |
| 53 | + </a> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + </mat-tab> |
| 57 | + <mat-tab label="My Upcoming Challenges ({{ filteredUpcomingChallenges.length }})"> |
| 58 | + <div class="challenge-page-title" id = "ongoing-challenges" ><strong class="text-med-black fs-18">My Hosted Challenges</strong></div> |
| 59 | + <div *ngIf="!filteredUpcomingChallenges.length"> |
| 60 | + You haven't hosted any challenge. Please <a [routerLink]="hostTeamsRoutePathCommon" class="highlight-link">click here</a> to host one! |
| 61 | + </div> |
| 62 | + <div class="row" *ngIf="filteredUpcomingChallenges.length"> |
| 63 | + <div class="col s12 m3" *ngFor="let challenge of filteredUpcomingChallenges"> |
| 64 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge['id']]"> |
| 65 | + <app-challengecard [challenge]="challenge"></app-challengecard> |
| 66 | + </a> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + </mat-tab> |
| 70 | + <mat-tab label="My Past Challenges ({{ filteredPastChallenges.length }})"> |
| 71 | + <div class="challenge-page-title" id = "ongoing-challenges" ><strong class="text-med-black fs-18">My Hosted Challenges</strong></div> |
| 72 | + <div *ngIf="!filteredPastChallenges.length"> |
| 73 | + You haven't hosted any challenge. Please <a [routerLink]="hostTeamsRoutePathCommon" class="highlight-link">click here</a> to host one! |
| 74 | + </div> |
| 75 | + <div class="row" *ngIf="filteredPastChallenges.length"> |
| 76 | + <div class="col s12 m3" *ngFor="let challenge of filteredPastChallenges"> |
| 77 | + <a class="ev-card-hover" [routerLink]="[challengeRoutePathCommon,challenge['id']]"> |
| 78 | + <app-challengecard [challenge]="challenge"></app-challengecard> |
| 79 | + </a> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </mat-tab> |
| 83 | + </mat-tab-group> |
56 | 84 | </div>
|
57 |
| - |
58 | 85 | </section>
|
0 commit comments