@overmap-ai/core 1.0.63-form-submission-drafts.0 → 1.0.63-form-submission-drafts.2
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.
|
@@ -5187,7 +5187,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5187
5187
|
offline_id: offlineIssueType.offline_id,
|
|
5188
5188
|
submitted_at: offlineIssueType.submitted_at,
|
|
5189
5189
|
icon: offlineIssueType.icon,
|
|
5190
|
-
|
|
5190
|
+
color: offlineIssueType.color,
|
|
5191
5191
|
name: offlineIssueType.name,
|
|
5192
5192
|
description: offlineIssueType.description
|
|
5193
5193
|
},
|
|
@@ -5201,24 +5201,24 @@ var __publicField = (obj, key, value) => {
|
|
|
5201
5201
|
});
|
|
5202
5202
|
return [offlineIssueType, promise];
|
|
5203
5203
|
}
|
|
5204
|
-
update(
|
|
5204
|
+
update(payload) {
|
|
5205
5205
|
const { store } = this.client;
|
|
5206
5206
|
const state = store.getState();
|
|
5207
|
-
const issueTypeToBeUpdated = selectIssueType(
|
|
5207
|
+
const issueTypeToBeUpdated = selectIssueType(payload.offline_id)(state);
|
|
5208
5208
|
if (!issueTypeToBeUpdated) {
|
|
5209
|
-
throw new Error(`IssueType with offline_id ${
|
|
5209
|
+
throw new Error(`IssueType with offline_id ${payload.offline_id} does not exist in the store.`);
|
|
5210
5210
|
}
|
|
5211
5211
|
const offlineUpdatedIssueType = {
|
|
5212
5212
|
...issueTypeToBeUpdated,
|
|
5213
|
-
...
|
|
5213
|
+
...payload
|
|
5214
5214
|
};
|
|
5215
5215
|
this.dispatch(updateIssueType(offlineUpdatedIssueType));
|
|
5216
5216
|
const promise = this.enqueueRequest({
|
|
5217
5217
|
method: HttpMethod.PATCH,
|
|
5218
|
-
url: `/issues/types/${
|
|
5219
|
-
payload
|
|
5220
|
-
blockers: [
|
|
5221
|
-
blocks: [
|
|
5218
|
+
url: `/issues/types/${payload.offline_id}/`,
|
|
5219
|
+
payload,
|
|
5220
|
+
blockers: [payload.offline_id],
|
|
5221
|
+
blocks: [payload.offline_id]
|
|
5222
5222
|
});
|
|
5223
5223
|
promise.then((updatedIssueType) => {
|
|
5224
5224
|
this.dispatch(setIssueType(updatedIssueType));
|
|
@@ -6164,7 +6164,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6164
6164
|
throw new Error(`Expected submission with offline_id ${payload.offline_id} to exist`);
|
|
6165
6165
|
}
|
|
6166
6166
|
const { values, files } = separateFilesFromValues(payload.values ?? {});
|
|
6167
|
-
const updatedSubmission =
|
|
6167
|
+
const updatedSubmission = {
|
|
6168
6168
|
...submissionToBeUpdated,
|
|
6169
6169
|
...payload,
|
|
6170
6170
|
// values could also have a partial update
|
|
@@ -6172,7 +6172,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6172
6172
|
...submissionToBeUpdated.values,
|
|
6173
6173
|
...values
|
|
6174
6174
|
}
|
|
6175
|
-
}
|
|
6175
|
+
};
|
|
6176
6176
|
this.dispatch(updateFormSubmission(updatedSubmission));
|
|
6177
6177
|
const promise = this.enqueueRequest({
|
|
6178
6178
|
description: "Delete user form submissions",
|