690327:1235 Fixing Refactor ADR-019 Naming convention uuid #15
CI / CD Pipeline / build (push) Successful in 5m27s
CI / CD Pipeline / deploy (push) Successful in 11m21s

This commit is contained in:
2026-03-27 12:35:08 +07:00
parent 2eab2e73d6
commit bb33e542c7
7 changed files with 45 additions and 7 deletions
+10 -1
View File
@@ -4,6 +4,15 @@ import { CreateProjectDto, UpdateProjectDto, SearchProjectDto } from '@/types/dt
import { toast } from 'sonner';
import { getApiErrorMessage } from '@/types/api-error';
export interface Project {
publicId: string;
projectCode: string;
projectName: string;
isActive: boolean;
createdAt?: string;
updatedAt?: string;
}
export const projectKeys = {
all: ['projects'] as const,
list: (params: SearchProjectDto) => [...projectKeys.all, 'list', params] as const,
@@ -11,7 +20,7 @@ export const projectKeys = {
};
export function useProjects(params?: SearchProjectDto) {
return useQuery({
return useQuery<Project[]>({
queryKey: projectKeys.list(params || {}),
queryFn: () => projectService.getAll(params),
});