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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user