mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Restore functionality, which was removed the brainless way (#2725)
This commit is contained in:
committed by
Eugenio Romano
parent
feb0e17656
commit
92ccf36eb4
@@ -37,6 +37,7 @@ Shows the details of the task id passed in input
|
|||||||
| showFormCompleteButton | boolean | true | Toggle rendering of the Form `Complete` outcome button |
|
| showFormCompleteButton | boolean | true | Toggle rendering of the Form `Complete` outcome button |
|
||||||
| peopleIconImageUrl | string | | Define a custom people icon image |
|
| peopleIconImageUrl | string | | Define a custom people icon image |
|
||||||
| showHeader | boolean | true | Toggle task details Header component |
|
| showHeader | boolean | true | Toggle task details Header component |
|
||||||
|
| showHeaderContent | boolean | true | Toggle collapsed/expanded state of the Header component |
|
||||||
| showInvolvePeople | boolean | true | Toggle `Involve People` feature for Header component |
|
| showInvolvePeople | boolean | true | Toggle `Involve People` feature for Header component |
|
||||||
| showComments | boolean | true | Toggle `Comments` feature for Header component |
|
| showComments | boolean | true | Toggle `Comments` feature for Header component |
|
||||||
| showChecklist | boolean | true | Toggle `Checklist` feature for Header component |
|
| showChecklist | boolean | true | Toggle `Checklist` feature for Header component |
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="adf-task-details-core-sidebar">
|
<div class="adf-task-details-core-sidebar">
|
||||||
<adf-info-drawer title="{{ 'ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TITLE' | translate }}" class="adf-task-details-core-sidebar-drawer">
|
<adf-info-drawer *ngIf="showHeaderContent" title="{{ 'ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TITLE' | translate }}" class="adf-task-details-core-sidebar-drawer">
|
||||||
<adf-info-drawer-tab label="{{ 'ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TAB_DETAILS_TITLE' | translate }}">
|
<adf-info-drawer-tab label="{{ 'ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TAB_DETAILS_TITLE' | translate }}">
|
||||||
<div class="assignment-container" *ngIf="showAssignee">
|
<div class="assignment-container" *ngIf="showAssignee">
|
||||||
<adf-people-search
|
<adf-people-search
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
</adf-info-drawer>
|
</adf-info-drawer>
|
||||||
|
|
||||||
<div class="adf-task-details-core-sidebar-checklist">
|
<div *ngIf="showHeaderContent" class="adf-task-details-core-sidebar-checklist">
|
||||||
<div *ngIf="showChecklist">
|
<div *ngIf="showChecklist">
|
||||||
<adf-checklist #activitichecklist
|
<adf-checklist #activitichecklist
|
||||||
[readOnly]="readOnlyForm"
|
[readOnly]="readOnlyForm"
|
||||||
|
@@ -278,6 +278,7 @@ describe('TaskDetailsComponent', () => {
|
|||||||
|
|
||||||
it('should comments be readonly if the task is complete and no user are involved', () => {
|
it('should comments be readonly if the task is complete and no user are involved', () => {
|
||||||
component.showComments = true;
|
component.showComments = true;
|
||||||
|
component.showHeaderContent = true;
|
||||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||||
component.taskPeople = [];
|
component.taskPeople = [];
|
||||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||||
@@ -289,6 +290,7 @@ describe('TaskDetailsComponent', () => {
|
|||||||
|
|
||||||
it('should comments be readonly if the task is complete and user are NOT involved', () => {
|
it('should comments be readonly if the task is complete and user are NOT involved', () => {
|
||||||
component.showComments = true;
|
component.showComments = true;
|
||||||
|
component.showHeaderContent = true;
|
||||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||||
component.taskPeople = [];
|
component.taskPeople = [];
|
||||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||||
@@ -300,6 +302,7 @@ describe('TaskDetailsComponent', () => {
|
|||||||
|
|
||||||
it('should comments NOT be readonly if the task is NOT complete and user are NOT involved', () => {
|
it('should comments NOT be readonly if the task is NOT complete and user are NOT involved', () => {
|
||||||
component.showComments = true;
|
component.showComments = true;
|
||||||
|
component.showHeaderContent = true;
|
||||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||||
component.taskPeople = [fakeUser];
|
component.taskPeople = [fakeUser];
|
||||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||||
@@ -311,6 +314,7 @@ describe('TaskDetailsComponent', () => {
|
|||||||
|
|
||||||
it('should comments NOT be readonly if the task is complete and user are involved', () => {
|
it('should comments NOT be readonly if the task is complete and user are involved', () => {
|
||||||
component.showComments = true;
|
component.showComments = true;
|
||||||
|
component.showHeaderContent = true;
|
||||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||||
component.taskPeople = [fakeUser];
|
component.taskPeople = [fakeUser];
|
||||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||||
@@ -322,6 +326,7 @@ describe('TaskDetailsComponent', () => {
|
|||||||
|
|
||||||
it('should comments be present if showComments is true', () => {
|
it('should comments be present if showComments is true', () => {
|
||||||
component.showComments = true;
|
component.showComments = true;
|
||||||
|
component.showHeaderContent = true;
|
||||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||||
component.taskPeople = [];
|
component.taskPeople = [];
|
||||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||||
|
@@ -67,6 +67,9 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
@Input()
|
@Input()
|
||||||
showHeader: boolean = true;
|
showHeader: boolean = true;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
showHeaderContent: boolean = true;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
showInvolvePeople: boolean = true;
|
showInvolvePeople: boolean = true;
|
||||||
|
|
||||||
@@ -320,6 +323,10 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
this.loadDetails(taskId);
|
this.loadDetails(taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toggleHeaderContent(): void {
|
||||||
|
this.showHeaderContent = !this.showHeaderContent;
|
||||||
|
}
|
||||||
|
|
||||||
isCompletedTask(): boolean {
|
isCompletedTask(): boolean {
|
||||||
return this.taskDetails && this.taskDetails.endDate ? true : undefined;
|
return this.taskDetails && this.taskDetails.endDate ? true : undefined;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user