diff --git a/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/assigned-site/assigned-site-dialog.component.spec.ts b/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/assigned-site/assigned-site-dialog.component.spec.ts index 7f07d567..e95849a4 100644 --- a/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/assigned-site/assigned-site-dialog.component.spec.ts +++ b/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/assigned-site/assigned-site-dialog.component.spec.ts @@ -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', () => { diff --git a/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/download-excel/download-excel-dialog.component.ts b/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/download-excel/download-excel-dialog.component.ts index ff740866..a4c7d3f7 100644 --- a/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/download-excel/download-excel-dialog.component.ts +++ b/eform-client/src/app/plugins/modules/time-planning-pn/components/plannings/time-planning-actions/download-excel/download-excel-dialog.component.ts @@ -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 { @@ -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) => { @@ -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) => {