@overmap-ai/core 1.0.63-form-submission-drafts.1 → 1.0.63-form-submission-drafts.3
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
|
@@ -3327,6 +3327,9 @@ const {
|
|
|
3327
3327
|
deleteIssueAssociations
|
|
3328
3328
|
} = issueAssociationSlice.actions;
|
|
3329
3329
|
const selectIssueAssociationMapping = (state) => state.issueAssociationReducer.instances;
|
|
3330
|
+
const selectIssueAssociations = createSelector([selectIssueAssociationMapping], (associations) => {
|
|
3331
|
+
return Object.values(associations);
|
|
3332
|
+
});
|
|
3330
3333
|
const selectIssueAssociationById = (id) => (state) => {
|
|
3331
3334
|
return state.issueAssociationReducer.instances[id];
|
|
3332
3335
|
};
|
|
@@ -5199,7 +5202,7 @@ class IssueTypeService extends BaseApiService {
|
|
|
5199
5202
|
offline_id: offlineIssueType.offline_id,
|
|
5200
5203
|
submitted_at: offlineIssueType.submitted_at,
|
|
5201
5204
|
icon: offlineIssueType.icon,
|
|
5202
|
-
|
|
5205
|
+
color: offlineIssueType.color,
|
|
5203
5206
|
name: offlineIssueType.name,
|
|
5204
5207
|
description: offlineIssueType.description
|
|
5205
5208
|
},
|
|
@@ -5213,24 +5216,24 @@ class IssueTypeService extends BaseApiService {
|
|
|
5213
5216
|
});
|
|
5214
5217
|
return [offlineIssueType, promise];
|
|
5215
5218
|
}
|
|
5216
|
-
update(
|
|
5219
|
+
update(payload) {
|
|
5217
5220
|
const { store } = this.client;
|
|
5218
5221
|
const state = store.getState();
|
|
5219
|
-
const issueTypeToBeUpdated = selectIssueType(
|
|
5222
|
+
const issueTypeToBeUpdated = selectIssueType(payload.offline_id)(state);
|
|
5220
5223
|
if (!issueTypeToBeUpdated) {
|
|
5221
|
-
throw new Error(`IssueType with offline_id ${
|
|
5224
|
+
throw new Error(`IssueType with offline_id ${payload.offline_id} does not exist in the store.`);
|
|
5222
5225
|
}
|
|
5223
5226
|
const offlineUpdatedIssueType = {
|
|
5224
5227
|
...issueTypeToBeUpdated,
|
|
5225
|
-
...
|
|
5228
|
+
...payload
|
|
5226
5229
|
};
|
|
5227
5230
|
this.dispatch(updateIssueType(offlineUpdatedIssueType));
|
|
5228
5231
|
const promise = this.enqueueRequest({
|
|
5229
5232
|
method: HttpMethod.PATCH,
|
|
5230
|
-
url: `/issues/types/${
|
|
5231
|
-
payload
|
|
5232
|
-
blockers: [
|
|
5233
|
-
blocks: [
|
|
5233
|
+
url: `/issues/types/${payload.offline_id}/`,
|
|
5234
|
+
payload,
|
|
5235
|
+
blockers: [payload.offline_id],
|
|
5236
|
+
blocks: [payload.offline_id]
|
|
5234
5237
|
});
|
|
5235
5238
|
promise.then((updatedIssueType) => {
|
|
5236
5239
|
this.dispatch(setIssueType(updatedIssueType));
|
|
@@ -7895,6 +7898,7 @@ export {
|
|
|
7895
7898
|
selectIssue,
|
|
7896
7899
|
selectIssueAssociationById,
|
|
7897
7900
|
selectIssueAssociationMapping,
|
|
7901
|
+
selectIssueAssociations,
|
|
7898
7902
|
selectIssueAssociationsOfAsset,
|
|
7899
7903
|
selectIssueAssociationsOfIssue,
|
|
7900
7904
|
selectIssueAssociationsToIssue,
|