diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts index 00a4bafa73c430b615c1a1f0403b6a65180ae853..b39d6d1ee1253d1d8a2f840bb92f2bb6d21a8a51 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/event-type-color-class.pipe.ts @@ -51,7 +51,6 @@ export class EventTypeColorClassPipe implements PipeTransform { transform(event: Event): string { if (!event.events || event.events.length <= 0) { - console.error('EventTypeColorClassPipe Error: event has no child event'); return ''; } diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html index c2294640629a98b8674b1f5b5da1363bfd0d97bb..35b79590e36679691f7a17c124a64ff22333b589 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.html @@ -66,7 +66,7 @@ </tr> </thead> <tbody> - <tr *ngFor="let event of dataSource; let index = index" (click)="selectEvent(event)" class="vitamui-table-row"> + <tr *ngFor="let event of dataSource; let index = index" (click)="selectEvent(event)" class="vitamui-table-row" [ngStyle] = "{'cursor':'pointer'}"> <td class="no-first-cell-padding width60"> <div class="vitamui-cell-icon aligned"> <div class="status-badge" [ngClass]="event | eventTypeBadgeClass"> @@ -74,23 +74,23 @@ </div> </div> </td> - <td><div class="vitamui-cell-content break-content" [title]="event.id">{{ event.id }}</div></td> + <td><div class="vitamui-cell-content break-content" [title]="event.id">{{ event?.id }}</div></td> <td><div class="vitamui-cell-content" [ngClass]="event | eventTypeColorClass"><vitamui-common-event-type-label [key]="event.typeProc"></vitamui-common-event-type-label></div></td> <td><div class="vitamui-cell-content" [ngClass]="event | eventTypeColorClass"><vitamui-common-event-type-label [key]="event.type"></vitamui-common-event-type-label></div></td> <td> - <div class="vitamui-cell-content">{{ event.dateTime | date:'dd/MM/yyyy' }}</div> + <div class="vitamui-cell-content">{{ event?.dateTime | date:'dd/MM/yyyy' }}</div> <div class="vitamui-cell-sub-content cell-content-bold"> - <span>{{ event.dateTime | date:'hh:mm:ss' }}</span> + <span>{{ event?.dateTime | date:'hh:mm:ss' }}</span> </div> </td> <td> - <div class="vitamui-cell-content">{{ (event | lastEvent).dateTime | date:'dd/MM/yyyy' }}</div> + <div class="vitamui-cell-content">{{ (event | lastEvent)?.dateTime | date:'dd/MM/yyyy' }}</div> <div class="vitamui-cell-sub-content cell-content-bold"> - <span>{{ (event | lastEvent).dateTime | date:'hh:mm:ss' }}</span> + <span>{{ (event | lastEvent)?.dateTime | date:'hh:mm:ss' }}</span> </div> </td> - <td><div class="vitamui-cell-content" [ngClass]="event | eventTypeColorClass">{{ (event | lastEvent).outcome }}</div></td> - <td><div class="vitamui-cell-content cell-content-bold break-content" [ngClass]="event | eventTypeColorClass">{{ (event | lastEvent).type }}</div></td> + <td><div class="vitamui-cell-content" [ngClass]="event | eventTypeColorClass">{{ (event | lastEvent)?.outcome }}</div></td> + <td><div class="vitamui-cell-content cell-content-bold break-content" [ngClass]="event | eventTypeColorClass">{{ (event | lastEvent)?.type }}</div></td> </tr> </tbody> </table> diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts index 0048c47c3322ebe1416a8bae0ef46e64de59c5c2..e585a2b532a87a131986d16f7e88004246de4405 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation-list/logbook-operation-list.component.ts @@ -113,6 +113,7 @@ export class LogbookOperationListComponent extends InfiniteScrollTable<Event> im } ngOnInit() { + this.pending = true; const searchCriteriaChange = merge(this.searchChange, this.filterChange, this.orderChange, this.searchFiltersChange) .pipe(debounceTime(FILTER_DEBOUNCE_TIME_MS)); @@ -123,6 +124,7 @@ export class LogbookOperationListComponent extends InfiniteScrollTable<Event> im this.refreshOperationCategoriesOptions(); this.refreshList(); + } buildCriteriaFromSearch() { @@ -144,9 +146,6 @@ export class LogbookOperationListComponent extends InfiniteScrollTable<Event> im criteria.types = this.filterMap.operationCategories; } - console.log('criteria.types'); - console.log(criteria.types); - return criteria; } @@ -167,6 +166,7 @@ export class LogbookOperationListComponent extends InfiniteScrollTable<Event> im const query = JSON.stringify(LogbookSearchService.buildVitamQuery(pageRequest, this.buildCriteriaFromSearch())); this.search(new PageRequest(0, DEFAULT_PAGE_SIZE, this.orderBy, this.direction, query)); + } onFilterChange(key: string, values: any[]) {