Skip to content

Commit

Permalink
fix(audit): Hide View Details button when there are no details to show
Browse files Browse the repository at this point in the history
  • Loading branch information
jrassa committed Dec 9, 2024
1 parent 1f4846e commit c3ada54
Showing 1 changed file with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ <h1 skipTo>Audit Logs</h1>
<ng-container cdkColumnDef="audit.object">
<th cdk-header-cell *cdkHeaderCellDef><asy-header-sort>Object</asy-header-sort></th>
<td class="hide-overflow" cdk-cell *cdkCellDef="let entry">
@if (entry.audit.object?.after) {
{{ entry.audit.object.after | json }}
} @else {
{{ entry.audit.object | json }}
<div>
@if (entry.audit.object) {
@if (entry.audit.object?.after) {
{{ entry.audit.object.after | json }}
} @else {
{{ entry.audit.object | json }}
<button
class="btn btn-link btn-sm ps-0 pe-3"
class="d-block btn btn-link btn-sm ps-0 pe-3"
type="button"
container="body"
ngbTooltip="See details of the update"
Expand All @@ -84,7 +84,7 @@ <h1 skipTo>Audit Logs</h1>
>
<span class="fa-solid fa-eye"></span>View Details
</button>
</div>
}
}
</td>
</ng-container>
Expand All @@ -98,18 +98,16 @@ <h1 skipTo>Audit Logs</h1>
<td class="hide-overflow" cdk-cell *cdkCellDef="let entry">
@if (entry.audit.object?.before) {
{{ entry.audit.object?.before | json }}
<div>
<button
class="btn btn-link btn-sm ps-0"
type="button"
container="body"
ngbTooltip="See details of the update"
placement="bottom"
(click)="viewMore(entry, 'viewChanges')"
>
<span class="fa-solid fa-eye"></span><span>View Details</span>
</button>
</div>
<button
class="d-block btn btn-link btn-sm ps-0"
type="button"
container="body"
ngbTooltip="See details of the update"
placement="bottom"
(click)="viewMore(entry, 'viewChanges')"
>
<span class="fa-solid fa-eye"></span><span>View Details</span>
</button>
}
</td>
</ng-container>
Expand Down

0 comments on commit c3ada54

Please sign in to comment.