251209:1453 Frontend: progress nest = UAT & Bug Fixing
Some checks failed
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-09 14:53:42 +07:00
parent 8aceced902
commit aa96cd90e3
125 changed files with 11052 additions and 785 deletions

View File

@@ -1,9 +1,9 @@
// File: lib/services/project.service.ts
import apiClient from "@/lib/api/client";
import {
CreateProjectDto,
UpdateProjectDto,
SearchProjectDto
import {
CreateProjectDto,
UpdateProjectDto,
SearchProjectDto
} from "@/types/dto/project/project.dto";
export const projectService = {
@@ -45,19 +45,21 @@ export const projectService = {
// --- Related Data / Dropdown Helpers ---
/** * ดึงรายชื่อองค์กรในโครงการ (สำหรับ Dropdown 'To/From')
/** * ดึงรายชื่อองค์กรในโครงการ (สำหรับ Dropdown 'To/From')
* GET /projects/:id/organizations
*/
getOrganizations: async (projectId: string | number) => {
const response = await apiClient.get(`/projects/${projectId}/organizations`);
return response.data;
// Unwrap the response data if it's wrapped in a 'data' property by the interceptor
return response.data.data || response.data;
},
/** * ดึงรายชื่อสัญญาในโครงการ
/** * ดึงรายชื่อสัญญาในโครงการ
* GET /projects/:id/contracts
*/
getContracts: async (projectId: string | number) => {
const response = await apiClient.get(`/projects/${projectId}/contracts`);
return response.data;
// Unwrap the response data if it's wrapped in a 'data' property by the interceptor
return response.data.data || response.data;
}
};
};