mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Remove sidebar functionality from task details (#2719)
This commit is contained in:
committed by
Eugenio Romano
parent
440759c66b
commit
16428a8109
@@ -10,19 +10,15 @@
|
||||
<div *ngIf="taskDetails" class="adf-task-details">
|
||||
|
||||
<div *ngIf="showHeader" class="adf-task-details-header">
|
||||
<h2 class="activiti-task-details__header" (click)="toggleHeaderContent()">
|
||||
<h2 class="activiti-task-details__header">
|
||||
<span>{{taskDetails.name || 'No name'}}</span>
|
||||
</h2>
|
||||
<div matRipple [matRippleUnbounded]="true" [matRippleCentered]="true" class="adf-task-details-header-toggle">
|
||||
<mat-icon *ngIf="!showHeaderContent" (click)="toggleHeaderContent()">web</mat-icon>
|
||||
<mat-icon *ngIf="showHeaderContent" (click)="toggleHeaderContent()">web_asset</mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="adf-task-details-core"
|
||||
fxLayout="column"
|
||||
fxLayoutGap="8px"
|
||||
fxLayout.lt-lg="column">
|
||||
fxLayout="column"
|
||||
fxLayoutGap="8px"
|
||||
fxLayout.lt-lg="column">
|
||||
|
||||
<div class="adf-task-details-core-form">
|
||||
<div *ngIf="isAssigned()">
|
||||
@@ -54,11 +50,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="adf-task-details-core-sidebar">
|
||||
<adf-info-drawer *ngIf="showHeaderContent" title="{{ 'ADF_TASK_LIST.DETAILS.LABELS.INFO_DRAWER_TITLE' | translate }}" class="adf-task-details-core-sidebar-drawer">
|
||||
<div info-drawer-buttons>
|
||||
<mat-icon (click)="toggleHeaderContent()">clear</mat-icon>
|
||||
</div>
|
||||
|
||||
<adf-info-drawer 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 }}">
|
||||
<div class="assignment-container" *ngIf="showAssignee">
|
||||
<adf-people-search
|
||||
@@ -99,7 +91,7 @@
|
||||
|
||||
</adf-info-drawer>
|
||||
|
||||
<div *ngIf="showHeaderContent" class="adf-task-details-core-sidebar-checklist">
|
||||
<div class="adf-task-details-core-sidebar-checklist">
|
||||
<div *ngIf="showChecklist">
|
||||
<adf-checklist #activitichecklist
|
||||
[readOnly]="readOnlyForm"
|
||||
|
@@ -278,7 +278,6 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
it('should comments be readonly if the task is complete and no user are involved', () => {
|
||||
component.showComments = true;
|
||||
component.showHeaderContent = true;
|
||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||
component.taskPeople = [];
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||
@@ -290,7 +289,6 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
it('should comments be readonly if the task is complete and user are NOT involved', () => {
|
||||
component.showComments = true;
|
||||
component.showHeaderContent = true;
|
||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||
component.taskPeople = [];
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||
@@ -302,7 +300,6 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
it('should comments NOT be readonly if the task is NOT complete and user are NOT involved', () => {
|
||||
component.showComments = true;
|
||||
component.showHeaderContent = true;
|
||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||
component.taskPeople = [fakeUser];
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||
@@ -314,7 +311,6 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
it('should comments NOT be readonly if the task is complete and user are involved', () => {
|
||||
component.showComments = true;
|
||||
component.showHeaderContent = true;
|
||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||
component.taskPeople = [fakeUser];
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||
@@ -326,7 +322,6 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
it('should comments be present if showComments is true', () => {
|
||||
component.showComments = true;
|
||||
component.showHeaderContent = true;
|
||||
component.ngOnChanges({'taskId': new SimpleChange('123', '456', true)});
|
||||
component.taskPeople = [];
|
||||
component.taskDetails = new TaskDetailsModel(taskDetailsMock);
|
||||
|
@@ -67,9 +67,6 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
@Input()
|
||||
showHeader: boolean = true;
|
||||
|
||||
@Input()
|
||||
showHeaderContent: boolean = true;
|
||||
|
||||
@Input()
|
||||
showInvolvePeople: boolean = true;
|
||||
|
||||
@@ -323,10 +320,6 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
this.loadDetails(taskId);
|
||||
}
|
||||
|
||||
toggleHeaderContent(): void {
|
||||
this.showHeaderContent = !this.showHeaderContent;
|
||||
}
|
||||
|
||||
isCompletedTask(): boolean {
|
||||
return this.taskDetails && this.taskDetails.endDate ? true : undefined;
|
||||
}
|
||||
|
Reference in New Issue
Block a user