@overmap-ai/core 1.0.63-form-submission-drafts.1 → 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.
package/dist/overmap-core.js
CHANGED
|
@@ -5199,7 +5199,7 @@ class IssueTypeService extends BaseApiService {
|
|
|
5199
5199
|
offline_id: offlineIssueType.offline_id,
|
|
5200
5200
|
submitted_at: offlineIssueType.submitted_at,
|
|
5201
5201
|
icon: offlineIssueType.icon,
|
|
5202
|
-
|
|
5202
|
+
color: offlineIssueType.color,
|
|
5203
5203
|
name: offlineIssueType.name,
|
|
5204
5204
|
description: offlineIssueType.description
|
|
5205
5205
|
},
|
|
@@ -5213,24 +5213,24 @@ class IssueTypeService extends BaseApiService {
|
|
|
5213
5213
|
});
|
|
5214
5214
|
return [offlineIssueType, promise];
|
|
5215
5215
|
}
|
|
5216
|
-
update(
|
|
5216
|
+
update(payload) {
|
|
5217
5217
|
const { store } = this.client;
|
|
5218
5218
|
const state = store.getState();
|
|
5219
|
-
const issueTypeToBeUpdated = selectIssueType(
|
|
5219
|
+
const issueTypeToBeUpdated = selectIssueType(payload.offline_id)(state);
|
|
5220
5220
|
if (!issueTypeToBeUpdated) {
|
|
5221
|
-
throw new Error(`IssueType with offline_id ${
|
|
5221
|
+
throw new Error(`IssueType with offline_id ${payload.offline_id} does not exist in the store.`);
|
|
5222
5222
|
}
|
|
5223
5223
|
const offlineUpdatedIssueType = {
|
|
5224
5224
|
...issueTypeToBeUpdated,
|
|
5225
|
-
...
|
|
5225
|
+
...payload
|
|
5226
5226
|
};
|
|
5227
5227
|
this.dispatch(updateIssueType(offlineUpdatedIssueType));
|
|
5228
5228
|
const promise = this.enqueueRequest({
|
|
5229
5229
|
method: HttpMethod.PATCH,
|
|
5230
|
-
url: `/issues/types/${
|
|
5231
|
-
payload
|
|
5232
|
-
blockers: [
|
|
5233
|
-
blocks: [
|
|
5230
|
+
url: `/issues/types/${payload.offline_id}/`,
|
|
5231
|
+
payload,
|
|
5232
|
+
blockers: [payload.offline_id],
|
|
5233
|
+
blocks: [payload.offline_id]
|
|
5234
5234
|
});
|
|
5235
5235
|
promise.then((updatedIssueType) => {
|
|
5236
5236
|
this.dispatch(setIssueType(updatedIssueType));
|