};
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(', ') : '';
};
});
});
let service: ReservationActionsService;
let cookieServiceStub: Partial<CookieService>;
let printServiceStub: Partial<PrintService>;
+ let pcrudServiceStub: Partial<PcrudService>;
const routerSpy = {
navigate: jasmine.createSpy('navigate')
};
beforeEach(() => {
- const pcrudServiceStub = {};
- const cookieServiceStub = {};
+ pcrudServiceStub = {};
+ cookieServiceStub = {};
+ pcrudServiceStub = {};
+ cookieServiceStub = {};
+ printServiceStub = {};
TestBed.configureTestingModule({
providers: [
ReservationActionsService,
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(),
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()] = [];
}