690328:1106 Fixing Refactor uuid by Kimi #01
CI / CD Pipeline / build (push) Successful in 5m11s
CI / CD Pipeline / deploy (push) Failing after 4m28s

This commit is contained in:
2026-03-28 11:06:25 +07:00
parent 76b18e7c37
commit da8579d21b
24 changed files with 606 additions and 182 deletions
-9
View File
@@ -1,13 +1,11 @@
export interface ContractProjectReference {
publicId?: string;
id?: string;
projectCode: string;
projectName: string;
}
export interface Contract {
publicId?: string;
id?: string;
contractCode: string;
contractName: string;
projectId?: number | string;
@@ -16,10 +14,3 @@ export interface Contract {
endDate?: string;
project?: ContractProjectReference;
}
export const getContractPublicId = (contract?: Pick<Contract, 'publicId' | 'id'>): string =>
String(contract?.publicId ?? contract?.id ?? '');
export const getProjectPublicId = (
project?: Pick<ContractProjectReference, 'publicId' | 'id'>
): string => String(project?.publicId ?? project?.id ?? '');
+7 -12
View File
@@ -1,13 +1,11 @@
export interface Organization {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
organizationName: string;
organizationCode: string;
}
export interface Attachment {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
name: string;
url: string;
size?: number;
@@ -17,8 +15,7 @@ export interface Attachment {
// Used in List View mainly
export interface CorrespondenceRevision {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
revisionNumber: number;
revisionLabel?: string; // e.g. "A", "00"
subject: string;
@@ -42,22 +39,20 @@ export interface CorrespondenceRevision {
// Nested Relation from Backend Refactor
correspondence: {
publicId: string;
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
correspondenceNumber: string;
projectId: number;
originatorId?: number;
isInternal: boolean;
originator?: Organization;
project?: { publicId: string; id?: number; projectName: string; projectCode: string };
project?: { publicId: string; projectName: string; projectCode: string };
type?: { id: number; typeName: string; typeCode: string };
};
}
// Keep explicit Correspondence for Detail View if needed, or merge concepts
export interface Correspondence {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
correspondenceNumber: string;
projectId: number;
originatorId?: number;
@@ -67,7 +62,7 @@ export interface Correspondence {
// Relations
originator?: Organization;
project?: { publicId: string; id?: number; projectName: string; projectCode: string };
project?: { publicId: string; projectName: string; projectCode: string };
type?: { id: number; typeName: string; typeCode: string };
revisions?: CorrespondenceRevision[]; // Nested revisions
recipients?: {
+5 -10
View File
@@ -1,7 +1,6 @@
// Entity Interfaces
export interface DrawingRevision {
publicId: string; // ADR-019: exposed as 'id' in API responses
revisionId?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
revisionNumber: string;
title?: string; // Added
legacyDrawingNumber?: string; // Added
@@ -15,8 +14,7 @@ export interface DrawingRevision {
}
export interface ContractDrawing {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
contractDrawingNo: string;
title: string;
projectId: number;
@@ -28,8 +26,7 @@ export interface ContractDrawing {
}
export interface ShopDrawing {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
drawingNumber: string;
projectId: number;
mainCategoryId: number;
@@ -41,8 +38,7 @@ export interface ShopDrawing {
}
export interface AsBuiltDrawing {
publicId: string; // ADR-019: exposed as 'id' in API responses
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
drawingNumber: string;
projectId: number;
mainCategoryId: number;
@@ -54,8 +50,7 @@ export interface AsBuiltDrawing {
// Unified Type for List
export interface Drawing {
publicId?: string; // ADR-019: exposed as 'id' in API responses
drawingId?: number; // Excluded from API responses (ADR-019)
publicId?: string; // ADR-019: public identifier
drawingNumber: string;
title: string; // Display title (from current revision for Shop/AsBuilt)
discipline?: string | { disciplineCode: string; disciplineName: string };
-2
View File
@@ -17,7 +17,6 @@ export interface Discipline {
codeNameTh?: string;
isActive: boolean;
contract?: {
id?: number;
publicId?: string;
contractCode: string;
contractName: string;
@@ -33,7 +32,6 @@ export interface RfaType {
remark?: string;
isActive: boolean;
contract?: {
id?: number;
publicId?: string;
contractCode: string;
contractName: string;
+2 -4
View File
@@ -28,8 +28,7 @@ export interface RFAItem {
}
export interface RFA {
publicId: string; // ADR-019: from correspondence.publicId
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier (from correspondence.publicId)
rfaTypeId: number;
createdBy: number;
disciplineId?: number;
@@ -56,8 +55,7 @@ export interface RFA {
};
// Shared Correspondence Relation
correspondence?: {
publicId: string;
id?: number; // Excluded from API responses (ADR-019)
publicId: string; // ADR-019: public identifier
correspondenceNumber: string;
projectId: number;
originatorId?: number;