Skip to content
Snippets Groups Projects
Commit 36b240c2 authored by Etienne LOUPIAS's avatar Etienne LOUPIAS
Browse files

feat(admin): faster map display

parent 1feb7326
No related branches found
No related tags found
1 merge request!525V2.3.0
......@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Meta } from '@angular/platform-browser';
import { ActivatedRoute } from '@angular/router';
import * as _ from 'lodash';
import { Observable } from 'rxjs';
import { Observable, firstValueFrom } from 'rxjs';
import { GeoJson } from '../map/models/geojson.model';
import { Structure } from '../models/structure.model';
import { ProfileService } from '../profile/services/profile.service';
......@@ -125,7 +125,7 @@ export class CartoComponent implements OnInit {
structure = this.getStructurePosition(structure, lon, lat);
}
if (this.isAdmin) {
structure.isClaimed = await this.isClaimed(structure).toPromise();
firstValueFrom(this.isClaimed(structure)).then((isClaimed) => (isClaimed = structure.isClaimed));
}
return structure;
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment