chore(format): Prettier auf day-entry.ts + TopNav.tsx anwenden

Alt-Bestand nie formatiert — isolierter Format-Lauf vor der myWeek-Query und
dem Woche-Nav-Tab.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Raffael SheikhandClaude Opus 4.8 committed 2026-06-07 12:37:59 +02:00
1 parent a0a2392e3d
commit 4311eadf50
2 files changed
+19 -14

No files matched your search

+15 -13
View File
@@ -104,11 +104,7 @@ export async function applyWorkdayBoundary(db: Db, userId: string, now: Date): P
* 06:00 des Folgetags — also noch fortsetzbar). `null`, wenn kein laufender/heutiger
* Tag existiert (→ Frontend zeigt das Einstempel-Formular).
*/
export async function getActiveEntry(
db: Db,
userId: string,
now: Date,
): Promise<DayEntry | null> {
export async function getActiveEntry(db: Db, userId: string, now: Date): Promise<DayEntry | null> {
await applyWorkdayBoundary(db, userId, now);
const entry = (
await db
@@ -130,11 +126,9 @@ export const dayEntryRouter = router({
*/
todayTeam: protectedProcedure.query(async ({ ctx }) => {
const date = todayIso();
const entries = await ctx.db
.select()
.from(dayEntry)
.where(eq(dayEntry.date, date));
if (entries.length === 0) return [] as Array<{ userId: string; entryStatus: string; todos: Todo[] }>;
const entries = await ctx.db.select().from(dayEntry).where(eq(dayEntry.date, date));
if (entries.length === 0)
return [] as Array<{ userId: string; entryStatus: string; todos: Todo[] }>;
const ids = entries.map((e) => e.id);
const todos = await ctx.db
.select()
@@ -339,7 +333,8 @@ export const dayEntryRouter = router({
if (!entry) {
throw new TRPCError({
code: 'BAD_REQUEST',
message: 'Kein fortsetzbarer Arbeitstag — der letzte Tag ist abgeschlossen. Stempel neu ein.',
message:
'Kein fortsetzbarer Arbeitstag — der letzte Tag ist abgeschlossen. Stempel neu ein.',
});
}
if (!entry.checkedOutAt) return entry; // läuft bereits
@@ -484,7 +479,10 @@ export const dayEntryRouter = router({
.mutation(async ({ ctx, input }) => {
const entry = await getActiveEntry(ctx.db, ctx.user.id, new Date());
if (!entry) {
throw new TRPCError({ code: 'BAD_REQUEST', message: 'Du bist gerade nicht eingestempelt.' });
throw new TRPCError({
code: 'BAD_REQUEST',
message: 'Du bist gerade nicht eingestempelt.',
});
}
const existing = await ctx.db
.select({ id: todo.id })
@@ -632,7 +630,11 @@ export const dayEntryRouter = router({
const ids = entries.map((e) => e.id);
const todoRows = ids.length
? await ctx.db.select().from(todo).where(inArray(todo.dayEntryId, ids)).orderBy(asc(todo.order))
? await ctx.db
.select()
.from(todo)
.where(inArray(todo.dayEntryId, ids))
.orderBy(asc(todo.order))
: [];
const todosByEntry = new Map<string, Todo[]>();
for (const t of todoRows) {
+4 -1
View File
@@ -37,7 +37,10 @@ export function TopNav() {
className="mx-auto flex h-14 max-w-[1280px] items-center gap-2 px-6"
aria-label="Hauptnavigation"
>
<NavLink to="/dashboard" className="flex items-center gap-1.5 font-bold text-[var(--color-ink)]">
<NavLink
to="/dashboard"
className="flex items-center gap-1.5 font-bold text-[var(--color-ink)]"
>
<span>{voice.appName}</span>
<ToolCtrlLogo size={18} />
</NavLink>