Skip to content

Commit

Permalink
feat: apply code rabbit suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
adkif committed Oct 17, 2024
1 parent 8a3cf14 commit 3d556b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ export class LoggerService {
public error<T>(...message: T[]): void {
if (this._log) this._log.error(...message);
}

public warn(...message: any[]): void {
if (this._log) this._log.warn(...message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ export class TimeTrackerComponent implements OnInit, AfterViewInit {
if (!this.screenshots.length) {
const message = 'Attempted to open an empty image gallery.';
this.toastrService.warning(message);
this._loggerService.log.warn(`WARN: ${message}`);
this._loggerService.warn(`WARN: ${message}`);
return;
}
this.electronService.ipcRenderer.send('show_image', this.screenshots);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
ITaskStatusFindInput,
ITaskUpdateInput,
ITimeLog,
ITimeSlot,
TimeLogSourceEnum,
TimeLogType,
ITimeSlot
TimeLogType
} from '@gauzy/contracts';
import { toParams } from '@gauzy/ui-core/common';
import * as moment from 'moment';
Expand Down Expand Up @@ -402,7 +402,7 @@ export class TimeTrackerService {
return firstValueFrom(timeLogs$);
}

async getTimeSlot(values): Promise<ITimeSlot> {
async getTimeSlot(values: { timeSlotId: string }): Promise<ITimeSlot> {
const { timeSlotId } = values;
if (!timeSlotId) {
this._loggerService.log.warn('WARN: Time Slot ID should not be empty');
Expand Down

0 comments on commit 3d556b2

Please sign in to comment.