Portals: Add piwik as a column. Add pid in search

This commit is contained in:
Konstantinos Triantafyllou 2023-01-26 12:35:05 +02:00
parent 70e0d02227
commit 3acd9a6c29
2 changed files with 8 additions and 4 deletions

View File

@ -55,11 +55,11 @@
Bulk Actions ({{getSelectedPortals().length}}) Bulk Actions ({{getSelectedPortals().length}})
</button> </button>
<div uk-dropdown="mode: click"> <div uk-dropdown="mode: click">
<ul class="uk-nav uk-dropdown-nav" <ul class="uk-nav uk-dropdown-nav uk-text-capitalize"
[attr.uk-tooltip]="getSelectedPortals().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'" [attr.uk-tooltip]="getSelectedPortals().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
title="Select at least one entity"> title="Select at least one entity">
<li> <li>
<a (click)="confirmDeleteSelectedPortals()"><i></i>Delete</a> <a (click)="confirmDeleteSelectedPortals()">Delete</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -67,6 +67,7 @@
</th> </th>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th>Piwik</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -81,6 +82,9 @@
<td> <td>
<div class="type" href="#">{{check.portal.type}}</div> <div class="type" href="#">{{check.portal.type}}</div>
</td> </td>
<td>
<div class="name" href="#">{{check.portal.piwik}}</div>
</td>
<td> <td>
<div class="uk-flex uk-flex-middle"> <div class="uk-flex uk-flex-middle">
<icon class="clickable" [flex]="true" name="edit" [customClass]="'uk-text-primary'" (click)="editPortal(i)"></icon> <icon class="clickable" [flex]="true" name="edit" [customClass]="'uk-text-primary'" (click)="editPortal(i)"></icon>

View File

@ -229,11 +229,11 @@ export class PortalsComponent implements OnInit {
public filterByType(portal: Portal): boolean { public filterByType(portal: Portal): boolean {
let type = this.filterForm.get("type").value; let type = this.filterForm.get("type").value;
return type == "all" || (type == portal.type); return type == "all" || (type === portal.type);
} }
public filterPortals(portal: Portal): boolean { public filterPortals(portal: Portal): boolean {
return this.searchText.toString() === '' || (portal.name || portal.type).match(this.searchText) != null; return this.searchText.toString() === '' || (portal.name + portal.type + portal.pid).match(this.searchText) != null;
} }
handleUpdateError(message: string, error = null) { handleUpdateError(message: string, error = null) {