Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ describe('AssignedSiteDialogComponent', () => {
component.copyBreakSettings('monday');

const mondayBreak = component.assignedSiteForm.get('autoBreakSettings')?.get('monday');
expect(mondayBreak?.get('breakMinutesDivider')?.value).toBe(480);
expect(mondayBreak?.get('breakMinutesPrDivider')?.value).toBe(30);
expect(mondayBreak?.get('breakMinutesUpperLimit')?.value).toBe(60);
expect(mondayBreak?.get('breakMinutesDivider')?.value).toBe('08:00');
expect(mondayBreak?.get('breakMinutesPrDivider')?.value).toBe('00:30');
expect(mondayBreak?.get('breakMinutesUpperLimit')?.value).toBe('01:00');
});

it('should handle missing global settings gracefully', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Component, Inject, Input, OnDestroy, OnInit} from '@angular/core';
import {Subscription} from 'rxjs';
import {EMPTY, Subscription} from 'rxjs';
import {MatDatepickerInputEvent} from '@angular/material/datepicker';
import {SiteDto} from 'src/app/common/models';
import {
Expand Down Expand Up @@ -66,7 +66,7 @@ export class DownloadExcelDialogComponent implements OnInit, OnDestroy {
.pipe(catchError(
(error, caught) => {
this.toastrService.error('Error downloading report');
return caught;
return EMPTY;
}))
.subscribe(
(data) => {
Expand All @@ -83,9 +83,9 @@ export class DownloadExcelDialogComponent implements OnInit, OnDestroy {
this.downloadReportSub$ = this.workingHoursService
.downloadReportAllWorkers(model)
.pipe(catchError(
(caught) => {
(error) => {
this.toastrService.error('Error downloading report');
return caught;
return EMPTY;
}))
.subscribe(
(data) => {
Expand Down
Loading