@overmap-ai/core 1.0.46-project-attachments.3 → 1.0.46-project-attachments.5
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.
|
@@ -3677,9 +3677,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3677
3677
|
if (action.payload.filter(onlyUniqueOfflineIds).length !== action.payload.length) {
|
|
3678
3678
|
throw new Error("Tried to use setIssues reducer with duplicate ID's");
|
|
3679
3679
|
}
|
|
3680
|
-
|
|
3681
|
-
state.documents[document2.offline_id] = document2;
|
|
3682
|
-
}
|
|
3680
|
+
state.documents = toOfflineIdRecord(action.payload);
|
|
3683
3681
|
},
|
|
3684
3682
|
addDocuments: (state, action) => {
|
|
3685
3683
|
for (const document2 of action.payload) {
|
|
@@ -7289,6 +7287,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7289
7287
|
method: HttpMethod.POST,
|
|
7290
7288
|
url: `/projects/${activeProjectId}/create-document/`,
|
|
7291
7289
|
payload: { ...offlineDocument },
|
|
7290
|
+
queryParams: {
|
|
7291
|
+
parent_document: offlineDocument.parent_document ?? void 0
|
|
7292
|
+
},
|
|
7292
7293
|
// if adding as a child of another document, need that document to exist first
|
|
7293
7294
|
blockers: offlineDocument.parent_document ? [offlineDocument.parent_document] : [],
|
|
7294
7295
|
blocks: [offlineDocument.offline_id]
|
|
@@ -7316,7 +7317,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7316
7317
|
blocks: [document2.offline_id]
|
|
7317
7318
|
});
|
|
7318
7319
|
promise.catch(() => {
|
|
7319
|
-
|
|
7320
|
+
updateDocuments([documentToBeUpdated]);
|
|
7320
7321
|
});
|
|
7321
7322
|
const fullDocument = store.getState().documentsReducer.documents[document2.offline_id];
|
|
7322
7323
|
return [fullDocument, promise];
|
|
@@ -7360,9 +7361,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7360
7361
|
blocks: []
|
|
7361
7362
|
});
|
|
7362
7363
|
promise.then((result) => {
|
|
7363
|
-
|
|
7364
|
+
updateDocuments(result);
|
|
7364
7365
|
}).catch(() => {
|
|
7365
|
-
|
|
7366
|
+
updateDocuments(documentsToRevertIfMoveFails);
|
|
7366
7367
|
});
|
|
7367
7368
|
return promise;
|
|
7368
7369
|
}
|
|
@@ -7387,9 +7388,9 @@ var __publicField = (obj, key, value) => {
|
|
|
7387
7388
|
promise.then((documentsToUpdate) => {
|
|
7388
7389
|
store.dispatch(updateDocuments(documentsToUpdate));
|
|
7389
7390
|
}).catch(() => {
|
|
7390
|
-
store.dispatch(
|
|
7391
|
+
store.dispatch(updateDocuments([documentToBeDeleted]));
|
|
7391
7392
|
if (parentDocument) {
|
|
7392
|
-
store.dispatch(
|
|
7393
|
+
store.dispatch(updateDocuments([parentDocument]));
|
|
7393
7394
|
}
|
|
7394
7395
|
});
|
|
7395
7396
|
return promise;
|