Skip to content

Commit 26272b5

Browse files
committed
chore: add loading messages for organisation zone/metadata loading
1 parent 965e4c7 commit 26272b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

libs/common/src/lib/org/organisation.service.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222

2323
import { log, mapLastValueFrom, unique } from '../general';
2424
import { notifyError } from '../notifications';
25+
import { setLoadingMessage } from '../placeos.service';
2526
import { SettingsService } from '../settings.service';
2627
import {
2728
Building,
@@ -375,13 +376,17 @@ export class OrganisationService {
375376
* Initialise service data
376377
*/
377378
private async load(): Promise<void> {
379+
setLoadingMessage('Loading organistion data...');
378380
await this.loadOrganisation();
381+
setLoadingMessage('Loading region data...');
379382
await this.loadRegions();
380383
if (!this._regions.getValue().length) {
384+
setLoadingMessage('Loading building data...');
381385
const list = await this.loadBuildings();
382386
this._buildings.next(list);
383387
this.buildings_signal.set(list);
384388
} else {
389+
setLoadingMessage('Loading region buildings data...');
385390
for (const region of this._regions.getValue()) {
386391
const blds = await this.loadBuildings(region.id);
387392
if (blds.length) {
@@ -391,10 +396,12 @@ export class OrganisationService {
391396
}
392397
}
393398
}
399+
setLoadingMessage('Loading zone settings...');
394400
await this.loadSettings();
395401
if (!this._buildings.getValue()?.length) {
396402
log('ORG', 'Unable to find any building zones');
397403
}
404+
setLoadingMessage('Loading active building levels...');
398405
await this.loadLevels();
399406
this._updateSettingOverrides();
400407
}

0 commit comments

Comments
 (0)