|
|
|
@@ -13,110 +13,112 @@ |
|
|
|
<div class="taskCompactModeBox" (click)="switchTaskCompactMode()" |
|
|
|
[class.taskCompactMode]="taskCompactMode">{{ 'overview.compact-view' | translate }} |
|
|
|
</div> |
|
|
|
<div class="taskCompactModeBox ms-3" (click)="switchTaskHideDone()" |
|
|
|
[class.taskHideDone]="taskHideCompleted">{{ 'overview.show-done' | translate }} |
|
|
|
<div class="taskCompactModeBox ms-3" (click)="switchTaskHideCompleted()" |
|
|
|
[class.taskHideCompleted]="showCompletedTasks">{{ 'overview.show-done' | translate }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="tasks pb-1" *ngFor="let task of tasks"> |
|
|
|
<ng-container *ngIf="!taskHideCompleted || !task.completed"> |
|
|
|
<div class="card ps-3 pe-3 pt-3" [ngClass]="{'task-completed': task.completed}" *ngIf="taskCompactMode"> |
|
|
|
<div class="row pb-1"> |
|
|
|
<div class="col-12"> |
|
|
|
<div class="info-box"> |
|
|
|
<span class="importance" [attr.data-importance]="task.prio"></span> |
|
|
|
<span class="due-date pe-3">{{ task.dueAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} |
|
|
|
Uhr</span> |
|
|
|
<h3 class="m-0 pe-3" *ngIf="task.partner"> |
|
|
|
<ng-container *ngFor="let task of tasks"> |
|
|
|
<ng-container *ngIf="!task.completed || showCompletedTasks"> |
|
|
|
<div class="tasks pb-1"> |
|
|
|
<div class="card ps-3 pe-3 pt-3" [ngClass]="{'task-completed': task.completed}" *ngIf="taskCompactMode"> |
|
|
|
<div class="row pb-1"> |
|
|
|
<div class="col-12"> |
|
|
|
<div class="info-box"> |
|
|
|
<span class="importance" [attr.data-importance]="task.prio"></span> |
|
|
|
<span class="due-date pe-3">{{ task.dueAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} |
|
|
|
Uhr</span> |
|
|
|
<h3 class="m-0 pe-3" *ngIf="task.partner"> |
|
|
|
<app-linked-label [partner]="task.partner"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<h3 class="m-0 pe-3" *ngIf="task.product"> |
|
|
|
<app-linked-label [product]="task.product"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<p class="m-0" *ngIf="task.assignedTo"> |
|
|
|
<app-linked-label [user]="task.assignedTo"></app-linked-label> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="row spt-compact"> |
|
|
|
<div class="col-12 col-md-4"> |
|
|
|
<h2 class="m-0">{{ task.headline }}</h2> |
|
|
|
</div> |
|
|
|
<div class="col-12 col-md-8"> |
|
|
|
<p class="m-0 mb-3 mt-2" |
|
|
|
[innerHTML]="appHelperService.getSafeLongtext(task.description)"></p> |
|
|
|
<span *ngIf="task.createdBy === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" (click)="openModalEditTask(task)"></span> |
|
|
|
<div class="spt-comments-box d-flex justify-content-end mt-1 position-absolute"> |
|
|
|
<span *ngIf="task.numTaskNotes !== undefined && task.numTaskNotes !== null && task.numTaskNotes > 0" |
|
|
|
role="button" class="spt-btn-low badge bg-secondary p-2 me-2" |
|
|
|
(click)="showTaskNotes(task)"> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && taskNotesVisibility.get(task.id)">{{ 'basic.hide-comments' | translate }}</ng-container> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && !taskNotesVisibility.get(task.id)">{{ 'basic.show-comments' | translate }} |
|
|
|
({{ task.numTaskNotes }})</ng-container> |
|
|
|
</span> |
|
|
|
<span role="button" class="badge bg-secondary p-2" |
|
|
|
(click)="openModalNewTaskNote(task)">{{ 'basic.comment-it' | translate }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="card p-3" [ngClass]="{'task-completed': task.completed}" *ngIf="!taskCompactMode"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-12 col-sm-6 col-lg-4"> |
|
|
|
<span class="due-date">{{ task.dueAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} Uhr</span> |
|
|
|
<h3 class="m-0" *ngIf="task.partner"> |
|
|
|
<app-linked-label [partner]="task.partner"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<h3 class="m-0 pe-3" *ngIf="task.product"> |
|
|
|
<h3 class="m-0" *ngIf="task.product"> |
|
|
|
<app-linked-label [product]="task.product"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<p class="m-0" *ngIf="task.assignedTo"> |
|
|
|
<p *ngIf="task.assignedTo"> |
|
|
|
<app-linked-label [user]="task.assignedTo"></app-linked-label> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="row spt-compact"> |
|
|
|
<div class="col-12 col-md-4"> |
|
|
|
<h2 class="m-0">{{ task.headline }}</h2> |
|
|
|
</div> |
|
|
|
<div class="col-12 col-md-8"> |
|
|
|
<p class="m-0 mb-3 mt-2" |
|
|
|
[innerHTML]="appHelperService.getSafeLongtext(task.description)"></p> |
|
|
|
<span *ngIf="task.createdBy === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" (click)="openModalEditTask(task)"></span> |
|
|
|
<div class="spt-comments-box d-flex justify-content-end mt-1 position-absolute"> |
|
|
|
<span *ngIf="task.numTaskNotes !== undefined && task.numTaskNotes !== null && task.numTaskNotes > 0" |
|
|
|
role="button" class="spt-btn-low badge bg-secondary p-2 me-2" |
|
|
|
(click)="showTaskNotes(task)"> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && taskNotesVisibility.get(task.id)">{{ 'basic.hide-comments' | translate }}</ng-container> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && !taskNotesVisibility.get(task.id)">{{ 'basic.show-comments' | translate }} |
|
|
|
({{ task.numTaskNotes }})</ng-container> |
|
|
|
</span> |
|
|
|
<span role="button" class="badge bg-secondary p-2" |
|
|
|
(click)="openModalNewTaskNote(task)">{{ 'basic.comment-it' | translate }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="card p-3" [ngClass]="{'task-completed': task.completed}" *ngIf="!taskCompactMode"> |
|
|
|
<div class="row"> |
|
|
|
<div class="col-12 col-sm-6 col-lg-4"> |
|
|
|
<span class="due-date">{{ task.dueAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} Uhr</span> |
|
|
|
<h3 class="m-0" *ngIf="task.partner"> |
|
|
|
<app-linked-label [partner]="task.partner"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<h3 class="m-0" *ngIf="task.product"> |
|
|
|
<app-linked-label [product]="task.product"></app-linked-label> |
|
|
|
</h3> |
|
|
|
<p *ngIf="task.assignedTo"> |
|
|
|
<app-linked-label [user]="task.assignedTo"></app-linked-label> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
<div class="spt-border col-12 col-sm-6 col-lg-8"> |
|
|
|
<span class="importance" [attr.data-importance]="task.prio"></span> |
|
|
|
<h2 class="m-0">{{ task.headline }}</h2> |
|
|
|
<p class="m-0" [innerHTML]="appHelperService.getSafeLongtext(task.description)"></p> |
|
|
|
<span *ngIf="task.createdBy === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" (click)="openModalEditTask(task)"></span> |
|
|
|
<div class="spt-comments-box d-flex justify-content-end mt-1 position-absolute"> |
|
|
|
<span *ngIf="task.numTaskNotes !== undefined && task.numTaskNotes !== null && task.numTaskNotes > 0" |
|
|
|
role="button" class="spt-btn-low badge bg-secondary p-2 me-2" |
|
|
|
(click)="showTaskNotes(task)"> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && taskNotesVisibility.get(task.id)">{{ 'basic.hide-comments' | translate }}</ng-container> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && !taskNotesVisibility.get(task.id)">{{ 'basic.show-comments' | translate }} |
|
|
|
({{ task.numTaskNotes }})</ng-container> |
|
|
|
</span> |
|
|
|
<span role="button" class="badge bg-secondary p-2" |
|
|
|
(click)="openModalNewTaskNote(task)">{{ 'basic.comment-it' | translate }}</span> |
|
|
|
<div class="spt-border col-12 col-sm-6 col-lg-8"> |
|
|
|
<span class="importance" [attr.data-importance]="task.prio"></span> |
|
|
|
<h2 class="m-0">{{ task.headline }}</h2> |
|
|
|
<p class="m-0" [innerHTML]="appHelperService.getSafeLongtext(task.description)"></p> |
|
|
|
<span *ngIf="task.createdBy === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" (click)="openModalEditTask(task)"></span> |
|
|
|
<div class="spt-comments-box d-flex justify-content-end mt-1 position-absolute"> |
|
|
|
<span *ngIf="task.numTaskNotes !== undefined && task.numTaskNotes !== null && task.numTaskNotes > 0" |
|
|
|
role="button" class="spt-btn-low badge bg-secondary p-2 me-2" |
|
|
|
(click)="showTaskNotes(task)"> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && taskNotesVisibility.get(task.id)">{{ 'basic.hide-comments' | translate }}</ng-container> |
|
|
|
<ng-container |
|
|
|
*ngIf="task.id && !taskNotesVisibility.get(task.id)">{{ 'basic.show-comments' | translate }} |
|
|
|
({{ task.numTaskNotes }})</ng-container> |
|
|
|
</span> |
|
|
|
<span role="button" class="badge bg-secondary p-2" |
|
|
|
(click)="openModalNewTaskNote(task)">{{ 'basic.comment-it' | translate }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div *ngIf="task.id && taskNotesVisibility.get(task.id)" class="pb-1"> |
|
|
|
<div class="card spt-comments" *ngFor="let taskNote of taskNotes.get(task.id)"> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="d-flex justify-content-between align-items-center"> |
|
|
|
<p>{{ taskNote.owner?.firstName }} {{ taskNote.owner?.lastName }} - {{ getTranslationKey(taskNote.contactType) | translate }}</p> |
|
|
|
<p>{{ taskNote.createdAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} Uhr</p> |
|
|
|
<div *ngIf="task.id && taskNotesVisibility.get(task.id)" class="pb-1"> |
|
|
|
<div class="card spt-comments" *ngFor="let taskNote of taskNotes.get(task.id)"> |
|
|
|
<div class="card-body"> |
|
|
|
<div class="d-flex justify-content-between align-items-center"> |
|
|
|
<p>{{ taskNote.owner?.firstName }} {{ taskNote.owner?.lastName }} - {{ getTranslationKey(taskNote.contactType) | translate }}</p> |
|
|
|
<p>{{ taskNote.createdAt | date:'dd.MM.YYYY - HH:mm':'GMT+0000' }} Uhr</p> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<p [innerHTML]="appHelperService.getSafeLongtext(taskNote.message)"></p> |
|
|
|
</div> |
|
|
|
<span *ngIf="taskNote.owner === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" |
|
|
|
(click)="openModalEditTaskNote(taskNote, task)"></span> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<p [innerHTML]="appHelperService.getSafeLongtext(taskNote.message)"></p> |
|
|
|
</div> |
|
|
|
<span *ngIf="taskNote.owner === currentUser?.id" class="position-absolute bi bi-pencil p-2" |
|
|
|
data-type="user-tool" data-action="edit" |
|
|
|
(click)="openModalEditTaskNote(taskNote, task)"></span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
</ng-container> |
|
|
|
</div> |
|
|
|
</app-paging> |
|
|
|
</div> |