feat(budget): gelir planı ve günlük plan

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 01:22:38 +03:00
parent 21b3715d35
commit 39aa19d168
8 changed files with 698 additions and 2 deletions
+6 -1
View File
@@ -5,7 +5,8 @@ import { z } from "zod";
import { tr } from "@/i18n/tr";
import { fail, type ActionResult } from "@/lib/action-result";
import { getHouseholdActionContext } from "@/lib/dal";
import { budgetLimitsSchema, budgetMonthSchema } from "@/shared/schemas/budget";
import { budgetLimitsSchema, budgetMonthSchema, incomeItemsSchema } from "@/shared/schemas/budget";
import { saveIncomeItems } from "./plan";
import { budgetFromActuals, copyPreviousBudget, saveBudget } from "./service";
function fieldErrors(error: z.ZodError) {
@@ -42,3 +43,7 @@ export async function copyPreviousBudgetAction(month: unknown) {
export async function budgetFromActualsAction(month: unknown) {
return run(budgetMonthSchema, month, budgetFromActuals);
}
export async function saveIncomeItemsAction(input: unknown) {
return run(incomeItemsSchema, input, saveIncomeItems);
}