refactor(zeit): Pausen nicht mehr buchen — Lücken zwischen Tasks = Pause
Pause-Feature entfernt: kein Pause-Button, kein break-Buchen mehr. Man bucht nur Tasks; stoppt man eine Task und es läuft keine andere, ist die Lücke automatisch eine Pause — im Kalender/Tagesansicht schlicht leer. Tasks bleiben pausierbar (Stop = Pause, erneut Start = Fortsetzen → mehrere Segmente auf dieselbe Task, Lücke dazwischen leer). Wall-Clock zählt Lücken ohnehin nicht. - time.pause-Endpoint entfernt; 'break' aus der angebotenen Kategorienliste raus (bleibt im Enum für Altdaten). - TimerPill: Pause-Button + Pause-Panel-Grund entfernt; Stop/Start je Task bleibt (= pausieren/fortsetzen). Heute-ToDo-Zeile entsprechend beschriftet. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5bbb4abffa
commit
7f9a4506c5
4 files changed
+5
-69
No files matched your search
@@ -143,31 +143,6 @@ export const timeRouter = router({
|
||||
return { stopped };
|
||||
}),
|
||||
|
||||
/**
|
||||
* Pause: stoppt ALLE laufenden Tasks und startet eine Pause (break).
|
||||
*/
|
||||
pause: protectedProcedure
|
||||
.input(TimeEntrySchemas.pauseInput)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const now = new Date();
|
||||
const dayEntryId = await findCurrentDayEntryId(ctx.db, ctx.user.id);
|
||||
return ctx.db.transaction(async (tx) => {
|
||||
await stopAllActive(tx, ctx.user.id, now);
|
||||
const [brk] = await tx
|
||||
.insert(timeEntry)
|
||||
.values({
|
||||
userId: ctx.user.id,
|
||||
dayEntryId,
|
||||
category: 'break',
|
||||
description: input.description ?? null,
|
||||
startedAt: now,
|
||||
})
|
||||
.returning();
|
||||
if (!brk) throw new Error('Pause konnte nicht gestartet werden.');
|
||||
return brk;
|
||||
});
|
||||
}),
|
||||
|
||||
/**
|
||||
* Alle Time-Entries des heutigen Tages plus aktiver.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user