Skip to content

Commit

Permalink
fix(demo): initialize demo data last, once all config has been loaded (
Browse files Browse the repository at this point in the history
…#1831)

to ensure dashboard widgets and references are correctly loaded on first visit
  • Loading branch information
TheSlimvReal authored Apr 18, 2023
1 parent fd39bc5 commit f9d455f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/core/demo-data/demo-data.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { DemoPublicFormGeneratorService } from "../../features/public-form/demo-
const demoDataGeneratorProviders = [
...DemoPermissionGeneratorService.provider(),
...DemoPublicFormGeneratorService.provider(),
...DemoConfigGeneratorService.provider(),
...DemoUserGeneratorService.provider(),
...DemoConfigurableEnumGeneratorService.provider(),
...DemoChildGenerator.provider({ count: 120 }),
Expand All @@ -67,6 +66,8 @@ const demoDataGeneratorProviders = [
maxCountAttributes: 5,
}),
...DemoTodoGeneratorService.provider(),
// keep Demo service last to ensure all entities are already initialized
...DemoConfigGeneratorService.provider(),
];

/**
Expand Down

0 comments on commit f9d455f

Please sign in to comment.