mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
display work time in issue detail pane
This commit is contained in:
@@ -24,6 +24,15 @@ export async function getActiveTimedSession(userId: number, issueId: number) {
|
||||
return timedSession ?? null;
|
||||
}
|
||||
|
||||
export async function getInactiveTimedSessions(issueId: number) {
|
||||
const timedSessions = await db
|
||||
.select()
|
||||
.from(TimedSession)
|
||||
.where(and(eq(TimedSession.issueId, issueId), isNotNull(TimedSession.endedAt)))
|
||||
.orderBy(desc(TimedSession.createdAt));
|
||||
return timedSessions ?? null;
|
||||
}
|
||||
|
||||
export async function getTimedSessionById(id: number) {
|
||||
const [timedSession] = await db.select().from(TimedSession).where(eq(TimedSession.id, id));
|
||||
return timedSession ?? null;
|
||||
|
||||
Reference in New Issue
Block a user