260318:1401 Fix UUID #05
Build and Deploy / deploy (push) Failing after 11m8s

This commit is contained in:
admin
2026-03-18 14:01:32 +07:00
parent ba642e7e42
commit e5769269a8
37 changed files with 460 additions and 328 deletions
+17 -16
View File
@@ -1,9 +1,9 @@
// File: lib/services/rfa.service.ts
import apiClient from "@/lib/api/client";
import {
CreateRfaDto,
UpdateRfaDto,
SearchRfaDto
import {
CreateRfaDto,
UpdateRfaDto,
SearchRfaDto
} from "@/types/dto/rfa/rfa.dto";
// DTO สำหรับการอนุมัติ (อาจจะย้ายไปไว้ใน folder dto/rfa/ ก็ได้ในอนาคต)
@@ -26,9 +26,9 @@ export const rfaService = {
/**
* ดึงรายละเอียด RFA และประวัติ Workflow
*/
getById: async (id: string | number) => {
// GET /rfas/:id
const response = await apiClient.get(`/rfas/${id}`);
getByUuid: async (uuid: string) => {
// GET /rfas/:uuid (ADR-019)
const response = await apiClient.get(`/rfas/${uuid}`);
return response.data;
},
@@ -44,26 +44,27 @@ export const rfaService = {
/**
* แก้ไข RFA (เฉพาะสถานะ Draft)
*/
update: async (id: string | number, data: UpdateRfaDto) => {
// PUT /rfas/:id
const response = await apiClient.put(`/rfas/${id}`, data);
update: async (uuid: string, data: UpdateRfaDto) => {
// PUT /rfas/:uuid (ADR-019)
const response = await apiClient.put(`/rfas/${uuid}`, data);
return response.data;
},
/**
* ดำเนินการ Workflow (อนุมัติ / ตีกลับ / ส่งต่อ)
*/
processWorkflow: async (id: string | number, actionData: WorkflowActionDto) => {
// POST /rfas/:id/workflow
const response = await apiClient.post(`/rfas/${id}/workflow`, actionData);
processWorkflow: async (uuid: string, actionData: WorkflowActionDto) => {
// POST /rfas/:uuid/workflow (ADR-019)
const response = await apiClient.post(`/rfas/${uuid}/workflow`, actionData);
return response.data;
},
/**
* (Optional) ลบ RFA (Soft Delete)
*/
delete: async (id: string | number) => {
const response = await apiClient.delete(`/rfas/${id}`);
delete: async (uuid: string) => {
// DELETE /rfas/:uuid (ADR-019)
const response = await apiClient.delete(`/rfas/${uuid}`);
return response.data;
}
};
};
+15 -15
View File
@@ -1,9 +1,9 @@
// File: lib/services/transmittal.service.ts
import apiClient from "@/lib/api/client";
import {
CreateTransmittalDto,
UpdateTransmittalDto,
SearchTransmittalDto
import {
CreateTransmittalDto,
UpdateTransmittalDto,
SearchTransmittalDto
} from "@/types/dto/transmittal/transmittal.dto";
export const transmittalService = {
@@ -17,11 +17,11 @@ export const transmittalService = {
},
/**
* ดึงรายละเอียด Transmittal ตาม ID
* ดึงรายละเอียด Transmittal ตาม UUID (ADR-019)
*/
getById: async (id: string | number) => {
// GET /transmittals/:id
const response = await apiClient.get(`/transmittals/${id}`);
getByUuid: async (uuid: string) => {
// GET /transmittals/:uuid
const response = await apiClient.get(`/transmittals/${uuid}`);
return response.data;
},
@@ -37,18 +37,18 @@ export const transmittalService = {
/**
* แก้ไขข้อมูล Transmittal (เฉพาะ Draft)
*/
update: async (id: string | number, data: UpdateTransmittalDto) => {
// PUT /transmittals/:id
const response = await apiClient.put(`/transmittals/${id}`, data);
update: async (uuid: string, data: UpdateTransmittalDto) => {
// PUT /transmittals/:uuid (ADR-019)
const response = await apiClient.put(`/transmittals/${uuid}`, data);
return response.data;
},
/**
* ลบเอกสาร (Soft Delete)
*/
delete: async (id: string | number) => {
// DELETE /transmittals/:id
const response = await apiClient.delete(`/transmittals/${id}`);
delete: async (uuid: string) => {
// DELETE /transmittals/:uuid (ADR-019)
const response = await apiClient.delete(`/transmittals/${uuid}`);
return response.data;
}
};
};