Skip to content

Commit

Permalink
Merge pull request #26658 from qmonmert/angularuserif
Browse files Browse the repository at this point in the history
[Angular] Referencing the conditional expression's result
  • Loading branch information
DanielFran authored Jul 8, 2024
2 parents 8088e0c + 076a6b7 commit bcbad44
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,53 @@
-%>
<div class="d-flex justify-content-center">
<div class="col-8">
@if (user()) {
@if (user(); as userRef) {
<div>
<h2>
<span>__jhiTranslateTag__('userManagement.detail.title')</span> [<strong>{{ user()!.login }}</strong>]
<span>__jhiTranslateTag__('userManagement.detail.title')</span> [<strong>{{ userRef.login }}</strong>]
</h2>

<dl class="row-md jh-entity-details">
<dt><span>__jhiTranslateTag__('userManagement.login')</span></dt>
<dd>
<span>{{ user()!.login }}</span>
@if (user()!.activated) {
<span>{{ userRef.login }}</span>
@if (userRef.activated) {
<span class="badge bg-success">__jhiTranslateTag__('userManagement.activated')</span>
} @else {
<span class="badge bg-danger">__jhiTranslateTag__('userManagement.deactivated')</span>
}
</dd>

<dt><span>__jhiTranslateTag__('userManagement.firstName')</span></dt>
<dd>{{ user()!.firstName }}</dd>
<dd>{{ userRef.firstName }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.lastName')</span></dt>
<dd>{{ user()!.lastName }}</dd>
<dd>{{ userRef.lastName }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.email')</span></dt>
<dd>{{ user()!.email }}</dd>
<dd>{{ userRef.email }}</dd>
<%_ if (enableTranslation) { _%>
<dt><span>__jhiTranslateTag__('userManagement.langKey')</span></dt>
<dd>{{ user()!.langKey }}</dd>
<dd>{{ userRef.langKey }}</dd>
<%_ } _%>

<dt><span>__jhiTranslateTag__('userManagement.createdBy')</span></dt>
<dd>{{ user()!.createdBy }}</dd>
<dd>{{ userRef.createdBy }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.createdDate')</span></dt>
<dd>{{ user()!.createdDate | date: 'dd/MM/yy HH:mm' }}</dd>
<dd>{{ userRef.createdDate | date: 'dd/MM/yy HH:mm' }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.lastModifiedBy')</span></dt>
<dd>{{ user()!.lastModifiedBy }}</dd>
<dd>{{ userRef.lastModifiedBy }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.lastModifiedDate')</span></dt>
<dd>{{ user()!.lastModifiedDate | date: 'dd/MM/yy HH:mm' }}</dd>
<dd>{{ userRef.lastModifiedDate | date: 'dd/MM/yy HH:mm' }}</dd>

<dt><span>__jhiTranslateTag__('userManagement.profiles')</span></dt>
<dd>
<ul class="list-unstyled">
@for (authority of user()!.authorities; track $index) {
@for (authority of userRef.authorities; track $index) {
<li>
<span class="badge bg-info">{{ authority }}</span>
</li>
Expand Down

0 comments on commit bcbad44

Please sign in to comment.