fix(notdienst): resolve timezone offset mismatch in plan generation and fix linter warning in calendar modal

This commit is contained in:
t.indorf
2026-05-21 12:53:46 +02:00
parent cf3fb82afe
commit 9915c8213e
4 changed files with 28 additions and 18 deletions
@@ -517,7 +517,8 @@ function PlanPreviewTable({
</div>
<div className="divide-y divide-[var(--hairline-soft)]">
{days.map((day) => {
const dateObj = new Date(day.date);
const [yr, mo, dy] = day.date.slice(0, 10).split("-").map(Number);
const dateObj = new Date(yr, mo - 1, dy);
const assignedChild = allChildren.find(
(child) => child.id === day.childId,
);
@@ -574,7 +575,8 @@ function ManualAssignmentTable({
</div>
<div className="divide-y divide-[var(--hairline-soft)]">
{days.map((day) => {
const dateObj = new Date(day.date);
const [yr, mo, dy] = day.date.slice(0, 10).split("-").map(Number);
const dateObj = new Date(yr, mo - 1, dy);
const assignedChild = allChildren.find(
(child) => child.id === day.childId,
);