Commit 9e763a2c authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #17058 TIME 2:35 hide error message when loading action list

parent 9ef1f7a8
......@@ -155,7 +155,7 @@
</ng-template>
</div>
<div class="actions-indexing-form" *ngIf="!detailMode">
<ng-container *ngIf="actionsList.length > 0 && selectedAction !== undefined">
<ng-container *ngIf="actionsListLoaded && actionsList.length > 0 && selectedAction !== undefined">
<button mat-button class="button-form-primary" [disabled]="selectedAction.id === 0"
[matMenuTriggerFor]="menu" style="width:350px;margin-right:20px;" [title]="selectedAction.label">
<span class="menu-label" [innerHTML]="selectedAction.label">
......@@ -190,7 +190,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.noAvailableActionProcess' | translate"></div>
</div>
</ng-template>
......
......@@ -15,7 +15,7 @@ import { ActionsService } from '../actions/actions.service';
import { tap, catchError, map, finalize, filter, take } from 'rxjs/operators';
import { DocumentViewerComponent } from '../viewer/document-viewer.component';
import { IndexingFormComponent } from '../indexation/indexing-form/indexing-form.component';
import { ConfirmComponent } from '../../plugins/modal/confirm.component';
import { ConfirmComponent } from '@plugins/modal/confirm.component';
import { ContactResourceModalComponent } from '../contact/contact-resource/modal/contact-resource-modal.component';
import { DiffusionsListComponent } from '../diffusions/diffusions-list.component';
......@@ -57,6 +57,7 @@ export class ProcessComponent implements OnInit, OnDestroy {
isMailing: boolean = false;
isFromSearch: boolean = false;
actionsList: any[] = [];
actionsListLoaded: boolean = false;
currentUserId: number = null;
currentBasketId: number = null;
currentGroupId: number = null;
......@@ -282,6 +283,7 @@ export class ProcessComponent implements OnInit, OnDestroy {
tap((data: any) => {
this.selectedAction = data.actions[0];
this.actionsList = data.actions;
this.actionsListLoaded = true;
}),
catchError((err: any) => {
this.notify.handleErrors(err);
......
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