Implement soft-delete for client targets and balance corrections

Deleting a target or correction sets deletedAt instead of hard-deleting.
Creating a target for a user+client that has a soft-deleted record
reactivates it (clears deletedAt, applies new weeklyHours/startDate)
rather than failing the unique constraint. All reads filter deletedAt = null
on the target, its corrections, and the parent client.
This commit is contained in:
simon.franken
2026-02-23 15:48:07 +01:00
parent 1b0f5866a1
commit ddb0926dba
4 changed files with 45 additions and 19 deletions

View File

@@ -152,6 +152,7 @@ export interface BalanceCorrection {
hours: number;
description: string | null;
createdAt: string;
deletedAt: string | null;
}
export interface WeekBalance {