diff --git a/src/app/vehicle-add/vehicle-add.component.html b/src/app/vehicle-add/vehicle-add.component.html index c9d2148..d4d1c28 100644 --- a/src/app/vehicle-add/vehicle-add.component.html +++ b/src/app/vehicle-add/vehicle-add.component.html @@ -60,7 +60,7 @@

{{'add_vehicle_pass'|translate}}

-

{{'zone_quotas'|translate}}

+

{{'zone_quotas'|translate}} {{'loading'|translate}}...

diff --git a/src/app/vehicle-add/vehicle-add.component.ts b/src/app/vehicle-add/vehicle-add.component.ts index 2caf186..4c7aa29 100644 --- a/src/app/vehicle-add/vehicle-add.component.ts +++ b/src/app/vehicle-add/vehicle-add.component.ts @@ -23,6 +23,7 @@ export class VehicleAddComponent extends WsComponent implements OnInit { private selectedEvent: Event; loading = false; + loadingQuota = 0; delegateTypes: DelegateType[]; vehicleGroups: VehicleGroup[]; @@ -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--; }) ) });