[CST-4499] Version history (WIP) - Version page added (redirecting to item's page)

This commit is contained in:
Davide Negretti
2021-09-13 17:56:55 +02:00
parent ce399cb764
commit b4111fe4b1
10 changed files with 185 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ import { AlertType } from '../../alert/aletr-type';
import { followLink } from '../../utils/follow-link-config.model';
import { hasValue, hasValueOperator } from '../../empty.util';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
import { getItemPageRoute, getItemVersionRoute } from '../../../item-page/item-page-routing-paths';
import { FormBuilder } from '@angular/forms';
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
import { ItemVersionsSummaryModalComponent } from './item-versions-summary-modal/item-versions-summary-modal.component';
@@ -192,6 +192,14 @@ export class ItemVersionsComponent implements OnInit {
this.versionBeingEditedId = undefined;
}
/**
* Get the route to the specified version
* @param versionId the ID of the version for which the route will be retrieved
*/
getVersionRoute(versionId: string) {
return getItemVersionRoute(versionId);
}
/**
* Applies changes to version currently being edited
*/
@@ -250,6 +258,7 @@ export class ItemVersionsComponent implements OnInit {
}
);
});
// TODO non usare subscribe annidate
/*version.item.pipe(
getFirstSucceededRemoteDataPayload(),
switchMap((getItemRes) => this.itemService.delete(getItemRes.id))