mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
[ADF-1002] Move the UploadService from the upload to core component and share it with the Process service (#2055)
* use the same upload component between the content and process service * Create a BaseUploadServe inside the core The AlfrescoUpload should extend the BaseUpload * Improve the code * Move the process service from the demo shell to form component * Merge [ADF-917] added exlcluded files into app config to prevent special files * Remove typo * Fix import * Fix FileModel import * Fix Denys comment * Fix unit test with the new path of UploadService * Add missing implementation
This commit is contained in:
committed by
Denys Vuika
parent
69b835a86d
commit
990865a701
@@ -64,13 +64,23 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
this.loadAttachmentsByTaskId(this.taskId);
|
||||
}
|
||||
|
||||
add(content: any): void {
|
||||
this.attachments.push({
|
||||
id: content.id,
|
||||
name: content.name,
|
||||
created: content.created,
|
||||
createdBy: content.createdBy.firstName + ' ' + content.createdBy.lastName,
|
||||
icon: this.thumbnailService.getMimeTypeIcon(content.mimeType)
|
||||
});
|
||||
}
|
||||
|
||||
private loadAttachmentsByTaskId(taskId: string) {
|
||||
if (taskId) {
|
||||
this.reset();
|
||||
this.activitiContentService.getTaskRelatedContent(taskId).subscribe(
|
||||
(res: any) => {
|
||||
let attachList = [];
|
||||
res.data.forEach(content => {
|
||||
this.attachments.push({
|
||||
attachList.push({
|
||||
id: content.id,
|
||||
name: content.name,
|
||||
created: content.created,
|
||||
@@ -78,6 +88,7 @@ export class TaskAttachmentListComponent implements OnChanges {
|
||||
icon: this.thumbnailService.getMimeTypeIcon(content.mimeType)
|
||||
});
|
||||
});
|
||||
this.attachments = attachList;
|
||||
this.success.emit(this.attachments);
|
||||
},
|
||||
(err) => {
|
||||
|
Reference in New Issue
Block a user