diff --git a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts index 01b68220f..f48122ed9 100644 --- a/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/default-colors/default-colors-screen.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, forwardRef, Injector } from '@angular/core'; +import { ChangeDetectionStrategy, Component, forwardRef, Injector, OnInit } from '@angular/core'; import { DefaultColorType, IColors } from '@red/domain'; import { AdminDialogService } from '../../services/admin-dialog.service'; import { @@ -29,7 +29,7 @@ interface ListItem extends IListable { changeDetection: ChangeDetectionStrategy.OnPush, providers: [...DefaultListingServices, { provide: ListingComponent, useExisting: forwardRef(() => DefaultColorsScreenComponent) }], }) -export class DefaultColorsScreenComponent extends ListingComponent { +export class DefaultColorsScreenComponent extends ListingComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; readonly currentUser = this._userService.currentUser; readonly translations = defaultColorsTranslations; @@ -69,6 +69,10 @@ export class DefaultColorsScreenComponent extends ListingComponent { ); } + async ngOnInit(): Promise { + await this._loadColors(); + } + private async _loadColors() { this._loadingService.start(); const data = await firstValueFrom(this._dictionaryService.getColors(this.#dossierTemplateId));