diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts index 814f416526f240c727224fe3b4994dcd6043906d..19f4f76e7fb054df34fd4e78f1dd0ceb19720832 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.spec.ts @@ -35,16 +35,14 @@ * knowledge of the CeCILL-C license and that you accept its terms. */ -import { ENVIRONMENT, GlobalEventService, InjectorModule, LoggerModule } from 'ui-frontend-common'; - import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; import { MatMenuModule } from '@angular/material/menu'; import { ActivatedRoute, Router } from '@angular/router'; - import { EMPTY, of } from 'rxjs'; +import { ENVIRONMENT, GlobalEventService, InjectorModule, LoggerModule, SearchBarComponent, SearchBarModule } from 'ui-frontend-common'; import { environment } from '../../environments/environment'; import { LogbookOperationComponent } from './logbook-operation.component'; import { LogbookSearchService } from './logbook-search.service'; @@ -53,29 +51,25 @@ describe('LogbookOperationComponent', () => { let component: LogbookOperationComponent; let fixture: ComponentFixture<LogbookOperationComponent>; - beforeEach(waitForAsync(() => { - const matDialogSpy = jasmine.createSpyObj('MatDialog', ['open']); - matDialogSpy.open.and.returnValue({ afterClosed: () => of(true) }); - TestBed.configureTestingModule({ - imports: [ - MatMenuModule, - ReactiveFormsModule, - InjectorModule, - LoggerModule.forRoot() - ], - declarations: [LogbookOperationComponent], - providers: [ - { provide: MatDialog, useValue: matDialogSpy }, - { provide: ActivatedRoute, useValue: { paramMap: EMPTY, data: EMPTY } }, - { provide: LogbookSearchService, useValue: { search: () => EMPTY } }, - { provide: Router, useValue: { navigate: () => { } } }, - GlobalEventService, - { provide: ENVIRONMENT, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] + beforeEach( + waitForAsync(() => { + const matDialogSpy = jasmine.createSpyObj('MatDialog', ['open']); + matDialogSpy.open.and.returnValue({ afterClosed: () => of(true) }); + TestBed.configureTestingModule({ + imports: [MatMenuModule, ReactiveFormsModule, InjectorModule, LoggerModule.forRoot(), SearchBarModule], + declarations: [LogbookOperationComponent, SearchBarComponent], + providers: [ + { provide: MatDialog, useValue: matDialogSpy }, + { provide: ActivatedRoute, useValue: { paramMap: EMPTY, data: EMPTY, queryParams: of({ guid: 'ID' }) } }, + { provide: LogbookSearchService, useValue: { search: () => EMPTY } }, + { provide: Router, useValue: { navigate: () => {} } }, + GlobalEventService, + { provide: ENVIRONMENT, useValue: environment }, + ], + schemas: [NO_ERRORS_SCHEMA], + }).compileComponents(); }) - .compileComponents(); - })); + ); beforeEach(() => { fixture = TestBed.createComponent(LogbookOperationComponent); diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts index 1fc486772154b569f523401913de768d28c31db0..3875b5e5f4c307b000b0bb05b82ee0d76c54b360 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.component.ts @@ -45,7 +45,7 @@ import { LogbookOperationListComponent } from './logbook-operation-list/logbook- @Component({ selector: 'app-logbook-operation', templateUrl: './logbook-operation.component.html', - styleUrls: ['./logbook-operation.component.scss'] + styleUrls: ['./logbook-operation.component.scss'], }) export class LogbookOperationComponent extends SidenavPage<any> implements OnInit { search = ''; @@ -70,14 +70,14 @@ export class LogbookOperationComponent extends SidenavPage<any> implements OnIni this.dateRangeFilterForm = this.formBuilder.group({ startDate: null, - endDate: null + endDate: null, }); this.dateRangeFilterForm.valueChanges.subscribe((value) => { this.filters = { type: this.filters.type, status: this.filters.status, - dateRange: value + dateRange: value, }; }); } diff --git a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts index c4bf621fc28132314926d2e2d44ba8f18986ac0c..432bd1bd6c9147f274177dc65cfecc303eceddaf 100644 --- a/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts +++ b/ui/ui-frontend/projects/referential/src/app/logbook-operation/logbook-operation.module.ts @@ -34,37 +34,33 @@ * The fact that you are presently reading this means that you have had * knowledge of the CeCILL-C license and that you accept its terms. */ -import {TableFilterModule, VitamUICommonModule} from 'ui-frontend-common'; - -import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; -import {ReactiveFormsModule} from '@angular/forms'; -import {MatDialogModule} from '@angular/material/dialog'; -import {MatNativeDateModule} from '@angular/material/core'; -import {MatDatepickerModule} from '@angular/material/datepicker'; -import {MatMenuModule} from '@angular/material/menu'; -import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; -import {MatSidenavModule} from '@angular/material/sidenav'; -import {MatTabsModule} from '@angular/material/tabs'; -import {MatSnackBarModule} from '@angular/material/snack-bar'; -import {MatSelectModule} from '@angular/material/select'; - -import { - LogbookOperationDetailComponent -} from './logbook-operation-detail/logbook-operation-detail.component'; -import { - LogbookOperationPopupComponent -} from './logbook-operation-detail/logbook-operation-popup.component'; -import {EventTypeBadgeClassPipe} from './logbook-operation-list/event-type-badge-class.pipe'; -import {EventTypeColorClassPipe} from './logbook-operation-list/event-type-color-class.pipe'; -import {LastEventPipe} from './logbook-operation-list/last-event.pipe'; -import {LogbookOperationListComponent} from './logbook-operation-list/logbook-operation-list.component'; -import {LogbookOperationRoutingModule} from './logbook-operation-routing.module'; -import {LogbookOperationComponent} from './logbook-operation.component'; +import { CommonModule } from '@angular/common'; +import { NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; +import { MatNativeDateModule } from '@angular/material/core'; +import { MatDatepickerModule } from '@angular/material/datepicker'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSidenavModule } from '@angular/material/sidenav'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatTabsModule } from '@angular/material/tabs'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { TableFilterModule, VitamUICommonModule } from 'ui-frontend-common'; +import { LogbookOperationDetailComponent } from './logbook-operation-detail/logbook-operation-detail.component'; +import { LogbookOperationPopupComponent } from './logbook-operation-detail/logbook-operation-popup.component'; +import { EventTypeBadgeClassPipe } from './logbook-operation-list/event-type-badge-class.pipe'; +import { EventTypeColorClassPipe } from './logbook-operation-list/event-type-color-class.pipe'; +import { LastEventPipe } from './logbook-operation-list/last-event.pipe'; +import { LogbookOperationListComponent } from './logbook-operation-list/logbook-operation-list.component'; +import { LogbookOperationRoutingModule } from './logbook-operation-routing.module'; +import { LogbookOperationComponent } from './logbook-operation.component'; @NgModule({ declarations: [ LogbookOperationComponent, + LogbookOperationListComponent, LogbookOperationDetailComponent, LogbookOperationPopupComponent, @@ -86,7 +82,8 @@ import {LogbookOperationComponent} from './logbook-operation.component'; LogbookOperationRoutingModule, MatNativeDateModule, MatSelectModule, - TableFilterModule - ] + TableFilterModule, + MatTooltipModule, + ], }) -export class LogbookOperationModule { } +export class LogbookOperationModule {}