Commit 614317f5 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #17058 TIME 0:10 hide error message when loading action list in indexation

parent 9e9e3166
......@@ -12,7 +12,7 @@
</div>
<div class="actions-indexing-form">
<ng-container
*ngIf="actionsList.length > 0 && indexingForm !== undefined && selectedAction !== undefined">
*ngIf="actionsListLoaded && actionsList.length > 0 && indexingForm !== undefined && selectedAction !== undefined">
<button mat-button class="button-form-primary" [disabled]="selectedAction.id === 0"
[matMenuTriggerFor]="menu" style="width:350px;margin-right:20px;"
[title]="selectedAction.label">
......@@ -52,7 +52,7 @@
<mat-icon class="fa fa-check"></mat-icon>
</button>
</ng-container>
<div class="emptyAction" *ngIf="actionsList.length === 0"
<div class="emptyAction" *ngIf="actionsListLoaded && actionsList.length === 0"
[innerHTML]="'lang.noAvailableAction' | translate"></div>
</div>
</ng-container>
......
......@@ -13,9 +13,9 @@ import { AppService } from '@service/app.service';
import { IndexingFormComponent } from './indexing-form/indexing-form.component';
import { tap, finalize, catchError, map, filter, take } from 'rxjs/operators';
import { DocumentViewerComponent } from '../viewer/document-viewer.component';
import { ConfirmComponent } from '../../plugins/modal/confirm.component';
import { ConfirmComponent } from '@plugins/modal/confirm.component';
import { ActionsService } from '../actions/actions.service';
import { SortPipe } from '../../plugins/sorting.pipe';
import { SortPipe } from '@plugins/sorting.pipe';
import { FunctionsService } from '@service/functions.service';
import { of, Subscription } from 'rxjs';
import { SelectIndexingModelComponent } from './select-indexing-model/select-indexing-model.component';
......@@ -46,6 +46,7 @@ export class IndexationComponent implements OnInit, OnDestroy {
currentGroupId: number;
actionsList: any[] = [];
actionsListLoaded: boolean = false;
selectedAction: any = {
id: 0,
label: '',
......@@ -136,6 +137,7 @@ export class IndexationComponent implements OnInit, OnDestroy {
tap((data: any) => {
this.selectedAction = data.actions[0];
this.actionsList = data.actions;
this.actionsListLoaded = true;
}),
finalize(() => this.loading = false),
catchError((err: any) => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment