Manual lint fixes

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.
This commit is contained in:
Yury Bondarenko
2023-12-19 13:33:45 +01:00
parent ca1d81048a
commit 968c23309a
6 changed files with 23 additions and 19 deletions

View File

@@ -17,23 +17,23 @@
<ds-loading class="container" *ngIf="(isEventPageLoading | async)" message="{{'quality-assurance.loading' | translate}}"></ds-loading> <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" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[sortOptions]="paginationSortConfig" [sortOptions]="paginationSortConfig"
(paginationChange)="getQualityAssuranceEvents()"> (paginationChange)="getQualityAssuranceEvents()">
<ng-container> <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}} {{'quality-assurance.noEvents' | translate}}
</div> </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"> <table id="events" class="table table-striped table-hover table-bordered">
<thead> <thead>
<tr> <tr>
<th scope="col" class="trust-col">{{'quality-assurance.event.table.trust' | translate}}</th> <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 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}} {{'quality-assurance.event.table.details' | translate}}
</th> </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">
@@ -126,7 +126,7 @@
> >
<i class="fas fa-check"></i> <i class="fas fa-check"></i>
</button> </button>
<button *ngIf="showTopic.indexOf('/PROJECT') == -1" <button *ngIf="showTopic.indexOf('/PROJECT') === -1"
class="btn btn-outline-success btn-sm button-width" class="btn btn-outline-success btn-sm button-width"
ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}" ngbTooltip="{{'quality-assurance.event.action.accept' | translate}}"
container="body" container="body"

View File

@@ -38,7 +38,7 @@
</div> </div>
<ds-loading *ngIf="(isLoading$ | async)" message="{{'loading.search-results' | translate}}"></ds-loading> <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)" [searchResults]="(localEntitiesRD$ | async)"
[sortConfig]="this.searchOptions?.sort" [sortConfig]="this.searchOptions?.sort"
[searchConfig]="this.searchOptions" [searchConfig]="this.searchOptions"
@@ -53,7 +53,7 @@
(selectObject)="selectEntity($event)"> (selectObject)="selectEntity($event)">
</ds-themed-search-results> </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'"> <ds-alert [type]="'alert-info'">
<p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p> <p class="lead mb-0">{{(labelPrefix + label + '.notFound' | translate)}}</p>
</ds-alert> </ds-alert>

View File

@@ -10,7 +10,7 @@
<h4 class="border-bottom pb-2">{{'quality-assurance.source'| translate}}</h4> <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-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" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[hideGear]="false" [hideGear]="false"
@@ -18,11 +18,11 @@
(paginationChange)="getQualityAssuranceSource()"> (paginationChange)="getQualityAssuranceSource()">
<ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading> <ds-loading class="container" *ngIf="(isSourceProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="!(isSourceProcessing() | async)"> <ng-container *ngIf="(isSourceProcessing() | async) === false">
<div *ngIf="(sources$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert"> <div *ngIf="(sources$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noSource' | translate}} {{'quality-assurance.noSource' | translate}}
</div> </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"> <table id="epeople" class="table table-striped table-hover table-bordered">
<thead> <thead>
<tr> <tr>

View File

@@ -47,9 +47,11 @@ export class QualityAssuranceSourceEffects {
map((sources: PaginatedList<QualityAssuranceSourceObject>) => map((sources: PaginatedList<QualityAssuranceSourceObject>) =>
new AddSourceAction(sources.page, sources.totalPages, sources.currentPage, sources.totalElements), new AddSourceAction(sources.page, sources.totalPages, sources.currentPage, sources.totalElements),
), ),
catchError((error: Error) => { catchError((error: unknown) => {
if (error) { if (error instanceof Error) {
console.error(error.message); console.error(error.message);
} else {
console.error('Unexpected object thrown', error);
} }
return observableOf(new RetrieveAllSourceErrorAction()); return observableOf(new RetrieveAllSourceErrorAction());
}), }),

View File

@@ -10,7 +10,7 @@
<h4 class="border-bottom pb-2">{{'quality-assurance.topics'| translate}}</h4> <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-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" [paginationOptions]="paginationConfig"
[collectionSize]="(totalElements$ | async)" [collectionSize]="(totalElements$ | async)"
[hideGear]="false" [hideGear]="false"
@@ -18,11 +18,11 @@
(paginationChange)="getQualityAssuranceTopics()"> (paginationChange)="getQualityAssuranceTopics()">
<ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading> <ds-loading class="container" *ngIf="(isTopicsProcessing() | async)" message="'quality-assurance.loading' | translate"></ds-loading>
<ng-container *ngIf="!(isTopicsProcessing() | async)"> <ng-container *ngIf="(isTopicsProcessing() | async) === false">
<div *ngIf="(topics$|async)?.length == 0" class="alert alert-info w-100 mb-2 mt-2" role="alert"> <div *ngIf="(topics$ | async)?.length === 0" class="alert alert-info w-100 mb-2 mt-2" role="alert">
{{'quality-assurance.noTopics' | translate}} {{'quality-assurance.noTopics' | translate}}
</div> </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"> <table id="epeople" class="table table-striped table-hover table-bordered">
<thead> <thead>
<tr> <tr>

View File

@@ -47,9 +47,11 @@ export class QualityAssuranceTopicsEffects {
map((topics: PaginatedList<QualityAssuranceTopicObject>) => map((topics: PaginatedList<QualityAssuranceTopicObject>) =>
new AddTopicsAction(topics.page, topics.totalPages, topics.currentPage, topics.totalElements), new AddTopicsAction(topics.page, topics.totalPages, topics.currentPage, topics.totalElements),
), ),
catchError((error: Error) => { catchError((error: unknown) => {
if (error) { if (error instanceof Error) {
console.error(error.message); console.error(error.message);
} else {
console.error('Unexpected object thrown', error);
} }
return observableOf(new RetrieveAllTopicsErrorAction()); return observableOf(new RetrieveAllTopicsErrorAction());
}), }),