diff --git a/src/frontend/src/api/projects.ts b/src/frontend/src/api/projects.ts index f3c613f1..7720efb1 100644 --- a/src/frontend/src/api/projects.ts +++ b/src/frontend/src/api/projects.ts @@ -5,11 +5,12 @@ import { getTaskStates } from '@Services/project'; import { getUserProfileInfo } from '@Services/common'; export const useGetProjectsListQuery = ( + projectsFilterByOwner: 'yes' | 'no', queryOptions?: Partial, ) => { return useQuery({ - queryKey: ['projects-list'], - queryFn: getProjectsList, + queryKey: ['projects-list', projectsFilterByOwner], + queryFn: () => getProjectsList(projectsFilterByOwner === 'yes'), select: (res: any) => res.data, ...queryOptions, }); diff --git a/src/frontend/src/components/CreateProject/CreateprojectLayout/index.tsx b/src/frontend/src/components/CreateProject/CreateprojectLayout/index.tsx index 475a9a90..67129049 100644 --- a/src/frontend/src/components/CreateProject/CreateprojectLayout/index.tsx +++ b/src/frontend/src/components/CreateProject/CreateprojectLayout/index.tsx @@ -164,7 +164,7 @@ const CreateprojectLayout = () => { dispatch(resetUploadedAndDrawnAreas()); }, onError: err => { - toast.error(err.message); + toast.error(err?.response?.data?.detail || err?.message || ''); }, }); diff --git a/src/frontend/src/components/Dashboard/RequestLogs/index.tsx b/src/frontend/src/components/Dashboard/RequestLogs/index.tsx index 8f53573a..ccdde506 100644 --- a/src/frontend/src/components/Dashboard/RequestLogs/index.tsx +++ b/src/frontend/src/components/Dashboard/RequestLogs/index.tsx @@ -55,8 +55,9 @@ const RequestLogs = () => { className="naxatw-flex naxatw-h-fit naxatw-w-full naxatw-items-center naxatw-justify-between naxatw-rounded-xl naxatw-border naxatw-border-gray-300 naxatw-p-3" >
- The Task# {task.project_task_index} is requested - for Mapping + The Task# {task.project_task_index} from{' '} + {task?.project_name} project is requested for + Mapping.