Changes by alex

This commit is contained in:
Davide Negretti
2021-09-10 10:36:37 +02:00
parent dd2df9106c
commit ad5ace79fb

View File

@@ -40,6 +40,8 @@ import { ObjectCacheService } from '../../../core/cache/object-cache.service';
* Component listing all available versions of the history the provided item is a part of * Component listing all available versions of the history the provided item is a part of
*/ */
export class ItemVersionsComponent implements OnInit { export class ItemVersionsComponent implements OnInit {
/** /**
* The item to display a version history for * The item to display a version history for
*/ */
@@ -62,6 +64,8 @@ export class ItemVersionsComponent implements OnInit {
*/ */
@Input() displayActions: boolean; @Input() displayActions: boolean;
subs: Subscription[] = [];
/** /**
* The AlertType enumeration * The AlertType enumeration
* @type {AlertType} * @type {AlertType}
@@ -118,6 +122,38 @@ export class ItemVersionsComponent implements OnInit {
[itemId: string]: string [itemId: string]: string
}>; }>;
/**
* Emits when the versionsRD$ must be refreshed.
*/
refreshSubject = new BehaviorSubject<any>(null);
/**
* The number of the version whose summary is currently being edited
*/
versionBeingEditedNumber: string;
/**
* The id of the version whose summary is currently being edited
*/
versionBeingEditedId: string;
// itemLink: string; TODO delete
/**
* The summary currently being edited
*/
versionBeingEditedSummary: string;
/**
* Cancel the current edit when component is destroyed & unsub all subscriptions
*/
// @HostListener('document:keydown:enter')
// onSummarySubmitKeydownEvent(event: KeyboardEvent): void {
// event.preventDefault();
// }
constructor(private versionHistoryService: VersionHistoryDataService, constructor(private versionHistoryService: VersionHistoryDataService,
private versionService: VersionDataService, private versionService: VersionDataService,
private itemService: ItemDataService, private itemService: ItemDataService,