feat: user notification preferences UI and API endpoints

GET/PUT /api/user/notification-preferences with partial update support.
Toggle section in /account Admin tab (Email, SMS, Browser push).
3 new tests: defaults, full update, partial update.
Fix pre-existing timezone bug in exceptional hours tests (Truncate vs time.Date).
Update README, Technical Manual, and gap backlog (#15 struck out).
This commit is contained in:
2026-05-17 00:24:13 +01:00
parent 7fc58f58d9
commit b08df624a8
9 changed files with 462 additions and 62 deletions
+4 -2
View File
@@ -4154,7 +4154,8 @@ func TestBookings_Edit_ClosedDay_UserBlocked(t *testing.T) {
if daysToMonday == 0 {
daysToMonday = 7
}
weekStart := targetDate.AddDate(0, 0, -daysToMonday+1).Truncate(24 * time.Hour)
mondayDate := targetDate.AddDate(0, 0, -daysToMonday+1)
weekStart := time.Date(mondayDate.Year(), mondayDate.Month(), mondayDate.Day(), 0, 0, 0, 0, mondayDate.Location())
// Apply group to this week
_, err = db.DB.Exec(context.Background(),
@@ -4240,7 +4241,8 @@ func TestBookings_Edit_OpenDay_UserAllowed(t *testing.T) {
if daysToMonday == 0 {
daysToMonday = 7
}
weekStart := targetDate.AddDate(0, 0, -daysToMonday+1).Truncate(24 * time.Hour)
mondayDate := targetDate.AddDate(0, 0, -daysToMonday+1)
weekStart := time.Date(mondayDate.Year(), mondayDate.Month(), mondayDate.Day(), 0, 0, 0, 0, mondayDate.Location())
// Apply group to this week
_, err = db.DB.Exec(context.Background(),