Skip to content

Commit

Permalink
Add VAPP quota loading indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian committed Aug 30, 2024
1 parent e3676de commit cce4822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/vehicle-add/vehicle-add.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2 class="card-header h5 mt-0 mb-0">{{'add_vehicle_pass'|translate}}</h2>
<div class="col-md-6">

<div class="card mb-4">
<h2 class="card-header h5 mt-0 mb-0">{{'zone_quotas'|translate}}</h2>
<h2 class="card-header h5 mt-0 mb-0">{{'zone_quotas'|translate}} <small *ngIf="loadingQuota > 0" class="text-muted font-weight-normal">{{'loading'|translate}}...</small></h2>
<div class="card-body">

<div *ngFor="let zone of zones" class="mb-2">
Expand Down
3 changes: 3 additions & 0 deletions src/app/vehicle-add/vehicle-add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class VehicleAddComponent extends WsComponent implements OnInit {
private selectedEvent: Event;

loading = false;
loadingQuota = 0;

delegateTypes: DelegateType[];
vehicleGroups: VehicleGroup[];
Expand Down Expand Up @@ -65,9 +66,11 @@ export class VehicleAddComponent extends WsComponent implements OnInit {

// loop zones and load usage
this.zones.forEach(zone => {
this.loadingQuota++;
this.subscribe(
this.zoneService.get(this.selectedEvent.id, zone.id).subscribe(res => {
zone.usage = res.usage;
this.loadingQuota--;
})
)
});
Expand Down

0 comments on commit cce4822

Please sign in to comment.