@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.
@@ -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
- icon_color: offlineIssueType.color,
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(issueTypeFields) {
5216
+ update(payload) {
5217
5217
  const { store } = this.client;
5218
5218
  const state = store.getState();
5219
- const issueTypeToBeUpdated = selectIssueType(issueTypeFields.offline_id)(state);
5219
+ const issueTypeToBeUpdated = selectIssueType(payload.offline_id)(state);
5220
5220
  if (!issueTypeToBeUpdated) {
5221
- throw new Error(`IssueType with offline_id ${issueTypeFields.offline_id} does not exist in the store.`);
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
- ...issueTypeFields
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/${issueTypeFields.offline_id}/`,
5231
- payload: issueTypeFields,
5232
- blockers: [issueTypeFields.offline_id],
5233
- blocks: [issueTypeFields.offline_id]
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));
@@ -6176,7 +6176,7 @@ class FormSubmissionService extends BaseUploadService {
6176
6176
  throw new Error(`Expected submission with offline_id ${payload.offline_id} to exist`);
6177
6177
  }
6178
6178
  const { values, files } = separateFilesFromValues(payload.values ?? {});
6179
- const updatedSubmission = offline({
6179
+ const updatedSubmission = {
6180
6180
  ...submissionToBeUpdated,
6181
6181
  ...payload,
6182
6182
  // values could also have a partial update
@@ -6184,7 +6184,7 @@ class FormSubmissionService extends BaseUploadService {
6184
6184
  ...submissionToBeUpdated.values,
6185
6185
  ...values
6186
6186
  }
6187
- });
6187
+ };
6188
6188
  this.dispatch(updateFormSubmission(updatedSubmission));
6189
6189
  const promise = this.enqueueRequest({
6190
6190
  description: "Delete user form submissions",