feat(DailyCheckbox): associate checkboxes with users and enhance daily view functionality
- Added userId field to DailyCheckbox model for user association. - Updated DailyService methods to handle user-specific checkbox retrieval and management. - Integrated user authentication checks in API routes and actions for secure access to daily data. - Enhanced DailyPage to display user-specific daily views, ensuring proper session handling. - Updated client and service interfaces to reflect changes in data structure.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { TfsConfig } from '@/services/integrations/tfs/tfs';
|
||||
import { Theme } from './ui-config';
|
||||
import { User } from '@/services/users';
|
||||
|
||||
// Réexporter Theme pour les autres modules
|
||||
export type { Theme };
|
||||
@@ -438,7 +439,9 @@ export interface DailyCheckbox {
|
||||
type: DailyCheckboxType;
|
||||
order: number;
|
||||
taskId?: string;
|
||||
userId: string;
|
||||
task?: Task; // Relation optionnelle vers une tâche
|
||||
user?: User; // Relation vers l'utilisateur
|
||||
isArchived?: boolean;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
@@ -447,6 +450,7 @@ export interface DailyCheckbox {
|
||||
// Interface pour créer/modifier une checkbox
|
||||
export interface CreateDailyCheckboxData {
|
||||
date: Date;
|
||||
userId: string;
|
||||
text: string;
|
||||
type?: DailyCheckboxType;
|
||||
taskId?: string;
|
||||
|
||||
Reference in New Issue
Block a user