Avoid using number formatting on ID fields

Pretty crude way to do it, but I guess it works?
This commit is contained in:
Stedoss 2025-06-22 16:55:00 +01:00
parent 86f307b53b
commit 52bf7d56b0
2 changed files with 3 additions and 1 deletions

View File

@ -129,7 +129,7 @@
<td *ngFor="let column of fields" [hidden]="!column.active" class="text-center" style="line-height: 32px"> <td *ngFor="let column of fields" [hidden]="!column.active" class="text-center" style="line-height: 32px">
<ng-container *ngIf="getValue(entry, column.name) !== null; else nullDisplay"> <ng-container *ngIf="getValue(entry, column.name) !== null; else nullDisplay">
<ng-container *ngIf="column.type == 'number'"> <ng-container *ngIf="column.type == 'number'">
{{ getValue(entry, column.name) | number }} {{ isFieldId(column.name) ? getValue(entry, column.name) : (getValue(entry, column.name) | number) }}
</ng-container> </ng-container>
<ng-container *ngIf="column.type == 'flag'"> <ng-container *ngIf="column.type == 'flag'">
<span class="flag" [title]="getValue(entry, column.name)">{{ countryCodeToFlag(getValue(entry, column.name)) }}</span> <span class="flag" [title]="getValue(entry, column.name)">{{ countryCodeToFlag(getValue(entry, column.name)) }}</span>

View File

@ -352,6 +352,8 @@ export class SearchComponent implements OnInit {
} }
} }
isFieldId = (field: string): boolean => field === 'id' || field.includes("_id");
protected readonly countryCodeToFlag = countryCodeToFlag; protected readonly countryCodeToFlag = countryCodeToFlag;
protected readonly Math = Math; protected readonly Math = Math;
protected readonly formatDuration = formatDuration; protected readonly formatDuration = formatDuration;