feat: Add savedIds to UPSERT response and update related components

- Enhanced the UPSERT process in DataService to include savedIds in the response, allowing tracking of newly saved record IDs.
- Updated the dataApi to reflect the new savedIds field in the Promise return type.
- Modified the SelectedItemsDetailInputComponent to handle and inject saved mapping IDs into detail records, improving data integrity and management during the save process.
- Added logging for savedIds to facilitate debugging and tracking of saved records.
This commit is contained in:
DDD1542
2026-02-10 10:06:53 +09:00
parent 45029bf5f4
commit 9e1a54c738
4 changed files with 24 additions and 3 deletions

View File

@@ -238,7 +238,7 @@ export const dataApi = {
parentKeys: Record<string, any>,
records: Array<Record<string, any>>,
options?: { deleteOrphans?: boolean }
): Promise<{ success: boolean; inserted?: number; updated?: number; deleted?: number; message?: string; error?: string }> => {
): Promise<{ success: boolean; inserted?: number; updated?: number; deleted?: number; savedIds?: string[]; message?: string; error?: string }> => {
try {
console.log("📡 [dataApi.upsertGroupedRecords] 요청 데이터:", {
tableName,