Anniversary categories (wedding, jubilee, own) and month grouping
- Birthday becomes "anniversary" with a category: birthday, wedding
anniversary (with Silver/Gold/... names), jubilee, memorial day
- Own categories: Settings > Categories (icon, color, text with {0}/{o})
- Sidebar "Categories" lists anniversaries across folders with counts
- Group by month (any view), groups fold with a click
- Folders named Hochzeit/Wedding migrate yearly tasks once
- Old files keep working (JSON "IsBirthday" maps to IsAnniversary)
- 74 tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using ReminderOrganizer.Core;
|
||||
using ReminderOrganizer.Models;
|
||||
using ReminderOrganizer.Services;
|
||||
@@ -64,9 +64,9 @@ namespace ReminderOrganizer.Tests
|
||||
data.Folders.Add(work);
|
||||
|
||||
Assert.Equal(1, data.MigrateBirthdays());
|
||||
Assert.True(bday.Tasks[0].IsBirthday);
|
||||
Assert.False(bday.Tasks[1].IsBirthday);
|
||||
Assert.False(work.Tasks[0].IsBirthday);
|
||||
Assert.True(bday.Tasks[0].IsAnniversary);
|
||||
Assert.False(bday.Tasks[1].IsAnniversary);
|
||||
Assert.False(work.Tasks[0].IsAnniversary);
|
||||
Assert.Equal(0, data.MigrateBirthdays());
|
||||
}
|
||||
|
||||
@@ -74,10 +74,10 @@ namespace ReminderOrganizer.Tests
|
||||
public void Birthday_display_has_no_time()
|
||||
{
|
||||
ReminderTask.DisplayCulture = () => new System.Globalization.CultureInfo("de-DE");
|
||||
var t = new ReminderTask("x", "", new DateTime(2027, 3, 19, 9, 0, 0)) { IsBirthday = true };
|
||||
var t = new ReminderTask("x", "", new DateTime(2027, 3, 19, 9, 0, 0)) { IsAnniversary = true };
|
||||
Assert.Equal("19. März", t.DisplayDate);
|
||||
Assert.Equal("MÄR", t.MonthText);
|
||||
t.IsBirthday = false;
|
||||
t.IsAnniversary = false;
|
||||
Assert.Equal("19.03.2027 09:00", t.DisplayDate);
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace ReminderOrganizer.Tests
|
||||
var data = new AppData();
|
||||
var f = new Folder("Geburtstage");
|
||||
f.Tasks.Add(new ReminderTask("Oma", "", new DateTime(2027, 1, 27, 9, 0, 0))
|
||||
{ IsBirthday = true, IsRecurring = true, RecurrenceType = RecurrenceType.Yearly, LeadDays = 1 });
|
||||
{ IsAnniversary = true, IsRecurring = true, RecurrenceType = RecurrenceType.Yearly, LeadDays = 1 });
|
||||
data.Folders.Add(f);
|
||||
var ics = IcsExport.Build(data, DateTime.UtcNow);
|
||||
Assert.Contains("DTSTART;VALUE=DATE:20270127", ics);
|
||||
|
||||
Reference in New Issue
Block a user