argos/dmp-frontend/src/app/ui/admin/entity-locks/lock-listing.component.html

88 lines
2.7 KiB
HTML

<div class="row lock-listing">
<div class="col-md-8 offset-md-2">
<div class="row mb-4 mt-3">
<div class="col">
<h4>{{'LOCK-LISTING.TITLE' | translate}}</h4>
<app-navigation-breadcrumb />
</div>
</div>
<app-hybrid-listing [rows]="gridRows" [columns]="gridColumns" [visibleColumns]="visibleColumns"
[count]="totalElements" [offset]="currentPageNumber" [limit]="lookup.page.size"
[defaultSort]="lookup.order?.items" [externalSorting]="true"
(pageLoad)="alterPage($event)" (columnSort)="onColumnSort($event)"
(columnsChanged)="onColumnsChanged($event)" [listItemTemplate]="listItemTemplate">
<app-lock-listing-filters hybrid-listing-filters [(filter)]="lookup"
(filterChange)="filterChanged($event)" />
<app-user-settings-picker [key]="userSettingsKey" [userPreference]="lookup"
(onSettingSelected)="changeSetting($event)" [autoSelectUserSettings]="autoSelectUserSettings"
user-preference-settings />
</app-hybrid-listing>
</div>
</div>
<ng-template #listItemTemplate let-item="item" let-isColumnSelected="isColumnSelected">
<div class="d-flex align-items-center p-3 gap-1-rem">
<div class="row">
<ng-container *ngIf="isColumnSelected('targetType')">
<span class="col-12">
{{'LOCK-LISTING.FIELDS.TARGET-TYPE' | translate}}:
<small>
{{enumUtils.toLockTargetTypeString(item.targetType) | nullifyValue}}
</small>
</span>
<br>
</ng-container>
<ng-container *ngIf="isColumnSelected('lockedAt')">
<span class="col-12">
{{'LOCK-LISTING.FIELDS.LOCKED-AT' | translate}}:
<small>
{{item?.lockedAt | dateTimeFormatter : 'short' | nullifyValue}}
</small>
</span>
<br>
</ng-container>
<ng-container *ngIf="isColumnSelected('touchedAt')">
<span class="col-12">
{{'LOCK-LISTING.FIELDS.TOUCHED-AT' | translate}}:
<small>
{{item?.touchedAt | dateTimeFormatter : 'short' | nullifyValue}}
</small>
</span>
</ng-container>
<!-- <ng-container *ngIf="isColumnSelected('contactTypeHint')">
<span class="col-12">
{{'LOCK-LISTING.FIELDS.CONTACT-TYPE' | translate}}:
<small>
{{enumUtils.toNotificationContactTypeString(item.contactTypeHint) | nullifyValue}}
</small>
</span>
<br>
</ng-container> -->
</div>
</div>
</ng-template>
<ng-template #actions let-row="row" let-item>
<div class="row" (click)="$event.stopPropagation()">
<div class="col-auto">
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
<mat-icon>more_horiz</mat-icon>
</button>
<mat-menu #actionsMenu="matMenu">
<button mat-menu-item (click)="deleteType(row.id, row.target)">
<mat-icon>delete</mat-icon>
{{'LOCK-LISTING.ACTIONS.DELETE' | translate}}
</button>
</mat-menu>
</div>
</div>
</ng-template>