Skip to content

Commit

Permalink
Add loading spinner for activity dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
NereusWB922 committed Mar 20, 2024
1 parent ff83ab0 commit 5fc6267
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 35 deletions.
6 changes: 6 additions & 0 deletions src/app/activity-dashboard/activity-dashboard.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
display: flex;
overflow-x: auto;
}

.loading-spinner {
display: flex;
justify-content: center;
align-items: center;
}
76 changes: 41 additions & 35 deletions src/app/activity-dashboard/activity-dashboard.component.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
<div>
<mat-grid-list cols="4" rowHeight="80px">
<mat-grid-tile>
<div class="grid-flush-left">
<h1 class="mat-headline" style="margin: 0px">Activity</h1>
</div>
</mat-grid-tile>
<div class="loading-spinner" *ngIf="this.viewService.isChangingRepo | async; else elseBlock">
<mat-progress-spinner color="primary" mode="indeterminate" diameter="50" strokeWidth="5"> </mat-progress-spinner>
</div>

<mat-grid-tile>
<mat-form-field appearance="fill">
<mat-label>Start Date</mat-label>
<input matInput [min]="startMinDate" [max]="startMaxDate" [matDatepicker]="startPicker" (dateChange)="pickStartDate($event)" />
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="startPicker"></mat-datepicker-toggle>
<mat-datepicker startView="year" #startPicker></mat-datepicker>
</mat-form-field>
</mat-grid-tile>
<ng-template #elseBlock>
<mat-grid-list cols="4" rowHeight="80px">
<mat-grid-tile>
<div class="grid-flush-left">
<h1 class="mat-headline" style="margin: 0px">Activity</h1>
</div>
</mat-grid-tile>

<mat-grid-tile>
<mat-form-field appearance="fill">
<mat-label>End Date</mat-label>
<input matInput [min]="endMinDate" [max]="endMaxDate" [matDatepicker]="endPicker" (dateChange)="pickEndDate($event)" />
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="endPicker"></mat-datepicker-toggle>
<mat-datepicker startView="year" #endPicker></mat-datepicker>
</mat-form-field>
</mat-grid-tile>
</mat-grid-list>
</div>
<mat-grid-tile>
<mat-form-field appearance="fill">
<mat-label>Start Date</mat-label>
<input matInput [min]="startMinDate" [max]="startMaxDate" [matDatepicker]="startPicker" (dateChange)="pickStartDate($event)" />
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="startPicker"></mat-datepicker-toggle>
<mat-datepicker startView="year" #startPicker></mat-datepicker>
</mat-form-field>
</mat-grid-tile>

<mat-grid-tile>
<mat-form-field appearance="fill">
<mat-label>End Date</mat-label>
<input matInput [min]="endMinDate" [max]="endMaxDate" [matDatepicker]="endPicker" (dateChange)="pickEndDate($event)" />
<mat-hint>MM/DD/YYYY</mat-hint>
<mat-datepicker-toggle matSuffix [for]="endPicker"></mat-datepicker-toggle>
<mat-datepicker startView="year" #endPicker></mat-datepicker>
</mat-form-field>
</mat-grid-tile>
</mat-grid-list>

<div class="event-tables-wrapper">
<app-event-tables
*ngFor="let assignee of assignees"
class="issue-table"
[actor]="assignee"
[columnsToDisplay]="this.displayedColumns"
[expandedColumnsToDisplay]="this.expandedColumns"
[actions]="this.actionButtons"
></app-event-tables>
<div class="event-tables-wrapper">
<app-event-tables
*ngFor="let assignee of assignees"
class="issue-table"
[actor]="assignee"
[columnsToDisplay]="this.displayedColumns"
[expandedColumnsToDisplay]="this.expandedColumns"
[actions]="this.actionButtons"
></app-event-tables>
</div>
</ng-template>
</div>

0 comments on commit 5fc6267

Please sign in to comment.