Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
880 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core';
import { AppDto, HistoryEventDto, HistoryService } from '@app/shared';
import { Observable } from 'rxjs';
@Component({
selector: 'sqx-history-card[app]',
styleUrls: ['./history-card.component.scss'],
templateUrl: './history-card.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HistoryCardComponent implements OnChanges {
@Input()
public app!: AppDto;
public history?: Observable<ReadonlyArray<HistoryEventDto>>;
constructor(
private readonly historyService: HistoryService,
) {
}
public ngOnChanges() {
this.history = this.historyService.getHistory(this.app.name, '');
}
}