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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user