mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-740] Add button for process attachment list (#1955)
* [ADF-740] adding button to allow user to upload related content on process instance * [ADF-740] add button for attachment content list for process * changed locatin for translation * [ADF-740] added test for add button for process attach * [ADF-740] added PR request changes
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
<div *ngIf="isCreateTaskAttachVisible()">
|
||||
<adf-create-task-attachment *ngIf="currentTaskId"
|
||||
[taskId]="currentTaskId"
|
||||
(success)="onCreateTaskSuccess ()">
|
||||
(success)="onCreateTaskSuccess()">
|
||||
</adf-create-task-attachment>
|
||||
</div>
|
||||
</div>
|
||||
@@ -155,10 +155,22 @@
|
||||
</activiti-process-instance-details>
|
||||
<hr>
|
||||
<h5>Attachments</h5>
|
||||
<div class="action-header">
|
||||
<button id="show_process_attach" class="mdl-button mdl-js-button" (click)="toggleCreateProcessAttach()">
|
||||
Attach Document
|
||||
<i class="material-icons">add</i>
|
||||
</button>
|
||||
</div>
|
||||
<adf-process-attachment-list *ngIf="currentProcessInstanceId"
|
||||
[processInstanceId]="currentProcessInstanceId"
|
||||
(attachmentClick)="onAttachmentClick($event)">
|
||||
</adf-process-attachment-list>
|
||||
<div *ngIf="isCreateProcessAttachVisible()">
|
||||
<adf-create-process-attachment *ngIf="currentProcessInstanceId"
|
||||
[processInstanceId]="currentProcessInstanceId"
|
||||
(contentCreated)="onContentCreated()">
|
||||
</adf-create-process-attachment>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mdl-cell mdl-cell--10-col task-column mdl-shadow--2dp" *ngIf="isStartProcessMode()">
|
||||
<activiti-start-process [appId]="appId" (start)="onStartProcessInstance($event)"></activiti-start-process>
|
||||
|
@@ -30,7 +30,8 @@ import {
|
||||
ActivitiProcessInstanceListComponent,
|
||||
ActivitiStartProcessInstance,
|
||||
FilterProcessRepresentationModel,
|
||||
ProcessInstance
|
||||
ProcessInstance,
|
||||
ActivitiProcessAttachmentListComponent
|
||||
} from 'ng2-activiti-processlist';
|
||||
import { AnalyticsReportListComponent } from 'ng2-activiti-analytics';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@@ -73,6 +74,9 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
||||
@ViewChild(ActivitiProcessInstanceDetails)
|
||||
activitiprocessdetails: ActivitiProcessInstanceDetails;
|
||||
|
||||
@ViewChild(ActivitiProcessAttachmentListComponent)
|
||||
processAttachList: ActivitiProcessAttachmentListComponent;
|
||||
|
||||
@ViewChild(ActivitiStartProcessInstance)
|
||||
activitiStartProcess: ActivitiStartProcessInstance;
|
||||
|
||||
@@ -105,6 +109,7 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
||||
blobFile: any;
|
||||
flag: boolean = true;
|
||||
createTaskAttach: boolean = false;
|
||||
createProcessAttach: boolean = false;
|
||||
|
||||
dataTasks: ObjectDataTableAdapter;
|
||||
dataProcesses: ObjectDataTableAdapter;
|
||||
@@ -336,6 +341,11 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
||||
this.toggleCreateTakAttach();
|
||||
}
|
||||
|
||||
onContentCreated() {
|
||||
this.processAttachList.reload();
|
||||
this.toggleCreateProcessAttach();
|
||||
}
|
||||
|
||||
toggleCreateTakAttach(): void {
|
||||
this.createTaskAttach = !this.createTaskAttach;
|
||||
}
|
||||
@@ -344,4 +354,11 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
||||
return this.createTaskAttach;
|
||||
}
|
||||
|
||||
toggleCreateProcessAttach(): void {
|
||||
this.createProcessAttach = !this.createProcessAttach;
|
||||
}
|
||||
|
||||
isCreateProcessAttachVisible(): boolean {
|
||||
return this.createProcessAttach;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user