mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Disable upload attachment when the task is completed (#1987)
This commit is contained in:
committed by
Eugenio Romano
parent
4de13305b1
commit
f5b94e1bb4
@@ -72,10 +72,11 @@
|
|||||||
(taskDeleted)="onTaskDeleted($event)">
|
(taskDeleted)="onTaskDeleted($event)">
|
||||||
</activiti-task-details>
|
</activiti-task-details>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div id="attachment-task-list" *ngIf="currentTaskId">
|
||||||
<h5>Attachments</h5>
|
<h5>Attachments</h5>
|
||||||
<div class="adf-no-form-container">
|
<div class="adf-no-form-container">
|
||||||
<div class="action-header">
|
<div class="action-header">
|
||||||
<button class="mdl-button mdl-js-button" (click)="toggleCreateTakAttach()">
|
<button [attr.disabled]="isTaskCompleted()" class="mdl-button mdl-js-button" (click)="toggleCreateTakAttach()">
|
||||||
Attach Document
|
Attach Document
|
||||||
<i class="material-icons">add</i>
|
<i class="material-icons">add</i>
|
||||||
</button>
|
</button>
|
||||||
@@ -95,6 +96,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
@@ -154,6 +156,7 @@
|
|||||||
(taskClick)="onProcessDetailsTaskClick($event)">
|
(taskClick)="onProcessDetailsTaskClick($event)">
|
||||||
</activiti-process-instance-details>
|
</activiti-process-instance-details>
|
||||||
<hr>
|
<hr>
|
||||||
|
<div id="attachment-process-list" *ngIf="currentProcessInstanceId">
|
||||||
<h5>Attachments</h5>
|
<h5>Attachments</h5>
|
||||||
<div class="action-header">
|
<div class="action-header">
|
||||||
<button id="show_process_attach" class="mdl-button mdl-js-button" (click)="toggleCreateProcessAttach()">
|
<button id="show_process_attach" class="mdl-button mdl-js-button" (click)="toggleCreateProcessAttach()">
|
||||||
@@ -172,6 +175,7 @@
|
|||||||
</adf-create-process-attachment>
|
</adf-create-process-attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="mdl-cell mdl-cell--10-col task-column mdl-shadow--2dp" *ngIf="isStartProcessMode()">
|
<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>
|
<activiti-start-process [appId]="appId" (start)="onStartProcessInstance($event)"></activiti-start-process>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -20,6 +20,7 @@ import {
|
|||||||
ActivitiApps,
|
ActivitiApps,
|
||||||
ActivitiFilters,
|
ActivitiFilters,
|
||||||
ActivitiTaskList,
|
ActivitiTaskList,
|
||||||
|
ActivitiTaskDetails,
|
||||||
FilterRepresentationModel,
|
FilterRepresentationModel,
|
||||||
TaskDetailsEvent,
|
TaskDetailsEvent,
|
||||||
TaskAttachmentListComponent
|
TaskAttachmentListComponent
|
||||||
@@ -74,6 +75,9 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
|||||||
@ViewChild(ActivitiProcessInstanceDetails)
|
@ViewChild(ActivitiProcessInstanceDetails)
|
||||||
activitiprocessdetails: ActivitiProcessInstanceDetails;
|
activitiprocessdetails: ActivitiProcessInstanceDetails;
|
||||||
|
|
||||||
|
@ViewChild(ActivitiTaskDetails)
|
||||||
|
activitidetails: ActivitiTaskDetails;
|
||||||
|
|
||||||
@ViewChild(ActivitiProcessAttachmentListComponent)
|
@ViewChild(ActivitiProcessAttachmentListComponent)
|
||||||
processAttachList: ActivitiProcessAttachmentListComponent;
|
processAttachList: ActivitiProcessAttachmentListComponent;
|
||||||
|
|
||||||
@@ -361,4 +365,8 @@ export class ActivitiDemoComponent implements AfterViewInit {
|
|||||||
isCreateProcessAttachVisible(): boolean {
|
isCreateProcessAttachVisible(): boolean {
|
||||||
return this.createProcessAttach;
|
return this.createProcessAttach;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isTaskCompleted(): boolean {
|
||||||
|
return this.activitidetails.isCompletedTask();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -296,4 +296,8 @@ export class ActivitiTaskDetails implements OnInit, OnChanges {
|
|||||||
toggleHeaderContent() {
|
toggleHeaderContent() {
|
||||||
this.showHeaderContent = !this.showHeaderContent;
|
this.showHeaderContent = !this.showHeaderContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isCompletedTask(): boolean {
|
||||||
|
return this.taskDetails && this.taskDetails.endDate ? true : undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user