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=056306ff6d5a845a3b5b220dca0223bc1ce8378e;p=evergreen%2Fmasslnc.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 c47af8d6dc..73e4e25fe1 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 @@ -8,12 +8,16 @@ describe('ReservationActionsService', () => { let service: ReservationActionsService; let cookieServiceStub: Partial; let printServiceStub: Partial; + let pcrudServiceStub: Partial; const routerSpy = { navigate: jasmine.createSpy('navigate') }; beforeEach(() => { - const pcrudServiceStub = {}; - const cookieServiceStub = {}; + pcrudServiceStub = {}; + cookieServiceStub = {}; + pcrudServiceStub = {}; + cookieServiceStub = {}; + printServiceStub = {}; 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()] = []; }