From 2253a88aac81fcac0a679015619c84683e3f4839 Mon Sep 17 00:00:00 2001 From: Respirayson Date: Fri, 12 Jul 2024 16:48:34 +0800 Subject: [PATCH] Fix linting --- .../session-edit-form.component.spec.ts | 3 ++- .../session-edit-form/session-edit-form.component.ts | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/web/app/components/session-edit-form/session-edit-form.component.spec.ts b/src/web/app/components/session-edit-form/session-edit-form.component.spec.ts index 2e7bf3c2ccb..4be00441ab6 100644 --- a/src/web/app/components/session-edit-form/session-edit-form.component.spec.ts +++ b/src/web/app/components/session-edit-form/session-edit-form.component.spec.ts @@ -95,7 +95,8 @@ describe('SessionEditFormComponent', () => { expect(configureSubmissionOpeningTimeSpy).not.toHaveBeenCalled(); }); - it('should trigger the change of the model when the submission opening time changes to before the visibility time', () => { + it('should trigger the change of the model when the submission opening time ' + + 'changes to before the visibility time', () => { const date: DateFormat = { day: 12, month: 7, year: 2024 }; const time: TimeFormat = { hour: 4, minute: 0 }; const visibilityTime: TimeFormat = { hour: 14, minute: 0 }; diff --git a/src/web/app/components/session-edit-form/session-edit-form.component.ts b/src/web/app/components/session-edit-form/session-edit-form.component.ts index 91c3a35687d..b6fc2791afb 100644 --- a/src/web/app/components/session-edit-form/session-edit-form.component.ts +++ b/src/web/app/components/session-edit-form/session-edit-form.component.ts @@ -143,12 +143,12 @@ export class SessionEditFormComponent { adjustSessionVisibilityTime(value: any, field: string): void { const submissionDateTime = this.combineDateAndTime( field === 'submissionStartDate' ? value : this.model.submissionStartDate, - field === 'submissionStartTime' ? value : this.model.submissionStartTime + field === 'submissionStartTime' ? value : this.model.submissionStartTime, ); - + const visibilityDateTime = this.combineDateAndTime( this.model.customSessionVisibleDate, - this.model.customSessionVisibleTime + this.model.customSessionVisibleTime, ); if (submissionDateTime.isBefore(visibilityDateTime)) { @@ -169,7 +169,7 @@ export class SessionEditFormComponent { month: date.month - 1, day: date.day, hour: time.hour, - minute: time.minute + minute: time.minute, }, this.model.timeZone); } @@ -226,7 +226,7 @@ export class SessionEditFormComponent { configureSessionVisibleDateTime(date: DateFormat, time: TimeFormat): void { const sessionDate: DateFormat = this.model.customSessionVisibleDate; const sessionTime: TimeFormat = this.model.customSessionVisibleTime; - + if (DateTimeService.compareDateFormat(date, sessionDate) === -1) { this.model.customSessionVisibleDate = date; } else if (DateTimeService.compareDateFormat(date, sessionDate) === 0