@bindu-dashing/dam-solution-v2 5.8.194 → 5.8.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -236,7 +236,7 @@ const CreateClientForm = ({ teamsApi, username, password, toggleShow, onSuccess,
|
|
|
236
236
|
showNotification("No changes to save", NotificationStatus.INFO);
|
|
237
237
|
return;
|
|
238
238
|
}
|
|
239
|
-
const putResponse = yield axios.
|
|
239
|
+
const putResponse = yield axios.put(`${baseUrl}/brands/${brandIdForUpdate}`, payload, {
|
|
240
240
|
headers: {
|
|
241
241
|
'Authorization': `Bearer ${authToken}`,
|
|
242
242
|
'Content-Type': 'application/json',
|
|
@@ -244,8 +244,23 @@ function FolderTree({ currentRootId, expandedKeys, selectedKeys, handleExpand, s
|
|
|
244
244
|
fetchFolders(currentRootId);
|
|
245
245
|
}
|
|
246
246
|
else {
|
|
247
|
-
|
|
248
|
-
|
|
247
|
+
// Folder not in tree - it may be a nested subfolder (e.g. "Books Sub folder" under "Book")
|
|
248
|
+
// Fetch children for top-level folders until the target appears in the tree
|
|
249
|
+
console.log('## Folder not in tree - fetching children to find nested subfolder:', currentRootId);
|
|
250
|
+
(() => __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
setState((s) => (Object.assign(Object.assign({}, s), { loading: true })));
|
|
252
|
+
for (const folder of folders) {
|
|
253
|
+
const fid = get(folder, "_id");
|
|
254
|
+
if (!fid)
|
|
255
|
+
continue;
|
|
256
|
+
const hasChildrenLoaded = isArray(folder.children) && folder.children.length > 0;
|
|
257
|
+
if (!hasChildrenLoaded) {
|
|
258
|
+
yield fetchFolderChildren(fid);
|
|
259
|
+
// Effect will re-run when folders update; if target is now in tree, we'll expand
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
setState((s) => (Object.assign(Object.assign({}, s), { loading: false })));
|
|
263
|
+
}))();
|
|
249
264
|
}
|
|
250
265
|
}
|
|
251
266
|
}
|