feat(sites): accept work_month_start_day on create/update

This commit is contained in:
DEls 2026-09-11 22:24:59 +02:00
parent 41c4b41046
commit 7a9a1ca555
2 changed files with 3 additions and 0 deletions

View file

@ -37,6 +37,7 @@ export async function PATCH(
"work_hours",
"hours_per_week",
"wages_hours_per_day",
"work_month_start_day",
] as const) {
const v = body[k];
if (v === null || v === "") continue;

View file

@ -39,6 +39,7 @@ export async function POST(request: Request) {
"hours_per_week",
"wages_hours_per_day",
"job_start_date",
"work_month_start_day",
]) {
if (body[key] !== undefined && body[key] !== null && body[key] !== "") {
payload[key] = body[key];
@ -50,6 +51,7 @@ export async function POST(request: Request) {
"work_hours",
"hours_per_week",
"wages_hours_per_day",
"work_month_start_day",
]) {
if (typeof payload[key] === "string" && payload[key] === "") {
delete payload[key];