Skip to content

Interface: TimeTrackerEngineDeps

Defined in: shared/src/hooks/use-time-tracker-engine.ts:97

appointments: {
created_at: string;
description: string | null;
end_date: string;
id: string;
is_all_day: boolean;
reminder: string | null;
start_date: string;
status: "upcoming" | "active" | "finished" | "completed" | "missed";
title: string;
type: "work" | "private" | "meeting" | "blocked";
user_id: string;
work_project_id: string | null;
work_time_entry_id: string | null;
}[];

Defined in: shared/src/hooks/use-time-tracker-engine.ts:101

All appointments (from query)

created_at: string;
description: string | null;
end_date: string;
id: string;
is_all_day: boolean;
reminder: string | null;
start_date: string;
status: "upcoming" | "active" | "finished" | "completed" | "missed";
title: string;
type: "work" | "private" | "meeting" | "blocked";
user_id: string;
work_project_id: string | null;
work_time_entry_id: string | null;

optional callbacks: TimerEngineCallbacks;

Defined in: shared/src/hooks/use-time-tracker-engine.ts:122

Platform callbacks


mutations: {
addWorkTimeEntry: (entry, rounding) => Promise<
| {
id: string;
}[]
| null
| undefined>;
advancePomodoroPhase: (id, phase) => void;
incrementPomodoroSessions: (id) => void;
setPomodoroPhaseOvertime: (id, overtime) => void;
stopTimeTracker: (id) => void;
updateAppointment: (id, data) => Promise<unknown>;
};

Defined in: shared/src/hooks/use-time-tracker-engine.ts:105

Mutation functions

addWorkTimeEntry: (entry, rounding) => Promise<
| {
id: string;
}[]
| null
| undefined>;
ParameterType
entryInsertWorkTimeEntry
roundingTimerRoundingSettings

Promise< | { id: string; }[] | null | undefined>

advancePomodoroPhase: (id, phase) => void;
ParameterType
idstring
phase"focus" | "short-break" | "long-break"

void

incrementPomodoroSessions: (id) => void;
ParameterType
idstring

void

setPomodoroPhaseOvertime: (id, overtime) => void;
ParameterType
idstring
overtimeboolean

void

stopTimeTracker: (id) => void;
ParameterType
idstring

void

updateAppointment: (id, data) => Promise<unknown>;
ParameterType
idstring
data{ work_time_entry_id: string; }
data.work_time_entry_idstring

Promise<unknown>


pomodoroPreferences: PomodoroPreferences;

Defined in: shared/src/hooks/use-time-tracker-engine.ts:120

Pomodoro preferences (from settings store or defaults)


settings:
| {
automaticly_stop_other_timer: boolean;
background_color_mode: boolean;
color_mode: boolean;
created_at: string;
default_project_bank_account_id: string | null;
default_project_type: "hourly" | "project" | "hobby";
default_salary_amount: number;
format_24h: boolean;
id: string;
locale: "en-US" | "de-DE";
round_in_time_sections: boolean;
rounding_amount: "s" | "min" | "1/4h" | "1/2h" | "h" | "custom";
rounding_direction: "up" | "down" | "nearest";
rounding_interval: number;
show_calendar_time: boolean;
time_section_interval: number;
updated_at: string;
user_id: string;
}
| null
| undefined;

Defined in: shared/src/hooks/use-time-tracker-engine.ts:103

Global settings (from query, can be undefined if not loaded yet)


workProjects: WorkProject[];

Defined in: shared/src/hooks/use-time-tracker-engine.ts:99

All work projects (from query)