Skip to content

Commit

Permalink
Manual lint fixes
Browse files Browse the repository at this point in the history
This can serve as an example of the type of lint issues we'd have to fix by hand in ongoing PRs if this PR were to be merged.
  • Loading branch information
ybnd committed Dec 19, 2023
1 parent ca1d810 commit 968c233
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ <h4 class="border-bottom pb-2">

<ds-loading class="container" *ngIf="(isEventPageLoading | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>

<ds-pagination *ngIf="!(isEventPageLoading | async)"
<ds-pagination *ngIf="(isEventPageLoading | async) === false"
[paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)"
[sortOptions]="paginationSortConfig"
(paginationChange)="getQualityAssuranceEvents()">

<ng-container>
<div *ngIf="(eventsUpdated$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
<div *ngIf="(eventsUpdated$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noEvents' | translate}}
</div>
<div *ngIf="(eventsUpdated$|async)?.length != 0" class="table-responsive mt-2">
<div *ngIf="(eventsUpdated$ | async)?.length !== 0" class="table-responsive mt-2">
<table id="events" class="table table-striped table-hover table-bordered">
<thead>
<tr>
<th scope="col" class="trust-col">{{'quality-assurance.event.table.trust' | translate}}</th>
<th scope="col" class="title-col">{{'quality-assurance.event.table.publication' | translate}}</th>
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') == -1" scope="col" class="content-col">
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') === -1" scope="col" class="content-col">
{{'quality-assurance.event.table.details' | translate}}
</th>
<th *ngIf="hasDetailColumn() && showTopic.indexOf('/PROJECT') !== -1" scope="col" class="content-col">
Expand Down Expand Up @@ -126,7 +126,7 @@ <h4 class="border-bottom pb-2">
>
<i class="fas fa-check"></i>
</button>
<button *ngIf="showTopic.indexOf('/PROJECT') == -1"
<button *ngIf="showTopic.indexOf('/PROJECT') === -1"
class="btn btn-outline-success btn-sm button-width"
ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}"
container="body"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h4>{{ (labelPrefix + label + '.select' | translate) }}</h4>
</div>

<ds-loading *ngIf="(isLoading$ | async)" message="{{'loading.search-results' | translate}}"></ds-loading>
<ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && !(isLoading$ | async)"
<ds-themed-search-results *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length > 0 && (isLoading$ | async) === false"
[searchResults]="(localEntitiesRD$ | async)"
[sortConfig]="this.searchOptions?.sort"
[searchConfig]="this.searchOptions"
Expand All @@ -53,7 +53,7 @@ <h4>{{ (labelPrefix + label + '.select' | translate) }}</h4>
(selectObject)="selectEntity($event)">
</ds-themed-search-results>

<div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && !(isLoading$ | async)">
<div *ngIf="(localEntitiesRD$ | async)?.payload?.page?.length < 1 && (isLoading$ | async) === false">
<ds-alert [type]="'alert-info'">
<p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p>
</ds-alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ <h2 class="border-bottom pb-2">{{'quality-assurance.title'| translate}}</h2>
<h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4>

<ds-loading class="container" *ngIf="(isSourceLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="!(isSourceLoading() | async)"
<ds-pagination *ngIf="(isSourceLoading() | async) === false"
[paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)"
[hideGear]="false"
[hideSortOptions]="true"
(paginationChange)="getQualityAssuranceSource()">

<ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="!(isSourceProcessing() | async)">
<div *ngIf="(sources$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
<ng-container *ngIf="(isSourceProcessing() | async) === false">
<div *ngIf="(sources$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noSource' | translate}}
</div>
<div *ngIf="(sources$|async)?.length != 0" class="table-responsive mt-2">
<div *ngIf="(sources$ | async)?.length !== 0" class="table-responsive mt-2">
<table id="epeople" class="table table-striped table-hover table-bordered">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export class QualityAssuranceSourceEffects {
map((sources: PaginatedList<QualityAssuranceSourceObject>) =>
new AddSourceAction(sources.page, sources.totalPages, sources.currentPage, sources.totalElements),
),
catchError((error: Error) => {
if (error) {
catchError((error: unknown) => {
if (error instanceof Error) {
console.error(error.message);
} else {
console.error('Unexpected object thrown', error);
}
return observableOf(new RetrieveAllSourceErrorAction());
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ <h2 class="border-bottom pb-2">{{'quality-assurance.title'| translate}}</h2>
<h4 class="border-bottom pb-2">{{'quality-assurance.topics'| translate}}</h4>

<ds-loading class="container" *ngIf="(isTopicsLoading() | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading>
<ds-pagination *ngIf="!(isTopicsLoading() | async)"
<ds-pagination *ngIf="(isTopicsLoading() | async) === false"
[paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)"
[hideGear]="false"
[hideSortOptions]="true"
(paginationChange)="getQualityAssuranceTopics()">

<ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="!(isTopicsProcessing() | async)">
<div *ngIf="(topics$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
<ng-container *ngIf="(isTopicsProcessing() | async) === false">
<div *ngIf="(topics$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noTopics' | translate}}
</div>
<div *ngIf="(topics$|async)?.length != 0" class="table-responsive mt-2">
<div *ngIf="(topics$ | async)?.length !== 0" class="table-responsive mt-2">
<table id="epeople" class="table table-striped table-hover table-bordered">
<thead>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ export class QualityAssuranceTopicsEffects {
map((topics: PaginatedList<QualityAssuranceTopicObject>) =>
new AddTopicsAction(topics.page, topics.totalPages, topics.currentPage, topics.totalElements),
),
catchError((error: Error) => {
if (error) {
catchError((error: unknown) => {
if (error instanceof Error) {
console.error(error.message);
} else {
console.error('Unexpected object thrown', error);
}
return observableOf(new RetrieveAllTopicsErrorAction());
}),
Expand Down

0 comments on commit 968c233

Please sign in to comment.