From: Bill Erickson Date: Wed, 24 Jun 2020 16:25:16 +0000 (-0400) Subject: LP1884787 ng lint and unit test repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=298d252f426a793362f549e9457bba54b732b190;p=Evergreen.git LP1884787 ng lint and unit test repairs Minor lint update, some of which affected tests and required a few additional test spec updates. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts index 9f05c27759..6e3ae3563b 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts @@ -316,7 +316,8 @@ export class CreateReservationComponent implements OnInit, AfterViewInit, OnDest }; this.resources.forEach(resource => { this.cellTextGenerator[resource.barcode()] = row => { - return row.patrons[resource.barcode()] ? row.patrons[resource.barcode()].map(reservation => reservation['patronLabel']).join(', ') : ''; + return row.patrons[resource.barcode()] ? + row.patrons[resource.barcode()].map(reservation => reservation['patronLabel']).join(', ') : ''; }; }); }); diff --git a/Open-ILS/src/eg2/src/app/staff/booking/reservation-actions.spec.ts b/Open-ILS/src/eg2/src/app/staff/booking/reservation-actions.spec.ts index 10f8549a52..2c07f6b0f3 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/reservation-actions.spec.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/reservation-actions.spec.ts @@ -4,11 +4,12 @@ import { PcrudService } from '@eg/core/pcrud.service'; import { ReservationActionsService } from './reservation-actions.service'; describe('ReservationActionsService', () => { let service: ReservationActionsService; + let pcrudServiceStub: Partial; const routerSpy = { navigate: jasmine.createSpy('navigate') }; beforeEach(() => { - const pcrudServiceStub = {}; + pcrudServiceStub = {}; TestBed.configureTestingModule({ providers: [ ReservationActionsService, diff --git a/Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.service.ts b/Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.service.ts index 46929deb06..401eafaba1 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.service.ts @@ -101,7 +101,8 @@ export class ScheduleGridService { timezone) }; } - momentizeDay = (date: Date, start: NgbTimeStruct, end: NgbTimeStruct, timezone: string): {startTime: moment.Moment, endTime: moment.Moment} => { + momentizeDay = (date: Date, start: NgbTimeStruct, end: NgbTimeStruct, timezone: string): + {startTime: moment.Moment, endTime: moment.Moment} => { return { startTime: moment.tz([ date.getFullYear(), @@ -148,7 +149,7 @@ export class ScheduleGridService { schedule[index].time.clone().add(granularity, 'minutes'); if ((moment.tz(reservation.start_time(), timezone).isBefore(end)) && (moment.tz(reservation.end_time(), timezone).isAfter(start))) { - if (!schedule[index]['patrons']) schedule[index].patrons = {}; + if (!schedule[index]['patrons']) { schedule[index].patrons = {}; } if (!schedule[index].patrons[reservation.current_resource().barcode()]) { schedule[index].patrons[reservation.current_resource().barcode()] = []; }