Fixed default colors loading
This commit is contained in:
parent
29f92e060b
commit
bf1356bbe5
@ -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<ListItem> {
|
||||
export class DefaultColorsScreenComponent extends ListingComponent<ListItem> implements OnInit {
|
||||
readonly circleButtonTypes = CircleButtonTypes;
|
||||
readonly currentUser = this._userService.currentUser;
|
||||
readonly translations = defaultColorsTranslations;
|
||||
@ -69,6 +69,10 @@ export class DefaultColorsScreenComponent extends ListingComponent<ListItem> {
|
||||
);
|
||||
}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
await this._loadColors();
|
||||
}
|
||||
|
||||
private async _loadColors() {
|
||||
this._loadingService.start();
|
||||
const data = await firstValueFrom(this._dictionaryService.getColors(this.#dossierTemplateId));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user