mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
more messing with time, applying default time on drag and drop
This commit is contained in:
@@ -19,6 +19,16 @@
|
||||
.Select(a => a.id)
|
||||
.Contains(Assignment.id)
|
||||
) ?? throw new Exception("in day callback, could not find module");
|
||||
|
||||
var defaultDueTimeDate = new DateTime(
|
||||
year: dropDate.Year,
|
||||
month: dropDate.Month,
|
||||
day: dropDate.Day,
|
||||
hour: planner.LocalCourse.DefaultDueTime.Hour,
|
||||
minute: planner.LocalCourse.DefaultDueTime.Minute,
|
||||
second: 0
|
||||
);
|
||||
|
||||
var moduleWithUpdatedAssignment = currentModule with
|
||||
{
|
||||
Assignments = currentModule.Assignments.Select(a =>
|
||||
@@ -26,7 +36,7 @@
|
||||
? a
|
||||
: a with
|
||||
{
|
||||
due_at=dropDate
|
||||
due_at=defaultDueTimeDate
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user