mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
feat: show feedback when map search yields no results
This commit is contained in:
committed by
Rainer Killinger
parent
488150f7f5
commit
c54ea867bd
@@ -249,6 +249,15 @@ export class MapPageComponent {
|
|||||||
this.filterQuery,
|
this.filterQuery,
|
||||||
this.queryText,
|
this.queryText,
|
||||||
);
|
);
|
||||||
|
if (result.data.length === 0) {
|
||||||
|
const alert = await this.alertController.create({
|
||||||
|
buttons: [this.translateService.instant('ok')],
|
||||||
|
header: this.translateService.instant('map.page.NO_RESULTS'),
|
||||||
|
});
|
||||||
|
await alert.present();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
// override items with results
|
// override items with results
|
||||||
this.items = result.data as SCPlace[];
|
this.items = result.data as SCPlace[];
|
||||||
this.addToMap(result.data as Array<SCBuilding | SCRoom>, true, animate);
|
this.addToMap(result.data as Array<SCBuilding | SCRoom>, true, animate);
|
||||||
|
|||||||
Reference in New Issue
Block a user