Skip to content

Commit

Permalink
feat: preload territories
Browse files Browse the repository at this point in the history
  • Loading branch information
TitoMoi committed Apr 17, 2024
1 parent 71de40e commit 44397af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ export class CreateUpdateTerritoryComponent implements OnInit, AfterViewInit, On
this.matSnackBar.open(
this.translocoService.translate("COPIED"),
this.translocoService.translate("CLOSE"),
{ duration: 2000 },
{ duration: 3000, verticalPosition: "top" },
);
this.cdr.detectChanges();
}
Expand Down
11 changes: 11 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import { RoomService } from "app/room/service/room.service";
import { ParticipantService } from "app/participant/service/participant.service";
import { AssignTypeService } from "app/assigntype/service/assigntype.service";
import { AssignmentService } from "app/assignment/service/assignment.service";
import { PolygonService } from "app/map/territory/service/polygon.service";
import { TerritoryService } from "app/map/territory/service/territory.service";
import { TerritoryGroupService } from "app/map/territory-group/service/territory-group.service";

bootstrapApplication(AppComponent, {
providers: [
Expand All @@ -33,6 +36,10 @@ bootstrapApplication(AppComponent, {
const participantService = inject(ParticipantService);
const assignmentService = inject(AssignmentService);

const polygonService = inject(PolygonService);
const territoryService = inject(TerritoryService);
const territoryGroupService = inject(TerritoryGroupService);

// Get the online object status
const onlineObj = onlineService.getOnline();

Expand All @@ -46,6 +53,10 @@ bootstrapApplication(AppComponent, {
participantService.getParticipants();
assignmentService.getAssignments();

polygonService.getPolygons();
territoryService.getTerritories();
territoryGroupService.getTerritoryGroups();

return () =>
configService.getConfigAsync().then((config) => {
configService.config = config;
Expand Down

0 comments on commit 44397af

Please sign in to comment.