Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Respirayson committed Jul 12, 2024
1 parent fcf4ee3 commit 2253a88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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);
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2253a88

Please sign in to comment.