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:
@@ -152,6 +152,7 @@ export interface BalanceCorrection {
|
||||
hours: number;
|
||||
description: string | null;
|
||||
createdAt: string;
|
||||
deletedAt: string | null;
|
||||
}
|
||||
|
||||
export interface WeekBalance {
|
||||
|
||||
Reference in New Issue
Block a user