mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2055] Ability to pre-populate form with a file and values (#2834)
* fix translations form * fix style webpack script * fix tslint error problem in viewer * fix naming problems in attach file widget * add start process form values data initialization option * fix translation problems * missing return type * start process name configuration * add CS cross PS configuration * start process from file example * fix minor issues * add documentation and move the dialog in a separate component * easy test select app * alfrescoRepositoryName right property * file conversion test * fix issue after CR * Remove forgotten semicolon.
This commit is contained in:
@@ -458,17 +458,21 @@ export class ViewerComponent implements OnChanges {
|
||||
await this.renditionService.convert(nodeId, 'pdf').toPromise();
|
||||
this.viewerType = 'pdf';
|
||||
this.urlFileContent = this.apiService.contentApi.getRenditionUrl(nodeId, 'pdf');
|
||||
} catch {
|
||||
} catch (error) {
|
||||
this.logService.error(error);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
} catch (error) {
|
||||
this.logService.error(error);
|
||||
|
||||
try {
|
||||
const imagePreview = await this.apiService.renditionsApi.getRendition(nodeId, 'imgpreview');
|
||||
if (imagePreview.entry.status.toString() === 'CREATED') {
|
||||
this.viewerType = 'image';
|
||||
this.urlFileContent = this.apiService.contentApi.getRenditionUrl(nodeId, 'imgpreview');
|
||||
}
|
||||
} catch {
|
||||
} catch (error) {
|
||||
this.logService.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,14 +488,16 @@ export class ViewerComponent implements OnChanges {
|
||||
this.viewerType = 'pdf';
|
||||
this.urlFileContent = this.apiService.contentApi.getSharedLinkRenditionUrl(sharedId, 'pdf');
|
||||
}
|
||||
} catch {
|
||||
} catch (error) {
|
||||
this.logService.error(error);
|
||||
try {
|
||||
const rendition = await this.apiService.renditionsApi.getSharedLinkRendition(sharedId, 'imgpreview');
|
||||
if (rendition.entry.status.toString() === 'CREATED') {
|
||||
this.viewerType = 'image';
|
||||
this.urlFileContent = this.apiService.contentApi.getSharedLinkRenditionUrl(sharedId, 'imgpreview');
|
||||
}
|
||||
} catch {
|
||||
} catch (error) {
|
||||
this.logService.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user