mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-100] FIX - View a previous version (#5915)
* small fix, forgot to add the line when creating the last branch * fixing the wrong parameter passing * small fix, forgot to add the line when creating the last branch * fixing the wrong parameter passing * ACA-100: Exclude preview of a previous version e2e tests until ADF starts using ACS 7+ * ACA-100: Change protractor.conf.js path in Jasmine Opts * fixing the wrong parameter passing Co-authored-by: kristian <kristian.dimitrov@alfresco.com>
This commit is contained in:
@@ -181,7 +181,8 @@ export class ViewUtilService {
|
||||
|
||||
async displayNodeRendition(nodeId: string, versionId?: string) {
|
||||
try {
|
||||
const rendition = await this.resolveNodeRendition(nodeId, 'pdf', versionId);
|
||||
const rendition = versionId ? await this.resolveNodeRendition(nodeId, 'pdf', versionId) :
|
||||
await this.resolveNodeRendition(nodeId, 'pdf');
|
||||
if (rendition) {
|
||||
const renditionId = rendition.entry.id;
|
||||
|
||||
@@ -226,7 +227,7 @@ export class ViewUtilService {
|
||||
this.viewerTypeChange.next('in_creation');
|
||||
});
|
||||
}
|
||||
rendition = await this.waitNodeRendition(nodeId, renditionId, versionId);
|
||||
rendition = versionId ? await this.waitNodeRendition(nodeId, renditionId, versionId) : await this.waitNodeRendition(nodeId, renditionId);
|
||||
} catch (err) {
|
||||
this.logService.error(err);
|
||||
}
|
||||
@@ -242,7 +243,7 @@ export class ViewUtilService {
|
||||
const intervalId = setInterval(() => {
|
||||
currentRetry++;
|
||||
if (this.maxRetries >= currentRetry) {
|
||||
if (!versionId) {
|
||||
if (versionId) {
|
||||
this.apiService.versionsApi.getVersionRendition(nodeId, versionId, renditionId).then((rendition: RenditionEntry) => {
|
||||
this.handleNodeRendition(rendition, nodeId, renditionId, versionId);
|
||||
clearInterval(intervalId);
|
||||
|
Reference in New Issue
Block a user