| <!-- |
| ****************************************************************************** |
| * Copyright © 2017-2018 PTA GmbH. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| ****************************************************************************** |
| --> |
| |
| <div class="panel panel-default"> |
| <div class="panel-heading"> |
| <form #entryForm="ngForm"> |
| <table> |
| <tr> |
| <td style="width:12%;"> |
| <h4 class="panel-title"> |
| <a *ngIf="isCollapsible" data-toggle="collapse" href="#collapse5" (click)="toggleCollapse()">Geschlossene Meldungen</a> |
| <div *ngIf="!isCollapsible">Geschlossene Meldungen</div> |
| </h4> |
| </td> |
| <td style="width:90%;" *ngIf="withDatePicker"> |
| <div class="input-group" title="Von - Bis"> |
| <label for="finishedNotificationsFormControl" class="input-group-addon dateRangePickerIcon"><span class="glyphicon glyphicon-calendar"></span></label> |
| <input style="min-width: 278px; z-index: 0" id="finishedNotificationsFormControl" class="form-control entry-input" type="text" |
| daterangepicker [options]="{maxDate:currentDate, startDate:startDate, endDate:endDate, drops:'up'}" |
| (applyDaterangepicker)="startDate=$event.picker.startDate; endDate=$event.picker.endDate; storeDateRange($event); getNotifications();" |
| /> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </form> |
| </div> |
| <div id="collapse5" class="panel-collapse collapse" [ngClass]="{'in': !isCollapsible || !stayHidden}"> |
| <div class="panel-body"> |
| <table class="table table-striped table-bordered" *ngIf="!showSpinner"> |
| <thead> |
| <tr> |
| <th *ngIf="withCheckboxes" class="notification-check-col"> |
| <input type="checkbox" [(ngModel)]="selectAll" (change)="changeAllSelection()"> |
| </th> |
| <th class="notification-tab-prio-col"> |
| <app-sorting [initColumnName]="'fkRefNotificationPriority'" (click)=" sort('fkRefNotificationPriority')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column">Prio</app-sorting> |
| </th> |
| <th class="notification-tab-first-col"> |
| <app-sorting [initColumnName]="'beginDate'" (click)=" sort('beginDate')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column">Beginnt am</app-sorting> |
| </th> |
| <th class="notification-tab-branch"> |
| <app-sorting [initColumnName]="'fkRefBranch'" (click)="sort('fkRefBranch')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column"></app-sorting> |
| </th> |
| <th class="notification-tab-grid-territory"> |
| <app-sorting [initColumnName]="'fkRefGridTerritory'" (click)="sort('fkRefGridTerritory')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column"> </app-sorting> |
| </th> |
| <th class="notification-tab-description"> |
| <app-sorting [initColumnName]="'notificationText'" (click)="sort('notificationText')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column">Kurztext </app-sorting> |
| </th> |
| <th class="notification-tab-finished-at-col"> |
| <app-sorting [initColumnName]="'finishedDate'" (click)="sort('finishedDate')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column">Geschlossen am </app-sorting> |
| </th> |
| <th class="notification-tab-responsibility-forwarding-header"> |
| <app-sorting [initColumnName]="'responsibilityForwarding'" (click)="sort('responsibilityForwarding')" [isDesc]="sortingState?.isDesc" [defaultState]="sortingState?.defaultState" [columnName]="sortingState?.column">Zuständigkeit / weitergeleitet an </app-sorting> |
| </th> |
| <th class="notification-tab-edit-buttons" *ngIf="withEditButtons"></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr *ngFor="let notification of notifications" class='notification_row_testable'> |
| <td [attr.colspan]="(withCheckboxes && withEditButtons)?10:9" style="padding:0px;"> |
| <table style="width:100%"> |
| <tr> |
| <td *ngIf="withCheckboxes" class="notification-check-col"> |
| <input type="checkbox" [(ngModel)]="notification.selected" (change)="selectionChanged()"> |
| </td> |
| <td class="notification-tab-prio-col"> |
| <img *ngIf="sessionContext.getPrioById(notification.fkRefNotificationPriority)?.imageName" |
| src="assets/img/{{sessionContext.getPrioById(notification.fkRefNotificationPriority)?.imageName}}" width="18"> |
| </td> |
| <td class="notification-tab-first-col" ngInit="notification.historyOpen=false"> |
| <a *ngIf="notification.version > 1 && isCollapsible" href="#history_finishedNot_{{notification.id}}" data-toggle="collapse" |
| class="glyphicon glyphicon-menu-down glyphicon-menu-up" (click)="toggleHistoryTab(notification)" [ngClass]="{'glyphicon-menu-up': notification.historyOpen, 'glyphicon-menu-down': !notification.historyOpen}" |
| style="background-color: transparent; text-decoration: none;"> |
| </a> |
| <span class="notification-tab-version-col" *ngIf="notification.version == 1 && isCollapsible"></span> |
| <span> |
| {{ notification.beginDate | formattedTimestamp: 'DD.MM.YYYY HH:mm' }} |
| </span> |
| </td> |
| <td class="notification-tab-branch" [ngClass]="sessionContext.getBranchClassById(notification.fkRefBranch)"> |
| {{ sessionContext.getBrancheById(notification.fkRefBranch)?.name }} |
| </td> |
| <td class="notification-tab-grid-territory"> |
| <span> |
| {{ sessionContext.getGridTerritoryById(notification.fkRefGridTerritory)?.name }} |
| </span> |
| </td> |
| <td class="notification-tab-description" data-toggle="tooltip" |
| [attr.data-original-title]="notification.notificationText">{{ notification.notificationText }}</td> |
| <td class="notification-tab-finished-at-col">{{ notification.finishedDate | formattedTimestamp: 'DD.MM.YYYY HH:mm' }}</td> |
| <td class="notification-tab-responsibility-forwarding">{{ notification.responsibilityForwarding }}</td> |
| <td class="notification-tab-edit-buttons" *ngIf="withEditButtons && !isStatusClosed(notification)"> |
| <button type="button" class="btn btn-primary btn-sm" *ngIf="(isSpecialUser() || !notification.adminFlag) && !isEnforceShowReadOnly()" (click)="editNotification(notification)"> |
| <span class="glyphicon glyphicon-pencil"></span> |
| </button> |
| <button type="button" class="btn btn-default btn-sm" *ngIf="(!isSpecialUser() && notification.adminFlag) || isEnforceShowReadOnly()" (click)="lookUpNotification(notification)"> |
| <span class="glyphicon glyphicon-eye-open"></span> |
| </button> |
| </td> |
| <td class="notification-tab-edit-buttons" *ngIf="withEditButtons && isStatusClosed(notification)"> |
| <button type="button" class="btn btn-default btn-sm" (click)="lookUpNotification(notification)"> |
| <span class="glyphicon glyphicon-eye-open"></span> |
| </button> |
| </td> |
| </tr> |
| <tr id="history_openNot_{{notification.id}}" [ngClass]="{'panel-collapse': notification.historyOpen}" *ngIf="isCollapsible && notification.historyOpen"> |
| <td [attr.colspan]="9"> |
| <table style="width:100%;" class="notificationVersions"> |
| <tbody> |
| <tr *ngFor="let notificationVersion of notification.decoratorNotificationVersions"> |
| <td class="notification-tab-prio-col"> |
| <img *ngIf="sessionContext.getPrioById(notificationVersion.fkRefNotificationPriority)?.imageName" |
| src="assets/img/{{sessionContext.getPrioById(notificationVersion.fkRefNotificationPriority)?.imageName}}" width="18"> |
| </td> |
| <td class="notification-tab-version-col"> |
| <span> |
| {{ notificationVersion.beginDate | formattedTimestamp: 'DD.MM.YYYY HH:mm' }} |
| </span> |
| </td> |
| <td class="notification-tab-branch"> |
| {{ sessionContext.getBrancheById(notificationVersion.fkRefBranch)?.name }} |
| </td> |
| <td class="notification-tab-grid-territory"> |
| <span> |
| {{ sessionContext.getGridTerritoryById(notificationVersion.fkRefGridTerritory)?.name }} |
| </span> |
| </td> |
| <td class="notification-tab-description" data-toggle="tooltip" |
| [attr.data-original-title]="notificationVersion.notificationText"> |
| <span> |
| {{ notificationVersion.notificationText }} |
| </span> |
| </td> |
| <td class="notification-tab-finished-at-col"> |
| <span> |
| {{ notificationVersion.finishedDate | formattedTimestamp: 'DD.MM.YYYY HH:mm' }} |
| </span> |
| </td> |
| <td class="notification-tab-responsibility-forwarding"> |
| <span> |
| {{ notificationVersion.responsibilityForwarding }} |
| </span> |
| </td> |
| <td class="notification-tab-edit-buttons" *ngIf="withEditButtons" align="left"> |
| <button type="button" class="btn btn-default btn-sm" (click)="lookUpNotification(notificationVersion)"> |
| <span class="glyphicon glyphicon-eye-open"></span> |
| </button> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <app-loading-spinner *ngIf="showSpinner"></app-loading-spinner> |
| </div> |
| </div> |
| </div> |