Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
70e2758
Notifications WIP
FleetAdmiralJakob Jun 8, 2026
82bc437
Merge branch 'main' into notifications
FleetAdmiralJakob Jun 8, 2026
cc1c7eb
Improve padding, colours and CTAs
FleetAdmiralJakob Jun 8, 2026
cd40ff7
Fix flashing on all switches when toggling one
FleetAdmiralJakob Jun 8, 2026
2f3281b
format and fix eslint error
FleetAdmiralJakob Jun 8, 2026
a9228c1
grey out everything if notifications in general are turned off
FleetAdmiralJakob Jun 8, 2026
956673a
Fix padding on Uhrzeit setting in notifications settings
FleetAdmiralJakob Jun 8, 2026
f79261a
Make the switch have the Dayova colour
FleetAdmiralJakob Jun 8, 2026
7435b3a
Switch Erinnerungszeit to bottom sheet
FleetAdmiralJakob Jun 8, 2026
4c9677e
Stabilize before-event notification keys
FleetAdmiralJakob Jun 9, 2026
c0d7b3f
Merge pull request #111 from Dayova/codex/github-mention-codex]-imple…
FleetAdmiralJakob Jun 9, 2026
ae0c594
Improve notification icons on Android
FleetAdmiralJakob Jun 9, 2026
d77bb6b
Get German grammar in the notifications right
FleetAdmiralJakob Jun 9, 2026
53066c3
Merge branch 'main' into notifications
FleetAdmiralJakob Jun 9, 2026
cc34ed1
fix formatting
FleetAdmiralJakob Jun 9, 2026
68465c5
Fix padding and stuff for the notification inbox
FleetAdmiralJakob Jun 9, 2026
500dcaa
Improve notification sync
FleetAdmiralJakob Jun 9, 2026
ef9bb3a
Smooth category transition
FleetAdmiralJakob Jun 9, 2026
11d9fbf
Fix notification system
FleetAdmiralJakob Jun 9, 2026
3c923de
Fixed padding on Mitteilungs Page in Settings
Gamius00 Jun 9, 2026
826e294
Add good animation for deletion and fix ok selection
FleetAdmiralJakob Jun 9, 2026
304e2ce
Merge remote-tracking branch 'origin/notifications' into notifications
FleetAdmiralJakob Jun 9, 2026
aa97daf
Fixed padding on iOS and different for Android
Gamius00 Jun 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ const config: ExpoConfig = {
plugins: [
"expo-router",
"@clerk/expo",
"expo-notifications",
[
"expo-notifications",
{
icon: "./assets/dayova-notification-icon.png",
color: "#3A7BFF",
},
],
[
"expo-image-picker",
{
Expand Down
Binary file added assets/dayova-notification-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions convex/_generated/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type * as generatedGermanTextRepair from "../generatedGermanTextRepair.js
import type * as learningPlanAi from "../learningPlanAi.js";
import type * as learningPlans from "../learningPlans.js";
import type * as learningTimes from "../learningTimes.js";
import type * as notifications from "../notifications.js";
import type * as scheduleConflicts from "../scheduleConflicts.js";
import type * as topicDescriptionValidation from "../topicDescriptionValidation.js";
import type * as users from "../users.js";
Expand All @@ -39,6 +40,7 @@ declare const fullApi: ApiFromModules<{
learningPlanAi: typeof learningPlanAi;
learningPlans: typeof learningPlans;
learningTimes: typeof learningTimes;
notifications: typeof notifications;
scheduleConflicts: typeof scheduleConflicts;
topicDescriptionValidation: typeof topicDescriptionValidation;
users: typeof users;
Expand Down
36 changes: 36 additions & 0 deletions convex/dayEntries.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,39 @@ test("retrying the same create returns the existing entry instead of conflicting
});
expect(entries["2026-06-15"]).toHaveLength(1);
});

test("manual entries can be marked completed and uncompleted", async () => {
const t = convexTest(schema, modules).withIdentity(user);
const entryId = await t.mutation(api.dayEntries.create, {
dayKey: "2026-06-16",
title: "Mathe Hausaufgabe",
time: "16:00",
kind: "Hausaufgabe",
plannedDateLabel: "16. Juni 2026",
durationMinutes: 45,
});

await expect(
t.mutation(api.dayEntries.setCompleted, {
id: entryId,
completed: true,
}),
).resolves.toBe(true);

let entries = await t.query(api.dayEntries.listByDayKeys, {
dayKeys: ["2026-06-16"],
});
expect(entries["2026-06-16"]?.[0]?.completed).toBe(true);

await expect(
t.mutation(api.dayEntries.setCompleted, {
id: entryId,
completed: false,
}),
).resolves.toBe(false);

entries = await t.query(api.dayEntries.listByDayKeys, {
dayKeys: ["2026-06-16"],
});
expect(entries["2026-06-16"]?.[0]?.completed).toBe(false);
});
33 changes: 33 additions & 0 deletions convex/dayEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,39 @@ export const create = mutation({
},
});

export const setCompleted = mutation({
args: {
id: v.id("dayEntries"),
completed: v.boolean(),
},
handler: async (ctx, args) => {
const ownerTokenIdentifier = await requireOwnerTokenIdentifier(ctx);
const entry = await ctx.db.get("dayEntries", args.id);
if (entry === null || entry.ownerTokenIdentifier !== ownerTokenIdentifier) {
throwUserFacingError("Eintrag nicht gefunden.");
}

await ctx.db.patch("dayEntries", args.id, {
completed: args.completed,
});

if (entry.relatedLearningPlanSessionId) {
const session = await ctx.db.get(
"learningPlanSessions",
entry.relatedLearningPlanSessionId,
);
if (session?.ownerTokenIdentifier === ownerTokenIdentifier) {
await ctx.db.patch("learningPlanSessions", session._id, {
completed: args.completed,
updatedAt: Date.now(),
});
}
}

return args.completed;
},
});

export const remove = mutation({
args: {
id: v.id("dayEntries"),
Expand Down
Loading