feat: Enhance table data addition with inserted ID response
- Updated the `addTableData` method in `TableManagementService` to return the inserted ID after adding data to the table. - Modified the `addTableData` controller to log the inserted ID and include it in the API response, improving client-side data handling. - Enhanced the `BomTreeComponent` to support additional configurations and improve data loading logic. - Updated the `ButtonActionExecutor` to handle deferred saves with level-based grouping, ensuring proper ID mapping during master-detail saves.
This commit is contained in:
@@ -922,13 +922,14 @@ export async function addTableData(
|
||||
}
|
||||
|
||||
// 데이터 추가
|
||||
await tableManagementService.addTableData(tableName, data);
|
||||
const result = await tableManagementService.addTableData(tableName, data);
|
||||
|
||||
logger.info(`테이블 데이터 추가 완료: ${tableName}`);
|
||||
logger.info(`테이블 데이터 추가 완료: ${tableName}, id: ${result.insertedId}`);
|
||||
|
||||
const response: ApiResponse<null> = {
|
||||
const response: ApiResponse<{ id: string | null }> = {
|
||||
success: true,
|
||||
message: "테이블 데이터를 성공적으로 추가했습니다.",
|
||||
data: { id: result.insertedId },
|
||||
};
|
||||
|
||||
res.status(201).json(response);
|
||||
|
||||
Reference in New Issue
Block a user