[agent-pipeline] pipe-20260329052843-hdtq round-2
This commit is contained in:
@@ -2110,7 +2110,7 @@ export class ButtonActionExecutor {
|
||||
const existingResponse = await DynamicFormApi.getTableData(tableName, {
|
||||
search: searchParams as any,
|
||||
page: 1,
|
||||
pageSize: 1000,
|
||||
page_size: 1000,
|
||||
});
|
||||
|
||||
// API 응답 구조에 따라 데이터 추출
|
||||
@@ -3060,7 +3060,7 @@ export class ButtonActionExecutor {
|
||||
console.log("다중 데이터 삭제:", { tableName, screenId, id: deleteId });
|
||||
|
||||
// screenId 전달하여 제어관리 실행 가능하도록 함
|
||||
const deleteResult = await DynamicFormApi.deleteFormDataFromTable(deleteId, tableName, screenId || "");
|
||||
const deleteResult = await DynamicFormApi.deleteFormDataFromTable(deleteId, tableName!, screenId);
|
||||
if (!deleteResult.success) {
|
||||
throw new Error(`ID ${deleteId} 삭제 실패: ${deleteResult.message}`);
|
||||
}
|
||||
@@ -4339,11 +4339,10 @@ export class ButtonActionExecutor {
|
||||
|
||||
const executionResult = await ImprovedButtonActionExecutor.executeButtonAction(buttonConfig as any, mergedFormData, {
|
||||
buttonId: context.buttonId || "unknown",
|
||||
screenId: context.screenId || "unknown",
|
||||
screenId: String(context.screenId ?? "unknown"),
|
||||
userId: context.userId || "unknown",
|
||||
companyCode: context.companyCode || "*",
|
||||
startTime: Date.now(),
|
||||
contextData: context,
|
||||
});
|
||||
|
||||
if (executionResult.success) {
|
||||
@@ -4604,11 +4603,10 @@ export class ButtonActionExecutor {
|
||||
context.formData || {},
|
||||
{
|
||||
buttonId: context.buttonId || "unknown",
|
||||
screenId: context.screenId || "unknown",
|
||||
screenId: String(context.screenId ?? "unknown"),
|
||||
userId: context.userId || "unknown",
|
||||
companyCode: context.companyCode || "*",
|
||||
startTime: Date.now(),
|
||||
contextData: context,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -6563,7 +6561,7 @@ export class ButtonActionExecutor {
|
||||
}
|
||||
|
||||
// dataTransfer 설정이 있는 경우
|
||||
const { targetType, targetComponentId, targetScreenId, receiveMode } = dataTransfer;
|
||||
const { targetType, targetComponentId, targetScreenId, mode: receiveMode } = dataTransfer;
|
||||
|
||||
// multiTableMappings 우선: 소스 테이블에 맞는 매핑 규칙 선택
|
||||
let mappingRules = dataTransfer.mappingRules;
|
||||
@@ -7256,9 +7254,9 @@ export class ButtonActionExecutor {
|
||||
columns: quickInsertConfig.duplicateCheck?.columns,
|
||||
});
|
||||
|
||||
if (quickInsertConfig.duplicateCheck?.enabled && quickInsertConfig.duplicateCheck?.columns?.length > 0) {
|
||||
if (quickInsertConfig.duplicateCheck?.enabled && (quickInsertConfig.duplicateCheck?.columns?.length ?? 0) > 0) {
|
||||
const duplicateCheckData: Record<string, any> = {};
|
||||
for (const col of quickInsertConfig.duplicateCheck.columns) {
|
||||
for (const col of quickInsertConfig.duplicateCheck.columns!) {
|
||||
if (insertData[col] !== undefined) {
|
||||
// 백엔드가 { value, operator } 형식을 기대하므로 변환
|
||||
duplicateCheckData[col] = { value: insertData[col], operator: "equals" };
|
||||
@@ -7608,7 +7606,7 @@ export class ButtonActionExecutor {
|
||||
[pkField]: pkValue, // PK 포함
|
||||
};
|
||||
|
||||
const response = await DynamicFormApi.updateData(tableName, updateData);
|
||||
const response = await DynamicFormApi.updateFormData(pkValue, { table_name: tableName, data: updateData });
|
||||
|
||||
if (response.success) {
|
||||
toast.success(config.successMessage || "상태가 변경되었습니다.");
|
||||
@@ -7933,21 +7931,6 @@ export const DEFAULT_BUTTON_ACTIONS: Record<ButtonActionType, Partial<ButtonActi
|
||||
successMessage: "데이터가 전달되었습니다.",
|
||||
errorMessage: "데이터 전달 중 오류가 발생했습니다.",
|
||||
},
|
||||
empty_vehicle: {
|
||||
type: "empty_vehicle",
|
||||
geolocationHighAccuracy: true,
|
||||
geolocationTimeout: 10000,
|
||||
geolocationMaxAge: 0,
|
||||
geolocationLatField: "latitude",
|
||||
geolocationLngField: "longitude",
|
||||
geolocationAutoSave: true,
|
||||
geolocationKeyField: "user_id",
|
||||
geolocationKeySourceField: "__userId__",
|
||||
geolocationExtraField: "status",
|
||||
geolocationExtraValue: "inactive",
|
||||
successMessage: "공차등록이 완료되었습니다.",
|
||||
errorMessage: "공차등록 중 오류가 발생했습니다.",
|
||||
},
|
||||
operation_control: {
|
||||
type: "operation_control",
|
||||
updateAutoSave: true,
|
||||
@@ -7980,4 +7963,7 @@ export const DEFAULT_BUTTON_ACTIONS: Record<ButtonActionType, Partial<ButtonActi
|
||||
type: "apiCall",
|
||||
successMessage: "처리되었습니다.",
|
||||
},
|
||||
openRelatedModal: {
|
||||
type: "openRelatedModal",
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user