feat(ui): drive prime schedule rows from weekday toggles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-06-02 16:40:41 +02:00
parent 81fd186fb2
commit 37738e3c8f
4 changed files with 66 additions and 26 deletions

View File

@@ -30,8 +30,8 @@ public sealed partial class PrimeClaudeTabViewModel : ViewModelBase
{
foreach (var r in Rows)
{
if (r.StartDate > r.EndDate)
return $"Schedule {r.TimeOfDay:hh\\:mm}: start date is after end date.";
if (r.DaysMask() == 0)
return $"Schedule {r.TimeOfDay:hh\\:mm}: select at least one day.";
if (r.TimeOfDay < TimeSpan.Zero || r.TimeOfDay >= TimeSpan.FromDays(1))
return "Time must be between 00:00 and 23:59.";
}
@@ -52,13 +52,10 @@ public sealed partial class PrimeClaudeTabViewModel : ViewModelBase
[RelayCommand]
private void AddSchedule()
{
var today = DateOnly.FromDateTime(DateTime.Today);
var dto = new PrimeScheduleDto(
Id: Guid.NewGuid(),
StartDate: today,
EndDate: today.AddDays(30),
Days: 31, // MonFri
TimeOfDay: new TimeSpan(7, 0, 0),
WorkdaysOnly: true,
Enabled: true,
LastRunAt: null,
PromptOverride: null);