Skip to content

Commit

Permalink
🤖 GITHUB ACTIONS format_prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Feb 13, 2024
1 parent e96791f commit 6cc5165
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/app/cdk/side-bar/side-bar/side-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export class SideBarComponent implements OnInit, OnDestroy {
}

onSideBarElementsDisplay(userRecord: UserRecord): void {
this.isSideBarEmpty.emit(RecordUtil.isSideBarEmpty(!!this.isPublicRecord, userRecord))
this.isSideBarEmpty.emit(
RecordUtil.isSideBarEmpty(!!this.isPublicRecord, userRecord)
)
}

ngOnDestroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
<section [id]="'names'" role="region" [attr.aria-label]="regionNames">
<div
class="names-wrapper"
*ngIf="!userInfo?.RECORD_WITH_ISSUES && (userRecord?.names || userRecord?.otherNames)"
*ngIf="
!userInfo?.RECORD_WITH_ISSUES &&
(userRecord?.names || userRecord?.otherNames)
"
>
<div class="row names">
<h1
Expand Down Expand Up @@ -50,7 +53,7 @@
<ng-container
*ngIf="
userInfo.IS_LOCKED === 'true' &&
(userInfo.IS_DEACTIVATED === 'false' && !userInfo.PRIMARY_RECORD)
userInfo.IS_DEACTIVATED === 'false' && !userInfo.PRIMARY_RECORD
"
i18n="@@summary.recordIsLocked"
>This record is locked
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<section *ngIf="userInfo?.RECORD_WITH_ISSUES || affiliations === 0">
<div
class="container record-info orc-font-body-small"
[ngClass]="{'no-padding' : displayBiography || displaySideBar}"
[ngClass]="{ 'no-padding': displayBiography || displaySideBar }"
>
<ng-container
*ngIf="
userInfo.IS_LOCKED === 'true' &&
(userInfo.IS_DEACTIVATED === 'false' && !userInfo.PRIMARY_RECORD)
userInfo.IS_DEACTIVATED === 'false' && !userInfo.PRIMARY_RECORD
"
>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export class RecordInfoComponent implements OnInit {
this.affiliations
)

this.displaySideBar = RecordUtil.isSideBarEmpty(!!this.isPublicRecord, userRecord)
this.displaySideBar = RecordUtil.isSideBarEmpty(
!!this.isPublicRecord,
userRecord
)
this.displayBiography = !!userRecord?.biography
})
}
Expand Down
5 changes: 4 additions & 1 deletion src/app/shared/utils/record.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ export class RecordUtil {
.join('; ')
}

static isSideBarEmpty(isPublicRecord: boolean, userRecord: UserRecord): boolean {
static isSideBarEmpty(
isPublicRecord: boolean,
userRecord: UserRecord
): boolean {
if (
(userRecord?.emails?.emails &&
(!isPublicRecord || userRecord.emails.emails.length > 0)) ||
Expand Down

0 comments on commit 6cc5165

Please sign in to comment.