File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,12 +106,12 @@ export const tasksApi = {
106106 if ( updates . priority !== undefined && updates . priority !== '' ) payload . priority = updates . priority ;
107107 if ( updates . status !== undefined && updates . status !== '' ) payload . status = updates . status . toLowerCase ( ) ;
108108 if ( updates . categoryId !== undefined && updates . categoryId !== '' ) {
109- ( payload as any ) . categoryId = updates . categoryId ;
109+ ( payload as Record < string , string > ) . categoryId = updates . categoryId ;
110110 payload . category = updates . categoryId ; // include non-ID alias too
111111 } else if ( updates . category !== undefined && updates . category !== '' ) {
112112 payload . category = updates . category ;
113113 // Include categoryId alias in case backend expects categoryId for partial updates
114- ( payload as any ) . categoryId = updates . category ;
114+ ( payload as Record < string , string > ) . categoryId = updates . category ;
115115 }
116116 if ( updates . projectId !== undefined && updates . projectId !== '' ) payload . projectId = updates . projectId ;
117117 if ( updates . startDate !== undefined ) payload . startDate = updates . startDate ;
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export default function MyTasks() {
8686 assignedTo : task . assignedTo || '' ,
8787 createdBy : task . createdBy || '' ,
8888 category : task . category || task . categoryId || '' ,
89- projectId : ( task as any ) . projectId || '' ,
89+ projectId : ( task as Task & { projectId ?: string } ) . projectId || '' ,
9090 comments : '' ,
9191 } ) ;
9292 setOpen ( true ) ;
@@ -212,8 +212,8 @@ export default function MyTasks() {
212212 setProjectsError ( null ) ;
213213 try {
214214 const fetched = await projectsApi . getProjectsForSelect ( ) ;
215- const normalized = fetched . map ( p => ( { ...( p as any ) , id : ( p as any ) . id || ( p as any ) . _id } ) ) ;
216- setProjects ( normalized as Project [ ] ) ;
215+ const normalized = fetched . map ( p => ( { ...p , id : p . id || ( p as Project & { _id ?: string } ) . _id || p . id } ) ) ;
216+ setProjects ( normalized ) ;
217217 } catch ( err : unknown ) {
218218 setProjectsError ( err instanceof Error ? err . message : 'Unable to load projects.' ) ;
219219 } finally {
You can’t perform that action at this time.
0 commit comments