@overmap-ai/core 1.0.63-form-submission-fix.4 → 1.0.63-org-projs-only.1
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 +117 -169
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +117 -169
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/FormService.d.ts +11 -15
- package/dist/sdk/services/FormSubmissionService.d.ts +5 -8
- package/dist/typings/models/attachments.d.ts +8 -5
- package/dist/typings/models/base.d.ts +1 -2
- package/dist/typings/models/forms.d.ts +3 -3
- package/dist/typings/models/license.d.ts +2 -2
- package/dist/typings/models/projects.d.ts +2 -4
- package/package.json +1 -1
|
@@ -2582,10 +2582,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2582
2582
|
],
|
|
2583
2583
|
(issues, forms, formRevisions, submissions, issueId) => {
|
|
2584
2584
|
const issue = issues[issueId];
|
|
2585
|
-
if (!issue)
|
|
2585
|
+
if (!issue || !issue.issue_type) {
|
|
2586
2586
|
return [];
|
|
2587
|
-
if (!issue.issue_type) {
|
|
2588
|
-
return Object.values(submissions).filter((submission) => submission.issue === issueId);
|
|
2589
2587
|
}
|
|
2590
2588
|
const issueTypeForms = new Set(
|
|
2591
2589
|
Object.keys(forms).filter((formId) => forms[formId].issue_type === issue.issue_type)
|
|
@@ -2640,10 +2638,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2640
2638
|
],
|
|
2641
2639
|
(assets, forms, formRevisions, submissions, assetId) => {
|
|
2642
2640
|
const asset = assets[assetId];
|
|
2643
|
-
if (!asset)
|
|
2641
|
+
if (!asset || !asset.asset_type) {
|
|
2644
2642
|
return [];
|
|
2645
|
-
if (!asset.asset_type) {
|
|
2646
|
-
return Object.values(submissions).filter((submission) => submission.asset === assetId);
|
|
2647
2643
|
}
|
|
2648
2644
|
const issueTypeForms = new Set(
|
|
2649
2645
|
Object.keys(forms).filter((formId) => forms[formId].asset_type === asset.asset_type)
|
|
@@ -5352,23 +5348,17 @@ var __publicField = (obj, key, value) => {
|
|
|
5352
5348
|
* @throws An APIError if the server returns an error, or any other error that may occur.
|
|
5353
5349
|
*/
|
|
5354
5350
|
async add(project) {
|
|
5355
|
-
if (!project.organization_owner && !project.user_owner) {
|
|
5356
|
-
throw new Error("Project type was not chosen when trying to create a project");
|
|
5357
|
-
}
|
|
5358
5351
|
if (!project.bounds && !project.canvas_bounds) {
|
|
5359
5352
|
throw new Error("Project must either have bounds or canvas_bounds set");
|
|
5360
5353
|
}
|
|
5361
|
-
const isOrganizationProject = !!project.organization_owner;
|
|
5362
|
-
const url = isOrganizationProject ? `/organizations/${project.organization_owner}/projects/` : "/projects/";
|
|
5363
|
-
const projectType = isOrganizationProject ? { organization_owner: project.organization_owner } : { user_owner: project.user_owner };
|
|
5364
5354
|
return await this.enqueueRequest({
|
|
5365
5355
|
description: "Create project",
|
|
5366
5356
|
method: HttpMethod.POST,
|
|
5367
|
-
url,
|
|
5357
|
+
url: "/projects/",
|
|
5368
5358
|
payload: {
|
|
5369
5359
|
name: project.name,
|
|
5370
5360
|
bounds: project.bounds,
|
|
5371
|
-
|
|
5361
|
+
organization_owner: project.organization_owner
|
|
5372
5362
|
},
|
|
5373
5363
|
blockers: [],
|
|
5374
5364
|
blocks: []
|
|
@@ -5495,67 +5485,36 @@ var __publicField = (obj, key, value) => {
|
|
|
5495
5485
|
}
|
|
5496
5486
|
return { fields: newFields, images };
|
|
5497
5487
|
};
|
|
5498
|
-
class FormService extends
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5488
|
+
class FormService extends BaseApiService {
|
|
5489
|
+
constructor() {
|
|
5490
|
+
super(...arguments);
|
|
5491
|
+
// Attach images to revision, after uploading them to S3
|
|
5492
|
+
__publicField(this, "getAttachImagePromises", (images, offlineRevisionId) => {
|
|
5493
|
+
return Object.entries(images).map(async ([key, image]) => {
|
|
5494
|
+
const sha1 = await hashFile(image);
|
|
5495
|
+
await this.client.files.addCache(image, sha1);
|
|
5496
|
+
const [fileProps] = await this.client.files.uploadFileToS3(sha1);
|
|
5497
|
+
const revisionAttachmentPayload = offline({
|
|
5498
|
+
...fileProps,
|
|
5499
|
+
revision: offlineRevisionId,
|
|
5500
|
+
field_identifier: key
|
|
5501
|
+
});
|
|
5502
|
+
const attach = await this.enqueueRequest({
|
|
5503
|
+
description: "Attach image to form revision field",
|
|
5504
|
+
method: HttpMethod.POST,
|
|
5505
|
+
url: `/forms/revisions/${offlineRevisionId}/attachments/`,
|
|
5506
|
+
payload: revisionAttachmentPayload,
|
|
5507
|
+
blockers: [revisionAttachmentPayload.revision],
|
|
5508
|
+
blocks: [revisionAttachmentPayload.offline_id]
|
|
5509
|
+
});
|
|
5510
|
+
const offlinePayload = {
|
|
5511
|
+
...revisionAttachmentPayload,
|
|
5512
|
+
file: URL.createObjectURL(image)
|
|
5513
5513
|
};
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
const offlineFormRevisionAttachment = offline({
|
|
5517
|
-
file: URL.createObjectURL(file),
|
|
5518
|
-
file_type: file.type,
|
|
5519
|
-
file_name: file.name,
|
|
5520
|
-
file_sha1: sha1,
|
|
5521
|
-
created_by: createdBy,
|
|
5522
|
-
revision: revisionId,
|
|
5523
|
-
submitted_at: submittedAt,
|
|
5524
|
-
field_identifier: fieldIdentifier
|
|
5514
|
+
this.dispatch(addFormRevisionAttachment(offlinePayload));
|
|
5515
|
+
return attach;
|
|
5525
5516
|
});
|
|
5526
|
-
offlineFormRevisionAttachments.push(offlineFormRevisionAttachment);
|
|
5527
|
-
const attachmentPayload = {
|
|
5528
|
-
offline_id: offlineFormRevisionAttachment.offline_id,
|
|
5529
|
-
name: file.name,
|
|
5530
|
-
field_identifier: fieldIdentifier,
|
|
5531
|
-
sha1
|
|
5532
|
-
};
|
|
5533
|
-
attachmentPayloads.push(attachmentPayload);
|
|
5534
|
-
}
|
|
5535
|
-
this.dispatch(addFormRevisionAttachments(offlineFormRevisionAttachments));
|
|
5536
|
-
const promise = this.enqueueRequest({
|
|
5537
|
-
description: "Attach files to form revision",
|
|
5538
|
-
method: HttpMethod.POST,
|
|
5539
|
-
url: `/forms/revisions/${revisionId}/attachments/bulk/`,
|
|
5540
|
-
payload: {
|
|
5541
|
-
submitted_at: submittedAt,
|
|
5542
|
-
attachments: attachmentPayloads,
|
|
5543
|
-
files: Object.values(filePayloads)
|
|
5544
|
-
},
|
|
5545
|
-
blockers: [revisionId],
|
|
5546
|
-
blocks: offlineFormRevisionAttachments.map((attachment) => attachment.offline_id)
|
|
5547
5517
|
});
|
|
5548
|
-
promise.then((result) => {
|
|
5549
|
-
this.processPresignedUrls(result.presigned_urls);
|
|
5550
|
-
this.dispatch(updateFormRevisionAttachments(result.attachments));
|
|
5551
|
-
}).catch(() => {
|
|
5552
|
-
this.dispatch(
|
|
5553
|
-
deleteFormRevisionAttachments(
|
|
5554
|
-
offlineFormRevisionAttachments.map((attachment) => attachment.offline_id)
|
|
5555
|
-
)
|
|
5556
|
-
);
|
|
5557
|
-
});
|
|
5558
|
-
return [offlineFormRevisionAttachments, promise.then(({ attachments }) => attachments)];
|
|
5559
5518
|
}
|
|
5560
5519
|
async add(ownerId, form, initialRevision, urlPrefix) {
|
|
5561
5520
|
const { fields, images } = await separateImageFromFields(initialRevision.fields);
|
|
@@ -5588,16 +5547,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5588
5547
|
blockers: [ownerId],
|
|
5589
5548
|
blocks: [form.offline_id, offlineFormRevision.offline_id]
|
|
5590
5549
|
});
|
|
5591
|
-
const
|
|
5592
|
-
offlineFormRevision.offline_id,
|
|
5593
|
-
images
|
|
5594
|
-
);
|
|
5550
|
+
const attachImagesPromises = this.getAttachImagePromises(images, offlineFormRevision.offline_id);
|
|
5595
5551
|
void formPromise.catch((e) => {
|
|
5596
5552
|
this.dispatch(deleteForm(form.offline_id));
|
|
5597
5553
|
this.dispatch(deleteFormRevision(offlineFormRevision.offline_id));
|
|
5598
5554
|
throw e;
|
|
5599
5555
|
});
|
|
5600
|
-
|
|
5556
|
+
const settledPromise = Promise.all([formPromise, ...attachImagesPromises]).then(() => formPromise);
|
|
5557
|
+
return [form, offlineFormRevision, formPromise, settledPromise];
|
|
5601
5558
|
}
|
|
5602
5559
|
addForOrganization(organizationId, initialRevision) {
|
|
5603
5560
|
const state = this.client.store.getState();
|
|
@@ -5679,16 +5636,14 @@ var __publicField = (obj, key, value) => {
|
|
|
5679
5636
|
blockers: [formId],
|
|
5680
5637
|
blocks: [offlineRevision.offline_id]
|
|
5681
5638
|
});
|
|
5682
|
-
const
|
|
5683
|
-
fullRevision.offline_id,
|
|
5684
|
-
images
|
|
5685
|
-
);
|
|
5639
|
+
const attachImagesPromises = this.getAttachImagePromises(images, offlineRevision.offline_id);
|
|
5686
5640
|
void promise.then((result) => {
|
|
5687
5641
|
this.dispatch(setFormRevision(result));
|
|
5688
5642
|
}).catch(() => {
|
|
5689
5643
|
this.dispatch(deleteFormRevision(fullRevision.offline_id));
|
|
5690
5644
|
});
|
|
5691
|
-
|
|
5645
|
+
const settledPromise = Promise.all([promise, ...attachImagesPromises]).then(() => promise);
|
|
5646
|
+
return [fullRevision, settledPromise];
|
|
5692
5647
|
}
|
|
5693
5648
|
async favorite(formId) {
|
|
5694
5649
|
const { store } = this.client;
|
|
@@ -5851,71 +5806,46 @@ var __publicField = (obj, key, value) => {
|
|
|
5851
5806
|
return { values: newValues, files };
|
|
5852
5807
|
};
|
|
5853
5808
|
class FormSubmissionService extends BaseUploadService {
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
const sha1 = await hashFile(file);
|
|
5863
|
-
if (!(sha1 in filePayloads)) {
|
|
5864
|
-
filePayloads[sha1] = {
|
|
5865
|
-
sha1,
|
|
5866
|
-
file_type: file.type,
|
|
5867
|
-
extension: file.name.split(".").pop(),
|
|
5868
|
-
size: file.size
|
|
5869
|
-
};
|
|
5809
|
+
constructor() {
|
|
5810
|
+
super(...arguments);
|
|
5811
|
+
// Attach files to submission, after uploading them to S3
|
|
5812
|
+
__publicField(this, "getAttachFilesPromises", (files, submission) => {
|
|
5813
|
+
return Object.entries(files).map(async ([key, fileArray]) => {
|
|
5814
|
+
const attachResults = [];
|
|
5815
|
+
for (const file of fileArray) {
|
|
5816
|
+
const sha1 = await hashFile(file);
|
|
5870
5817
|
await this.client.files.addCache(file, sha1);
|
|
5818
|
+
const [fileProps] = await this.client.files.uploadFileToS3(sha1);
|
|
5819
|
+
const submissionAttachmentPayload = offline({
|
|
5820
|
+
...fileProps,
|
|
5821
|
+
submission: submission.offline_id,
|
|
5822
|
+
field_identifier: key
|
|
5823
|
+
});
|
|
5824
|
+
const attach = await this.enqueueRequest({
|
|
5825
|
+
description: "Attach file to form submission",
|
|
5826
|
+
method: HttpMethod.POST,
|
|
5827
|
+
url: `/forms/submission/${submission.offline_id}/attachments/`,
|
|
5828
|
+
payload: submissionAttachmentPayload,
|
|
5829
|
+
blockers: [
|
|
5830
|
+
submission.asset,
|
|
5831
|
+
submission.asset_stage,
|
|
5832
|
+
submission.issue,
|
|
5833
|
+
submission.form_revision
|
|
5834
|
+
].filter((x) => x !== void 0),
|
|
5835
|
+
blocks: [submissionAttachmentPayload.offline_id]
|
|
5836
|
+
});
|
|
5837
|
+
const offlinePayload = {
|
|
5838
|
+
...submissionAttachmentPayload,
|
|
5839
|
+
file: URL.createObjectURL(file)
|
|
5840
|
+
};
|
|
5841
|
+
this.dispatch(addFormSubmissionAttachment(offlinePayload));
|
|
5842
|
+
attachResults.push(attach);
|
|
5871
5843
|
}
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
file_type: file.type,
|
|
5875
|
-
file_name: file.name,
|
|
5876
|
-
file_sha1: sha1,
|
|
5877
|
-
created_by: createdBy,
|
|
5878
|
-
submission: submissionId,
|
|
5879
|
-
submitted_at: submittedAt,
|
|
5880
|
-
field_identifier: fieldIdentifier
|
|
5881
|
-
});
|
|
5882
|
-
offlineFormSubmissionAttachments.push(offlineFormSubmissionAttachment);
|
|
5883
|
-
const attachmentPayload = {
|
|
5884
|
-
offline_id: offlineFormSubmissionAttachment.offline_id,
|
|
5885
|
-
name: file.name,
|
|
5886
|
-
sha1,
|
|
5887
|
-
field_identifier: fieldIdentifier
|
|
5888
|
-
};
|
|
5889
|
-
attachmentPayloads.push(attachmentPayload);
|
|
5890
|
-
}
|
|
5891
|
-
}
|
|
5892
|
-
this.dispatch(addFormSubmissionAttachments(offlineFormSubmissionAttachments));
|
|
5893
|
-
const promise = this.enqueueRequest({
|
|
5894
|
-
description: "Attach files to form submission",
|
|
5895
|
-
method: HttpMethod.POST,
|
|
5896
|
-
url: `/forms/submissions/${submissionId}/attachments/bulk/`,
|
|
5897
|
-
payload: {
|
|
5898
|
-
submitted_at: submittedAt,
|
|
5899
|
-
attachments: attachmentPayloads,
|
|
5900
|
-
files: Object.values(filePayloads)
|
|
5901
|
-
},
|
|
5902
|
-
blockers: [submissionId],
|
|
5903
|
-
blocks: offlineFormSubmissionAttachments.map((attachment) => attachment.offline_id)
|
|
5904
|
-
});
|
|
5905
|
-
promise.then((result) => {
|
|
5906
|
-
this.processPresignedUrls(result.presigned_urls);
|
|
5907
|
-
this.dispatch(updateFormSubmissionAttachments(result.attachments));
|
|
5908
|
-
}).catch(() => {
|
|
5909
|
-
this.dispatch(
|
|
5910
|
-
deleteFormSubmissionAttachments(
|
|
5911
|
-
offlineFormSubmissionAttachments.map((attachment) => attachment.offline_id)
|
|
5912
|
-
)
|
|
5913
|
-
);
|
|
5844
|
+
return attachResults;
|
|
5845
|
+
});
|
|
5914
5846
|
});
|
|
5915
|
-
return [offlineFormSubmissionAttachments, promise.then(({ attachments }) => attachments)];
|
|
5916
5847
|
}
|
|
5917
|
-
|
|
5918
|
-
async add(payload) {
|
|
5848
|
+
add(payload) {
|
|
5919
5849
|
const { store } = this.client;
|
|
5920
5850
|
const state = store.getState();
|
|
5921
5851
|
const activeProjectId = state.projectReducer.activeProjectId;
|
|
@@ -5923,12 +5853,12 @@ var __publicField = (obj, key, value) => {
|
|
|
5923
5853
|
throw new Error("Expected an active project");
|
|
5924
5854
|
}
|
|
5925
5855
|
const { values, files } = separateFilesFromValues(payload.values);
|
|
5926
|
-
const offlineSubmission =
|
|
5856
|
+
const offlineSubmission = {
|
|
5927
5857
|
...payload,
|
|
5928
5858
|
values,
|
|
5929
5859
|
created_by: state.userReducer.currentUser.id,
|
|
5930
5860
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
5931
|
-
}
|
|
5861
|
+
};
|
|
5932
5862
|
const promise = this.enqueueRequest({
|
|
5933
5863
|
description: "Respond to form",
|
|
5934
5864
|
method: HttpMethod.POST,
|
|
@@ -5937,22 +5867,20 @@ var __publicField = (obj, key, value) => {
|
|
|
5937
5867
|
blockers: [payload.issue, payload.asset, payload.asset_stage, "add-form-entry"].filter(
|
|
5938
5868
|
(x) => x !== void 0
|
|
5939
5869
|
),
|
|
5940
|
-
blocks: [
|
|
5870
|
+
blocks: [payload.offline_id]
|
|
5941
5871
|
});
|
|
5872
|
+
const attachFilesPromises = this.getAttachFilesPromises(files, offlineSubmission);
|
|
5942
5873
|
this.dispatch(addFormSubmission(offlineSubmission));
|
|
5943
|
-
|
|
5944
|
-
offlineSubmission.offline_id,
|
|
5945
|
-
files
|
|
5946
|
-
);
|
|
5947
|
-
promise.then((result) => {
|
|
5874
|
+
void promise.then((result) => {
|
|
5948
5875
|
this.dispatch(addActiveProjectFormSubmissionsCount(1));
|
|
5949
5876
|
this.dispatch(setFormSubmission(result));
|
|
5950
5877
|
return result;
|
|
5951
5878
|
}).catch(() => {
|
|
5952
|
-
this.dispatch(deleteFormSubmission(
|
|
5879
|
+
this.dispatch(deleteFormSubmission(payload.offline_id));
|
|
5953
5880
|
this.dispatch(addActiveProjectFormSubmissionsCount(-1));
|
|
5954
5881
|
});
|
|
5955
|
-
|
|
5882
|
+
const settledPromise = Promise.all([promise, ...attachFilesPromises]).then(() => promise);
|
|
5883
|
+
return [offlineSubmission, settledPromise];
|
|
5956
5884
|
}
|
|
5957
5885
|
// Note currently the bulkAdd method is specific to form submissions for assets
|
|
5958
5886
|
// TODO: adapt the support bulk adding to any model type
|
|
@@ -6053,6 +5981,36 @@ var __publicField = (obj, key, value) => {
|
|
|
6053
5981
|
});
|
|
6054
5982
|
return batchPromises;
|
|
6055
5983
|
}
|
|
5984
|
+
update(submission) {
|
|
5985
|
+
const { store } = this.client;
|
|
5986
|
+
const { values, files } = separateFilesFromValues(submission.values);
|
|
5987
|
+
const attachFilesPromises = this.getAttachFilesPromises(files, submission);
|
|
5988
|
+
const offlineSubmission = {
|
|
5989
|
+
...submission,
|
|
5990
|
+
values
|
|
5991
|
+
};
|
|
5992
|
+
const submissionToBeUpdated = selectFormSubmission(submission.offline_id)(store.getState());
|
|
5993
|
+
if (!submissionToBeUpdated) {
|
|
5994
|
+
throw new Error(`Expected submission with offline_id ${submission.offline_id} to exist`);
|
|
5995
|
+
}
|
|
5996
|
+
this.dispatch(updateFormSubmission(offlineSubmission));
|
|
5997
|
+
const promise = this.enqueueRequest({
|
|
5998
|
+
description: "Patch form submission",
|
|
5999
|
+
method: HttpMethod.PATCH,
|
|
6000
|
+
url: `/forms/submissions/${submission.offline_id}/`,
|
|
6001
|
+
payload: offlineSubmission,
|
|
6002
|
+
blockers: [offlineSubmission.issue, offlineSubmission.asset, offlineSubmission.asset_stage].filter(
|
|
6003
|
+
(x) => x !== void 0
|
|
6004
|
+
),
|
|
6005
|
+
blocks: [offlineSubmission.offline_id]
|
|
6006
|
+
});
|
|
6007
|
+
promise.then((createdSubmission) => {
|
|
6008
|
+
this.dispatch(setFormSubmission(createdSubmission));
|
|
6009
|
+
}).catch(() => {
|
|
6010
|
+
this.dispatch(setFormSubmission(submissionToBeUpdated));
|
|
6011
|
+
});
|
|
6012
|
+
return [offlineSubmission, Promise.all([promise, ...attachFilesPromises]).then(() => promise)];
|
|
6013
|
+
}
|
|
6056
6014
|
async delete(submissionId) {
|
|
6057
6015
|
const { store } = this.client;
|
|
6058
6016
|
const state = store.getState();
|
|
@@ -6523,9 +6481,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6523
6481
|
method: HttpMethod.GET,
|
|
6524
6482
|
url: `/billing/${license.offline_id}/`,
|
|
6525
6483
|
isAuthNeeded: true,
|
|
6526
|
-
blockers: [
|
|
6527
|
-
license.organization_owner ? license.organization_owner.toString() : license.user_owner ? license.user_owner.toString() : ""
|
|
6528
|
-
],
|
|
6484
|
+
blockers: [license.organization_owner ? license.organization_owner.toString() : ""],
|
|
6529
6485
|
blocks: []
|
|
6530
6486
|
});
|
|
6531
6487
|
this.dispatch(updateLicense(result));
|
|
@@ -6537,9 +6493,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6537
6493
|
method: HttpMethod.DELETE,
|
|
6538
6494
|
url: `/billing/${license.offline_id}/suspend/`,
|
|
6539
6495
|
isAuthNeeded: true,
|
|
6540
|
-
blockers: [
|
|
6541
|
-
license.organization_owner ? license.organization_owner.toString() : license.user_owner ? license.user_owner.toString() : ""
|
|
6542
|
-
],
|
|
6496
|
+
blockers: [license.organization_owner ? license.organization_owner.toString() : ""],
|
|
6543
6497
|
blocks: []
|
|
6544
6498
|
});
|
|
6545
6499
|
this.dispatch(updateLicense(result));
|
|
@@ -6551,9 +6505,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6551
6505
|
method: HttpMethod.PATCH,
|
|
6552
6506
|
url: `/billing/${license.offline_id}/suspend/`,
|
|
6553
6507
|
isAuthNeeded: true,
|
|
6554
|
-
blockers: [
|
|
6555
|
-
license.organization_owner ? license.organization_owner.toString() : license.user_owner ? license.user_owner.toString() : ""
|
|
6556
|
-
],
|
|
6508
|
+
blockers: [license.organization_owner ? license.organization_owner.toString() : ""],
|
|
6557
6509
|
blocks: []
|
|
6558
6510
|
});
|
|
6559
6511
|
this.dispatch(updateLicense(result));
|
|
@@ -6565,9 +6517,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6565
6517
|
method: HttpMethod.DELETE,
|
|
6566
6518
|
url: `/billing/${license.offline_id}/`,
|
|
6567
6519
|
isAuthNeeded: true,
|
|
6568
|
-
blockers: [
|
|
6569
|
-
license.organization_owner ? license.organization_owner.toString() : license.user_owner ? license.user_owner.toString() : ""
|
|
6570
|
-
],
|
|
6520
|
+
blockers: [license.organization_owner ? license.organization_owner.toString() : ""],
|
|
6571
6521
|
blocks: []
|
|
6572
6522
|
});
|
|
6573
6523
|
this.dispatch(updateLicense(result));
|
|
@@ -6581,7 +6531,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6581
6531
|
isAuthNeeded: true,
|
|
6582
6532
|
payload: { project: project.id },
|
|
6583
6533
|
blockers: [
|
|
6584
|
-
license.organization_owner ? license.organization_owner.toString() :
|
|
6534
|
+
license.organization_owner ? license.organization_owner.toString() : "",
|
|
6585
6535
|
project.id ? project.id.toString() : ""
|
|
6586
6536
|
],
|
|
6587
6537
|
blocks: ["add-issue", "add-form-entry", "change-access-level", "add-workspace"]
|
|
@@ -6595,9 +6545,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6595
6545
|
method: HttpMethod.DELETE,
|
|
6596
6546
|
url: `/billing/${license.offline_id}/project/`,
|
|
6597
6547
|
isAuthNeeded: true,
|
|
6598
|
-
blockers: [
|
|
6599
|
-
license.organization_owner ? license.organization_owner.toString() : license.user_owner ? license.user_owner.toString() : ""
|
|
6600
|
-
],
|
|
6548
|
+
blockers: [license.organization_owner ? license.organization_owner.toString() : ""],
|
|
6601
6549
|
blocks: ["add-issue", "add-form-entry", "change-access-level", "add-workspace"]
|
|
6602
6550
|
});
|
|
6603
6551
|
this.dispatch(updateLicense(result));
|