@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.
|
@@ -3315,6 +3315,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3315
3315
|
deleteIssueAssociations
|
|
3316
3316
|
} = issueAssociationSlice.actions;
|
|
3317
3317
|
const selectIssueAssociationMapping = (state) => state.issueAssociationReducer.instances;
|
|
3318
|
+
const selectIssueAssociations = toolkit.createSelector([selectIssueAssociationMapping], (associations) => {
|
|
3319
|
+
return Object.values(associations);
|
|
3320
|
+
});
|
|
3318
3321
|
const selectIssueAssociationById = (id) => (state) => {
|
|
3319
3322
|
return state.issueAssociationReducer.instances[id];
|
|
3320
3323
|
};
|
|
@@ -5187,7 +5190,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5187
5190
|
offline_id: offlineIssueType.offline_id,
|
|
5188
5191
|
submitted_at: offlineIssueType.submitted_at,
|
|
5189
5192
|
icon: offlineIssueType.icon,
|
|
5190
|
-
|
|
5193
|
+
color: offlineIssueType.color,
|
|
5191
5194
|
name: offlineIssueType.name,
|
|
5192
5195
|
description: offlineIssueType.description
|
|
5193
5196
|
},
|
|
@@ -5201,24 +5204,24 @@ var __publicField = (obj, key, value) => {
|
|
|
5201
5204
|
});
|
|
5202
5205
|
return [offlineIssueType, promise];
|
|
5203
5206
|
}
|
|
5204
|
-
update(
|
|
5207
|
+
update(payload) {
|
|
5205
5208
|
const { store } = this.client;
|
|
5206
5209
|
const state = store.getState();
|
|
5207
|
-
const issueTypeToBeUpdated = selectIssueType(
|
|
5210
|
+
const issueTypeToBeUpdated = selectIssueType(payload.offline_id)(state);
|
|
5208
5211
|
if (!issueTypeToBeUpdated) {
|
|
5209
|
-
throw new Error(`IssueType with offline_id ${
|
|
5212
|
+
throw new Error(`IssueType with offline_id ${payload.offline_id} does not exist in the store.`);
|
|
5210
5213
|
}
|
|
5211
5214
|
const offlineUpdatedIssueType = {
|
|
5212
5215
|
...issueTypeToBeUpdated,
|
|
5213
|
-
...
|
|
5216
|
+
...payload
|
|
5214
5217
|
};
|
|
5215
5218
|
this.dispatch(updateIssueType(offlineUpdatedIssueType));
|
|
5216
5219
|
const promise = this.enqueueRequest({
|
|
5217
5220
|
method: HttpMethod.PATCH,
|
|
5218
|
-
url: `/issues/types/${
|
|
5219
|
-
payload
|
|
5220
|
-
blockers: [
|
|
5221
|
-
blocks: [
|
|
5221
|
+
url: `/issues/types/${payload.offline_id}/`,
|
|
5222
|
+
payload,
|
|
5223
|
+
blockers: [payload.offline_id],
|
|
5224
|
+
blocks: [payload.offline_id]
|
|
5222
5225
|
});
|
|
5223
5226
|
promise.then((updatedIssueType) => {
|
|
5224
5227
|
this.dispatch(setIssueType(updatedIssueType));
|
|
@@ -7882,6 +7885,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7882
7885
|
exports2.selectIssue = selectIssue;
|
|
7883
7886
|
exports2.selectIssueAssociationById = selectIssueAssociationById;
|
|
7884
7887
|
exports2.selectIssueAssociationMapping = selectIssueAssociationMapping;
|
|
7888
|
+
exports2.selectIssueAssociations = selectIssueAssociations;
|
|
7885
7889
|
exports2.selectIssueAssociationsOfAsset = selectIssueAssociationsOfAsset;
|
|
7886
7890
|
exports2.selectIssueAssociationsOfIssue = selectIssueAssociationsOfIssue;
|
|
7887
7891
|
exports2.selectIssueAssociationsToIssue = selectIssueAssociationsToIssue;
|