2024-04-26 06:41:12 -07:00
|
|
|
@if (field) {
|
2024-05-07 11:09:15 -07:00
|
|
|
@if (value?.toString().length > 0) {
|
|
|
|
|
<ng-template #nameTooltip>
|
|
|
|
|
<div class="d-flex flex-column text-light">
|
|
|
|
|
{{field.name}}
|
2024-04-26 06:41:12 -07:00
|
|
|
</div>
|
2024-05-07 11:09:15 -07:00
|
|
|
</ng-template>
|
|
|
|
|
@switch (field.data_type) {
|
|
|
|
|
@case (CustomFieldDataType.Monetary) {
|
|
|
|
|
<span [ngbTooltip]="nameTooltip">{{value | currency: currency}}</span>
|
|
|
|
|
}
|
|
|
|
|
@case (CustomFieldDataType.Date) {
|
|
|
|
|
<span [ngbTooltip]="nameTooltip">{{value | customDate}}</span>
|
|
|
|
|
}
|
|
|
|
|
@case (CustomFieldDataType.Url) {
|
|
|
|
|
<a [ngbTooltip]="nameTooltip" [href]="value" class="btn-link text-dark text-decoration-none" target="_blank">{{value}}</a>
|
|
|
|
|
}
|
|
|
|
|
@case (CustomFieldDataType.DocumentLink) {
|
|
|
|
|
<div [ngbTooltip]="nameTooltip" class="d-flex gap-1 flex-wrap">
|
|
|
|
|
@for (docId of value; track docId) {
|
2024-05-08 21:01:01 -07:00
|
|
|
<a routerLink="/documents/{{docId}}" class="badge bg-body text-primary" title="View" i18n-title>
|
2024-05-07 11:09:15 -07:00
|
|
|
<i-bs width="0.9em" height="0.9em" name="file-text"></i-bs> <span>{{ getDocumentTitle(docId) }}</span>
|
|
|
|
|
</a>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@default {
|
|
|
|
|
<span [ngbTooltip]="nameTooltip">{{value}}</span>
|
|
|
|
|
}
|
2024-04-26 06:41:12 -07:00
|
|
|
}
|
2024-05-07 11:09:15 -07:00
|
|
|
} @else if (showNameIfEmpty) {
|
2024-05-29 00:07:32 -07:00
|
|
|
<span class="fst-italic text-muted">{{field.name}}</span>
|
2024-04-26 06:41:12 -07:00
|
|
|
}
|
|
|
|
|
}
|