@overmap-ai/core 1.0.63-form-submission-fix.4 → 1.0.63-issue-association.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 +237 -111
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +237 -111
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/IssueAssociationService.d.ts +9 -0
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/issueAssociationSlice.d.ts +47 -0
- package/dist/store/store.d.ts +3 -2
- package/dist/typings/models/base.d.ts +1 -1
- package/dist/typings/models/issues.d.ts +12 -7
- package/dist/typings/models/store.d.ts +2 -1
- package/package.json +1 -1
package/dist/overmap-core.js
CHANGED
|
@@ -379,15 +379,15 @@ const wrapMigration = (migrator) => (state) => {
|
|
|
379
379
|
};
|
|
380
380
|
const migrations = [initialVersioning, signOut, signOut, createOutboxState];
|
|
381
381
|
const manifest = Object.fromEntries(migrations.map((migration2, i) => [i, wrapMigration(migration2)]));
|
|
382
|
-
const initialState$
|
|
382
|
+
const initialState$C = {
|
|
383
383
|
accessToken: "",
|
|
384
384
|
refreshToken: "",
|
|
385
385
|
isLoggedIn: false
|
|
386
386
|
};
|
|
387
387
|
const authSlice = createSlice({
|
|
388
388
|
name: "auth",
|
|
389
|
-
initialState: initialState$
|
|
390
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
389
|
+
initialState: initialState$C,
|
|
390
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$C)),
|
|
391
391
|
reducers: {
|
|
392
392
|
setTokens: (state, action) => {
|
|
393
393
|
state.accessToken = action.payload.accessToken;
|
|
@@ -857,11 +857,11 @@ function createModelAdapter(computeModelId) {
|
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
859
|
const categoryAdapter = createModelAdapter((category) => category.offline_id);
|
|
860
|
-
const initialState$
|
|
860
|
+
const initialState$B = categoryAdapter.getInitialState({});
|
|
861
861
|
const categorySlice = createSlice({
|
|
862
862
|
name: "categories",
|
|
863
|
-
initialState: initialState$
|
|
864
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
863
|
+
initialState: initialState$B,
|
|
864
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$B)),
|
|
865
865
|
reducers: {
|
|
866
866
|
initializeCategories: categoryAdapter.initialize,
|
|
867
867
|
addCategory: categoryAdapter.addOne,
|
|
@@ -891,11 +891,11 @@ const selectIssueCountOfCategory = (categoryId) => (state) => {
|
|
|
891
891
|
};
|
|
892
892
|
const categoryReducer = categorySlice.reducer;
|
|
893
893
|
const assetTypeAdapter = createModelAdapter((assetType) => assetType.offline_id);
|
|
894
|
-
const initialState$
|
|
894
|
+
const initialState$A = assetTypeAdapter.getInitialState({});
|
|
895
895
|
const assetTypeSlice = createSlice({
|
|
896
896
|
name: "assetTypes",
|
|
897
|
-
initialState: initialState$
|
|
898
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
897
|
+
initialState: initialState$A,
|
|
898
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$A)),
|
|
899
899
|
reducers: {
|
|
900
900
|
initializeAssetTypes: assetTypeAdapter.initialize,
|
|
901
901
|
addAssetType: assetTypeAdapter.addOne,
|
|
@@ -940,11 +940,11 @@ const selectAssetTypesByName = restructureCreateSelectorWithArgs(
|
|
|
940
940
|
);
|
|
941
941
|
const assetTypeReducer = assetTypeSlice.reducer;
|
|
942
942
|
const assetAdapter = createModelAdapter((asset) => asset.offline_id);
|
|
943
|
-
const initialState$
|
|
943
|
+
const initialState$z = assetAdapter.getInitialState({});
|
|
944
944
|
const assetSlice = createSlice({
|
|
945
945
|
name: "assets",
|
|
946
|
-
initialState: initialState$
|
|
947
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
946
|
+
initialState: initialState$z,
|
|
947
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$z)),
|
|
948
948
|
reducers: {
|
|
949
949
|
initializeAssets: (state, action) => {
|
|
950
950
|
assetAdapter.initialize(state, action);
|
|
@@ -1047,11 +1047,11 @@ const selectAssetTypesFromIds = (assetTypeIds) => (state) => {
|
|
|
1047
1047
|
};
|
|
1048
1048
|
const assetReducer = assetSlice.reducer;
|
|
1049
1049
|
const assetAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
1050
|
-
const initialState$
|
|
1050
|
+
const initialState$y = assetAttachmentAdapter.getInitialState({});
|
|
1051
1051
|
const assetAttachmentSlice = createSlice({
|
|
1052
1052
|
name: "assetAttachments",
|
|
1053
|
-
initialState: initialState$
|
|
1054
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1053
|
+
initialState: initialState$y,
|
|
1054
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$y)),
|
|
1055
1055
|
reducers: {
|
|
1056
1056
|
initializeAssetAttachments: assetAttachmentAdapter.initialize,
|
|
1057
1057
|
addAssetAttachment: assetAttachmentAdapter.addOne,
|
|
@@ -1109,13 +1109,13 @@ const selectAttachmentsOfAssetByType = restructureCreateSelectorWithArgs(
|
|
|
1109
1109
|
)
|
|
1110
1110
|
);
|
|
1111
1111
|
const assetAttachmentReducer = assetAttachmentSlice.reducer;
|
|
1112
|
-
const initialState$
|
|
1112
|
+
const initialState$x = {
|
|
1113
1113
|
completionsByAssetId: {}
|
|
1114
1114
|
};
|
|
1115
1115
|
const assetStageCompletionSlice = createSlice({
|
|
1116
1116
|
name: "assetStageCompletions",
|
|
1117
|
-
initialState: initialState$
|
|
1118
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1117
|
+
initialState: initialState$x,
|
|
1118
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$x)),
|
|
1119
1119
|
reducers: {
|
|
1120
1120
|
addStageCompletion: (state, action) => {
|
|
1121
1121
|
let stageToCompletionDateMapping = state.completionsByAssetId[action.payload.asset];
|
|
@@ -1167,11 +1167,11 @@ const selectCompletedStageIdsForAsset = restructureCreateSelectorWithArgs(
|
|
|
1167
1167
|
);
|
|
1168
1168
|
const assetStageCompletionReducer = assetStageCompletionSlice.reducer;
|
|
1169
1169
|
const assetStageAdapter = createModelAdapter((assetStage) => assetStage.offline_id);
|
|
1170
|
-
const initialState$
|
|
1170
|
+
const initialState$w = assetStageAdapter.getInitialState({});
|
|
1171
1171
|
const assetStageSlice = createSlice({
|
|
1172
1172
|
name: "assetStages",
|
|
1173
|
-
initialState: initialState$
|
|
1174
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1173
|
+
initialState: initialState$w,
|
|
1174
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$w)),
|
|
1175
1175
|
reducers: {
|
|
1176
1176
|
initializeStages: assetStageAdapter.initialize,
|
|
1177
1177
|
setStage: assetStageAdapter.setOne,
|
|
@@ -1252,11 +1252,11 @@ const assetStageReducer = assetStageSlice.reducer;
|
|
|
1252
1252
|
const assetTypeAttachmentAdapter = createModelAdapter(
|
|
1253
1253
|
(attachment) => attachment.offline_id
|
|
1254
1254
|
);
|
|
1255
|
-
const initialState$
|
|
1255
|
+
const initialState$v = assetTypeAttachmentAdapter.getInitialState({});
|
|
1256
1256
|
const assetTypeAttachmentSlice = createSlice({
|
|
1257
1257
|
name: "assetTypeAttachments",
|
|
1258
|
-
initialState: initialState$
|
|
1259
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1258
|
+
initialState: initialState$v,
|
|
1259
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$v)),
|
|
1260
1260
|
reducers: {
|
|
1261
1261
|
initializeAssetTypeAttachments: assetTypeAttachmentAdapter.initialize,
|
|
1262
1262
|
addAssetTypeAttachment: assetTypeAttachmentAdapter.addOne,
|
|
@@ -1315,10 +1315,10 @@ const selectAttachmentsOfAssetTypeByType = restructureCreateSelectorWithArgs(
|
|
|
1315
1315
|
);
|
|
1316
1316
|
const assetTypeAttachmentReducer = assetTypeAttachmentSlice.reducer;
|
|
1317
1317
|
const workspaceAdapter = createModelAdapter((workspace) => workspace.offline_id);
|
|
1318
|
-
const initialState$
|
|
1318
|
+
const initialState$u = workspaceAdapter.getInitialState({});
|
|
1319
1319
|
const workspaceSlice = createSlice({
|
|
1320
1320
|
name: "workspace",
|
|
1321
|
-
initialState: initialState$
|
|
1321
|
+
initialState: initialState$u,
|
|
1322
1322
|
reducers: {
|
|
1323
1323
|
initializeWorkspaces: workspaceAdapter.initialize,
|
|
1324
1324
|
setWorkspaces: workspaceAdapter.setMany,
|
|
@@ -1350,14 +1350,14 @@ const selectPermittedWorkspaceIds = createSelector(
|
|
|
1350
1350
|
const workspaceReducer = workspaceSlice.reducer;
|
|
1351
1351
|
const maxRecentIssues = 10;
|
|
1352
1352
|
const issueAdapter = createModelAdapter((issue) => issue.offline_id);
|
|
1353
|
-
const initialState$
|
|
1353
|
+
const initialState$t = issueAdapter.getInitialState({
|
|
1354
1354
|
recentIssueIds: []
|
|
1355
1355
|
});
|
|
1356
1356
|
const issueSlice = createSlice({
|
|
1357
1357
|
name: "issues",
|
|
1358
|
-
initialState: initialState$
|
|
1358
|
+
initialState: initialState$t,
|
|
1359
1359
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1360
|
-
Object.assign(state, initialState$
|
|
1360
|
+
Object.assign(state, initialState$t);
|
|
1361
1361
|
}),
|
|
1362
1362
|
reducers: {
|
|
1363
1363
|
initializeIssues: issueAdapter.initialize,
|
|
@@ -1501,12 +1501,12 @@ const selectRecentIssuesAsSearchResults = createSelector(
|
|
|
1501
1501
|
);
|
|
1502
1502
|
const issueReducer = issueSlice.reducer;
|
|
1503
1503
|
const issueTypeAdapter = createModelAdapter((issueType) => issueType.offline_id);
|
|
1504
|
-
const initialState$
|
|
1504
|
+
const initialState$s = issueTypeAdapter.getInitialState({});
|
|
1505
1505
|
const issueTypeSlice = createSlice({
|
|
1506
1506
|
name: "issueTypes",
|
|
1507
|
-
initialState: initialState$
|
|
1507
|
+
initialState: initialState$s,
|
|
1508
1508
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
1509
|
-
Object.assign(state, initialState$
|
|
1509
|
+
Object.assign(state, initialState$s);
|
|
1510
1510
|
}),
|
|
1511
1511
|
reducers: {
|
|
1512
1512
|
initializeIssueTypes: issueTypeAdapter.initialize,
|
|
@@ -1555,15 +1555,15 @@ const selectIssuesOfIssueTypeCount = (issueTypeId) => (state) => {
|
|
|
1555
1555
|
return ((_a2 = selectIssuesOfIssueType(issueTypeId)(state)) == null ? void 0 : _a2.length) ?? 0;
|
|
1556
1556
|
};
|
|
1557
1557
|
const issueTypeReducer = issueTypeSlice.reducer;
|
|
1558
|
-
const initialState$
|
|
1558
|
+
const initialState$r = {
|
|
1559
1559
|
s3Urls: {}
|
|
1560
1560
|
};
|
|
1561
1561
|
const msPerHour = 1e3 * 60 * 60;
|
|
1562
1562
|
const msPerWeek = msPerHour * 24 * 7;
|
|
1563
1563
|
const fileSlice = createSlice({
|
|
1564
1564
|
name: "file",
|
|
1565
|
-
initialState: initialState$
|
|
1566
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1565
|
+
initialState: initialState$r,
|
|
1566
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$r)),
|
|
1567
1567
|
reducers: {
|
|
1568
1568
|
setUploadUrl: (state, action) => {
|
|
1569
1569
|
const { url, fields, sha1 } = action.payload;
|
|
@@ -1644,7 +1644,7 @@ var LicenseStatus = /* @__PURE__ */ ((LicenseStatus2) => {
|
|
|
1644
1644
|
LicenseStatus2[LicenseStatus2["PAST_DUE"] = 8] = "PAST_DUE";
|
|
1645
1645
|
return LicenseStatus2;
|
|
1646
1646
|
})(LicenseStatus || {});
|
|
1647
|
-
const initialState$
|
|
1647
|
+
const initialState$q = {
|
|
1648
1648
|
users: {},
|
|
1649
1649
|
currentUser: {
|
|
1650
1650
|
id: 0,
|
|
@@ -1655,8 +1655,8 @@ const initialState$p = {
|
|
|
1655
1655
|
};
|
|
1656
1656
|
const userSlice = createSlice({
|
|
1657
1657
|
name: "users",
|
|
1658
|
-
initialState: initialState$
|
|
1659
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1658
|
+
initialState: initialState$q,
|
|
1659
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$q)),
|
|
1660
1660
|
reducers: {
|
|
1661
1661
|
setUsers: (state, action) => {
|
|
1662
1662
|
const usersMapping = {};
|
|
@@ -1721,11 +1721,11 @@ const userReducer = userSlice.reducer;
|
|
|
1721
1721
|
const organizationAccessAdapter = createModelAdapter(
|
|
1722
1722
|
(organizationAccess) => organizationAccess.offline_id
|
|
1723
1723
|
);
|
|
1724
|
-
const initialState$
|
|
1724
|
+
const initialState$p = organizationAccessAdapter.getInitialState({});
|
|
1725
1725
|
const organizationAccessSlice = createSlice({
|
|
1726
1726
|
name: "organizationAccess",
|
|
1727
|
-
initialState: initialState$
|
|
1728
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1727
|
+
initialState: initialState$p,
|
|
1728
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$p)),
|
|
1729
1729
|
reducers: {
|
|
1730
1730
|
initializeOrganizationAccesses: organizationAccessAdapter.initialize,
|
|
1731
1731
|
updateOrganizationAccess: organizationAccessAdapter.updateOne,
|
|
@@ -1762,11 +1762,11 @@ const selectOrganizationAccessUserMapping = (state) => {
|
|
|
1762
1762
|
};
|
|
1763
1763
|
const organizationAccessReducer = organizationAccessSlice.reducer;
|
|
1764
1764
|
const licenseAdapter = createModelAdapter((license) => license.offline_id);
|
|
1765
|
-
const initialState$
|
|
1765
|
+
const initialState$o = licenseAdapter.getInitialState({});
|
|
1766
1766
|
const licenseSlice = createSlice({
|
|
1767
1767
|
name: "license",
|
|
1768
|
-
initialState: initialState$
|
|
1769
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1768
|
+
initialState: initialState$o,
|
|
1769
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$o)),
|
|
1770
1770
|
reducers: {
|
|
1771
1771
|
initializeLicences: licenseAdapter.initialize,
|
|
1772
1772
|
addLicenses: licenseAdapter.addMany,
|
|
@@ -1792,11 +1792,11 @@ const selectLicensesForProjectsMapping = createSelector(
|
|
|
1792
1792
|
);
|
|
1793
1793
|
const licenseReducer = licenseSlice.reducer;
|
|
1794
1794
|
const projectAccessAdapter = createModelAdapter((projectAccess) => projectAccess.offline_id);
|
|
1795
|
-
const initialState$
|
|
1795
|
+
const initialState$n = projectAccessAdapter.getInitialState({});
|
|
1796
1796
|
const projectAccessSlice = createSlice({
|
|
1797
1797
|
name: "projectAccess",
|
|
1798
|
-
initialState: initialState$
|
|
1799
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1798
|
+
initialState: initialState$n,
|
|
1799
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$n)),
|
|
1800
1800
|
reducers: {
|
|
1801
1801
|
initializeProjectAccesses: projectAccessAdapter.initialize,
|
|
1802
1802
|
updateProjectAccess: projectAccessAdapter.updateOne,
|
|
@@ -1842,14 +1842,14 @@ const selectProjectAccessUserMapping = (state) => {
|
|
|
1842
1842
|
return projectAccesses;
|
|
1843
1843
|
};
|
|
1844
1844
|
const projectAccessReducer = projectAccessSlice.reducer;
|
|
1845
|
-
const initialState$
|
|
1845
|
+
const initialState$m = {
|
|
1846
1846
|
projects: {},
|
|
1847
1847
|
activeProjectId: null
|
|
1848
1848
|
};
|
|
1849
1849
|
const projectSlice = createSlice({
|
|
1850
1850
|
name: "projects",
|
|
1851
|
-
initialState: initialState$
|
|
1852
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1851
|
+
initialState: initialState$m,
|
|
1852
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$m)),
|
|
1853
1853
|
reducers: {
|
|
1854
1854
|
setProjects: (state, action) => {
|
|
1855
1855
|
const projectsMap = {};
|
|
@@ -1963,13 +1963,13 @@ const selectSortedProjectUsers = createSelector(
|
|
|
1963
1963
|
});
|
|
1964
1964
|
}
|
|
1965
1965
|
);
|
|
1966
|
-
const initialState$
|
|
1966
|
+
const initialState$l = {
|
|
1967
1967
|
organizations: {}
|
|
1968
1968
|
};
|
|
1969
1969
|
const organizationSlice = createSlice({
|
|
1970
1970
|
name: "organizations",
|
|
1971
|
-
initialState: initialState$
|
|
1972
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
1971
|
+
initialState: initialState$l,
|
|
1972
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$l)),
|
|
1973
1973
|
reducers: {
|
|
1974
1974
|
setOrganizations: (state, action) => {
|
|
1975
1975
|
for (const org of action.payload) {
|
|
@@ -2052,14 +2052,14 @@ const createOfflineAction = (request2, baseUrl, serviceName) => {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
};
|
|
2054
2054
|
};
|
|
2055
|
-
const initialState$
|
|
2055
|
+
const initialState$k = {
|
|
2056
2056
|
deletedRequests: [],
|
|
2057
2057
|
latestRetryTime: 0
|
|
2058
2058
|
};
|
|
2059
2059
|
const outboxSlice = createSlice({
|
|
2060
2060
|
name: "outbox",
|
|
2061
|
-
initialState: initialState$
|
|
2062
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2061
|
+
initialState: initialState$k,
|
|
2062
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$k)),
|
|
2063
2063
|
reducers: {
|
|
2064
2064
|
// enqueueActions is a reducer that does nothing but enqueue API request to the Redux Offline outbox
|
|
2065
2065
|
// Whenever an issue is being created, a reducer addIssue() is responsible for adding it to the offline store
|
|
@@ -2091,15 +2091,15 @@ const selectDeletedRequests = (state) => state.outboxReducer.deletedRequests;
|
|
|
2091
2091
|
const selectLatestRetryTime = (state) => state.outboxReducer.latestRetryTime;
|
|
2092
2092
|
const { enqueueRequest, markForDeletion, markAsDeleted, _setLatestRetryTime } = outboxSlice.actions;
|
|
2093
2093
|
const outboxReducer = outboxSlice.reducer;
|
|
2094
|
-
const initialState$
|
|
2094
|
+
const initialState$j = {
|
|
2095
2095
|
projectFiles: {},
|
|
2096
2096
|
activeProjectFileId: null,
|
|
2097
2097
|
isImportingProjectFile: false
|
|
2098
2098
|
};
|
|
2099
2099
|
const projectFileSlice = createSlice({
|
|
2100
2100
|
name: "projectFiles",
|
|
2101
|
-
initialState: initialState$
|
|
2102
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2101
|
+
initialState: initialState$j,
|
|
2102
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$j)),
|
|
2103
2103
|
reducers: {
|
|
2104
2104
|
addOrReplaceProjectFiles: (state, action) => {
|
|
2105
2105
|
for (let fileObj of action.payload) {
|
|
@@ -2184,11 +2184,11 @@ const selectProjectFileById = (id) => (state) => {
|
|
|
2184
2184
|
};
|
|
2185
2185
|
const projectFileReducer = projectFileSlice.reducer;
|
|
2186
2186
|
const projectAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
2187
|
-
const initialState$
|
|
2187
|
+
const initialState$i = projectAttachmentAdapter.getInitialState({});
|
|
2188
2188
|
const projectAttachmentSlice = createSlice({
|
|
2189
2189
|
name: "projectAttachments",
|
|
2190
|
-
initialState: initialState$
|
|
2191
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2190
|
+
initialState: initialState$i,
|
|
2191
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$i)),
|
|
2192
2192
|
reducers: {
|
|
2193
2193
|
initializeProjectAttachments: projectAttachmentAdapter.initialize,
|
|
2194
2194
|
addProjectAttachment: projectAttachmentAdapter.addOne,
|
|
@@ -2246,12 +2246,12 @@ const selectAttachmentsOfProjectByType = restructureCreateSelectorWithArgs(
|
|
|
2246
2246
|
)
|
|
2247
2247
|
);
|
|
2248
2248
|
const projectAttachmentReducer = projectAttachmentSlice.reducer;
|
|
2249
|
-
const initialState$
|
|
2249
|
+
const initialState$h = {
|
|
2250
2250
|
isRehydrated: false
|
|
2251
2251
|
};
|
|
2252
2252
|
const rehydratedSlice = createSlice({
|
|
2253
2253
|
name: "rehydrated",
|
|
2254
|
-
initialState: initialState$
|
|
2254
|
+
initialState: initialState$h,
|
|
2255
2255
|
// The `reducers` field lets us define reducers and generate associated actions
|
|
2256
2256
|
reducers: {
|
|
2257
2257
|
setRehydrated: (state, action) => {
|
|
@@ -2262,13 +2262,13 @@ const rehydratedSlice = createSlice({
|
|
|
2262
2262
|
const { setRehydrated } = rehydratedSlice.actions;
|
|
2263
2263
|
const selectRehydrated = (state) => state.rehydratedReducer.isRehydrated;
|
|
2264
2264
|
const rehydratedReducer = rehydratedSlice.reducer;
|
|
2265
|
-
const initialState$
|
|
2265
|
+
const initialState$g = {
|
|
2266
2266
|
isFetchingInitialData: false
|
|
2267
2267
|
};
|
|
2268
2268
|
const settingSlice = createSlice({
|
|
2269
2269
|
name: "settings",
|
|
2270
|
-
initialState: initialState$
|
|
2271
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2270
|
+
initialState: initialState$g,
|
|
2271
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$g)),
|
|
2272
2272
|
reducers: {
|
|
2273
2273
|
setIsFetchingInitialData: (state, action) => {
|
|
2274
2274
|
state.isFetchingInitialData = action.payload;
|
|
@@ -2292,11 +2292,11 @@ const formRevisionSortFn = (formRevisionA, formRevisionB) => {
|
|
|
2292
2292
|
}
|
|
2293
2293
|
};
|
|
2294
2294
|
const formRevisionAdapter = createModelAdapter((revision) => revision.offline_id);
|
|
2295
|
-
const initialState$
|
|
2295
|
+
const initialState$f = formRevisionAdapter.getInitialState({});
|
|
2296
2296
|
const formRevisionsSlice = createSlice({
|
|
2297
2297
|
name: "formRevisions",
|
|
2298
|
-
initialState: initialState$
|
|
2299
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2298
|
+
initialState: initialState$f,
|
|
2299
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$f)),
|
|
2300
2300
|
reducers: {
|
|
2301
2301
|
initializeFormRevisions: formRevisionAdapter.initialize,
|
|
2302
2302
|
setFormRevision: formRevisionAdapter.setOne,
|
|
@@ -2396,11 +2396,11 @@ const selectLatestFormRevisionByForm = createSelector([selectFormRevisionMapping
|
|
|
2396
2396
|
});
|
|
2397
2397
|
const formRevisionReducer = formRevisionsSlice.reducer;
|
|
2398
2398
|
const formAdapter = createModelAdapter((form) => form.offline_id);
|
|
2399
|
-
const initialState$
|
|
2399
|
+
const initialState$e = formAdapter.getInitialState({});
|
|
2400
2400
|
const formSlice = createSlice({
|
|
2401
2401
|
name: "forms",
|
|
2402
|
-
initialState: initialState$
|
|
2403
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2402
|
+
initialState: initialState$e,
|
|
2403
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$e)),
|
|
2404
2404
|
reducers: {
|
|
2405
2405
|
initializeForms: formAdapter.initialize,
|
|
2406
2406
|
setForm: formAdapter.setOne,
|
|
@@ -2480,11 +2480,11 @@ const selectGeneralFormCount = createSelector([selectFormMapping], (formsMapping
|
|
|
2480
2480
|
});
|
|
2481
2481
|
const formReducer = formSlice.reducer;
|
|
2482
2482
|
const submissionAdapter = createModelAdapter((submission) => submission.offline_id);
|
|
2483
|
-
const initialState$
|
|
2483
|
+
const initialState$d = submissionAdapter.getInitialState({});
|
|
2484
2484
|
const formSubmissionSlice = createSlice({
|
|
2485
2485
|
name: "formSubmissions",
|
|
2486
|
-
initialState: initialState$
|
|
2487
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2486
|
+
initialState: initialState$d,
|
|
2487
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$d)),
|
|
2488
2488
|
reducers: {
|
|
2489
2489
|
initializeFormSubmissions: submissionAdapter.initialize,
|
|
2490
2490
|
setFormSubmission: submissionAdapter.setOne,
|
|
@@ -2692,11 +2692,11 @@ const formSubmissionReducer = formSubmissionSlice.reducer;
|
|
|
2692
2692
|
const formSubmissionAttachmentAdapter = createModelAdapter(
|
|
2693
2693
|
(attachment) => attachment.offline_id
|
|
2694
2694
|
);
|
|
2695
|
-
const initialState$
|
|
2695
|
+
const initialState$c = formSubmissionAttachmentAdapter.getInitialState({});
|
|
2696
2696
|
const formSubmissionAttachmentSlice = createSlice({
|
|
2697
2697
|
name: "formSubmissionAttachments",
|
|
2698
|
-
initialState: initialState$
|
|
2699
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2698
|
+
initialState: initialState$c,
|
|
2699
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$c)),
|
|
2700
2700
|
reducers: {
|
|
2701
2701
|
initializeFormSubmissionAttachments: formSubmissionAttachmentAdapter.initialize,
|
|
2702
2702
|
addFormSubmissionAttachment: formSubmissionAttachmentAdapter.addOne,
|
|
@@ -2735,11 +2735,11 @@ const formSubmissionAttachmentReducer = formSubmissionAttachmentSlice.reducer;
|
|
|
2735
2735
|
const formRevisionAttachmentAdapter = createModelAdapter(
|
|
2736
2736
|
(attachment) => attachment.offline_id
|
|
2737
2737
|
);
|
|
2738
|
-
const initialState$
|
|
2738
|
+
const initialState$b = formRevisionAttachmentAdapter.getInitialState({});
|
|
2739
2739
|
const formRevisionAttachmentSlice = createSlice({
|
|
2740
2740
|
name: "formRevisionAttachments",
|
|
2741
|
-
initialState: initialState$
|
|
2742
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2741
|
+
initialState: initialState$b,
|
|
2742
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$b)),
|
|
2743
2743
|
reducers: {
|
|
2744
2744
|
initializeFormRevisionAttachments: formRevisionAttachmentAdapter.initialize,
|
|
2745
2745
|
addFormRevisionAttachment: formRevisionAttachmentAdapter.addOne,
|
|
@@ -2776,10 +2776,10 @@ const selectAttachmentsOfFormRevision = restructureCreateSelectorWithArgs(
|
|
|
2776
2776
|
);
|
|
2777
2777
|
const formRevisionAttachmentReducer = formRevisionAttachmentSlice.reducer;
|
|
2778
2778
|
const emailDomainAdapter = createModelAdapter((emailDomain) => emailDomain.offline_id);
|
|
2779
|
-
const initialState$
|
|
2779
|
+
const initialState$a = emailDomainAdapter.getInitialState({});
|
|
2780
2780
|
const emailDomainsSlice = createSlice({
|
|
2781
2781
|
name: "emailDomains",
|
|
2782
|
-
initialState: initialState$
|
|
2782
|
+
initialState: initialState$a,
|
|
2783
2783
|
reducers: {
|
|
2784
2784
|
initializeEmailDomains: emailDomainAdapter.initialize,
|
|
2785
2785
|
addEmailDomain: emailDomainAdapter.addOne,
|
|
@@ -2798,14 +2798,14 @@ const selectEmailDomainsOfOrganization = restructureCreateSelectorWithArgs(
|
|
|
2798
2798
|
)
|
|
2799
2799
|
);
|
|
2800
2800
|
const emailDomainsReducer = emailDomainsSlice.reducer;
|
|
2801
|
-
const initialState$
|
|
2801
|
+
const initialState$9 = {
|
|
2802
2802
|
documents: {}
|
|
2803
2803
|
};
|
|
2804
2804
|
const documentSlice = createSlice({
|
|
2805
2805
|
name: "documents",
|
|
2806
|
-
initialState: initialState$
|
|
2806
|
+
initialState: initialState$9,
|
|
2807
2807
|
extraReducers: (builder) => builder.addCase("RESET", (state) => {
|
|
2808
|
-
Object.assign(state, initialState$
|
|
2808
|
+
Object.assign(state, initialState$9);
|
|
2809
2809
|
}),
|
|
2810
2810
|
reducers: {
|
|
2811
2811
|
setDocuments: (state, action) => {
|
|
@@ -2980,11 +2980,11 @@ const selectRootDocuments = createSelector(
|
|
|
2980
2980
|
);
|
|
2981
2981
|
const documentsReducer = documentSlice.reducer;
|
|
2982
2982
|
const documentAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
2983
|
-
const initialState$
|
|
2983
|
+
const initialState$8 = documentAttachmentAdapter.getInitialState({});
|
|
2984
2984
|
const documentAttachmentSlice = createSlice({
|
|
2985
2985
|
name: "documentAttachments",
|
|
2986
|
-
initialState: initialState$
|
|
2987
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
2986
|
+
initialState: initialState$8,
|
|
2987
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$8)),
|
|
2988
2988
|
reducers: {
|
|
2989
2989
|
initializeDocumentAttachments: documentAttachmentAdapter.initialize,
|
|
2990
2990
|
addDocumentAttachment: documentAttachmentAdapter.addOne,
|
|
@@ -3043,11 +3043,11 @@ const selectAttachmentsOfDocumentByType = restructureCreateSelectorWithArgs(
|
|
|
3043
3043
|
);
|
|
3044
3044
|
const documentAttachmentReducer = documentAttachmentSlice.reducer;
|
|
3045
3045
|
const teamAdapter = createModelAdapter((team) => team.offline_id);
|
|
3046
|
-
const initialState$
|
|
3046
|
+
const initialState$7 = teamAdapter.getInitialState({});
|
|
3047
3047
|
const teamSlice = createSlice({
|
|
3048
3048
|
name: "teams",
|
|
3049
|
-
initialState: initialState$
|
|
3050
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3049
|
+
initialState: initialState$7,
|
|
3050
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$7)),
|
|
3051
3051
|
reducers: {
|
|
3052
3052
|
setTeam: teamAdapter.setOne,
|
|
3053
3053
|
initializeTeams: teamAdapter.initialize,
|
|
@@ -3081,11 +3081,11 @@ const teamReducer = teamSlice.reducer;
|
|
|
3081
3081
|
const agentUserConversationAdapter = createModelAdapter(
|
|
3082
3082
|
(conversation) => conversation.offline_id
|
|
3083
3083
|
);
|
|
3084
|
-
const initialState$
|
|
3084
|
+
const initialState$6 = agentUserConversationAdapter.getInitialState({});
|
|
3085
3085
|
const agentsSlice = createSlice({
|
|
3086
3086
|
name: "agents",
|
|
3087
|
-
initialState: initialState$
|
|
3088
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3087
|
+
initialState: initialState$6,
|
|
3088
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$6)),
|
|
3089
3089
|
reducers: {
|
|
3090
3090
|
initializeConversations: agentUserConversationAdapter.initialize,
|
|
3091
3091
|
addConversation: agentUserConversationAdapter.addOne,
|
|
@@ -3107,11 +3107,11 @@ const selectConversation = restructureCreateSelectorWithArgs(
|
|
|
3107
3107
|
);
|
|
3108
3108
|
const agentsReducer = agentsSlice.reducer;
|
|
3109
3109
|
const issueCommentAdapter = createModelAdapter((comment) => comment.offline_id);
|
|
3110
|
-
const initialState$
|
|
3110
|
+
const initialState$5 = issueCommentAdapter.getInitialState({});
|
|
3111
3111
|
const issueCommentSlice = createSlice({
|
|
3112
3112
|
name: "issueComments",
|
|
3113
|
-
initialState: initialState$
|
|
3114
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3113
|
+
initialState: initialState$5,
|
|
3114
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$5)),
|
|
3115
3115
|
reducers: {
|
|
3116
3116
|
addIssueComment: issueCommentAdapter.addOne,
|
|
3117
3117
|
addIssueComments: issueCommentAdapter.addMany,
|
|
@@ -3140,11 +3140,11 @@ const selectCommentsOfIssue = restructureCreateSelectorWithArgs(
|
|
|
3140
3140
|
);
|
|
3141
3141
|
const issueCommentReducer = issueCommentSlice.reducer;
|
|
3142
3142
|
const issueUpdateAdapter = createModelAdapter((issueUpdate) => issueUpdate.offline_id);
|
|
3143
|
-
const initialState$
|
|
3143
|
+
const initialState$4 = issueUpdateAdapter.getInitialState({});
|
|
3144
3144
|
const issueUpdateSlice = createSlice({
|
|
3145
3145
|
name: "issueUpdates",
|
|
3146
|
-
initialState: initialState$
|
|
3147
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3146
|
+
initialState: initialState$4,
|
|
3147
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$4)),
|
|
3148
3148
|
reducers: {
|
|
3149
3149
|
initializeIssueUpdates: issueUpdateAdapter.setMany,
|
|
3150
3150
|
setIssueUpdate: issueUpdateAdapter.setOne,
|
|
@@ -3173,11 +3173,11 @@ const selectIssueUpdatesOfIssue = restructureCreateSelectorWithArgs(
|
|
|
3173
3173
|
);
|
|
3174
3174
|
const issueUpdateReducer = issueUpdateSlice.reducer;
|
|
3175
3175
|
const issueAttachmentAdapter = createModelAdapter((attachment) => attachment.offline_id);
|
|
3176
|
-
const initialState$
|
|
3176
|
+
const initialState$3 = issueAttachmentAdapter.getInitialState({});
|
|
3177
3177
|
const issueAttachmentSlice = createSlice({
|
|
3178
3178
|
name: "issueAttachments",
|
|
3179
|
-
initialState: initialState$
|
|
3180
|
-
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$
|
|
3179
|
+
initialState: initialState$3,
|
|
3180
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState$3)),
|
|
3181
3181
|
reducers: {
|
|
3182
3182
|
initializeIssueAttachments: issueAttachmentAdapter.initialize,
|
|
3183
3183
|
addIssueAttachment: issueAttachmentAdapter.addOne,
|
|
@@ -3235,23 +3235,23 @@ const selectAttachmentsOfIssueByType = restructureCreateSelectorWithArgs(
|
|
|
3235
3235
|
)
|
|
3236
3236
|
);
|
|
3237
3237
|
const issueAttachmentReducer = issueAttachmentSlice.reducer;
|
|
3238
|
-
const initialState$
|
|
3238
|
+
const initialState$2 = {
|
|
3239
3239
|
version: 0
|
|
3240
3240
|
};
|
|
3241
3241
|
const versioningSlice = createSlice({
|
|
3242
3242
|
name: "versioning",
|
|
3243
|
-
initialState: initialState$
|
|
3243
|
+
initialState: initialState$2,
|
|
3244
3244
|
reducers: {}
|
|
3245
3245
|
});
|
|
3246
3246
|
const versioningReducer = versioningSlice.reducer;
|
|
3247
3247
|
const geoImageAdapter = createModelAdapter((model) => model.offline_id);
|
|
3248
|
-
const initialState = geoImageAdapter.getInitialState({});
|
|
3248
|
+
const initialState$1 = geoImageAdapter.getInitialState({});
|
|
3249
3249
|
const geoImageSlice = createSlice({
|
|
3250
3250
|
name: "geoImages",
|
|
3251
|
-
initialState,
|
|
3251
|
+
initialState: initialState$1,
|
|
3252
3252
|
extraReducers: (builder) => {
|
|
3253
3253
|
builder.addCase("RESET", (state) => {
|
|
3254
|
-
Object.assign(state, initialState);
|
|
3254
|
+
Object.assign(state, initialState$1);
|
|
3255
3255
|
});
|
|
3256
3256
|
},
|
|
3257
3257
|
reducers: {
|
|
@@ -3288,6 +3288,50 @@ const selectGeoImagesOfProject = restructureCreateSelectorWithArgs(
|
|
|
3288
3288
|
})
|
|
3289
3289
|
);
|
|
3290
3290
|
const geoImageReducer = geoImageSlice.reducer;
|
|
3291
|
+
const issueAssociationAdapter = createModelAdapter((assoc) => assoc.offline_id);
|
|
3292
|
+
const initialState = issueAssociationAdapter.getInitialState({});
|
|
3293
|
+
const issueAssociationSlice = createSlice({
|
|
3294
|
+
name: "issueAssociations",
|
|
3295
|
+
initialState,
|
|
3296
|
+
extraReducers: (builder) => builder.addCase("RESET", (state) => Object.assign(state, initialState)),
|
|
3297
|
+
reducers: {
|
|
3298
|
+
initializeIssueAssociations: issueAssociationAdapter.initialize,
|
|
3299
|
+
addIssueAssociation: issueAssociationAdapter.addOne,
|
|
3300
|
+
addIssueAssociations: issueAssociationAdapter.addMany,
|
|
3301
|
+
setIssueAssociation: issueAssociationAdapter.setOne,
|
|
3302
|
+
setIssueAssociations: issueAssociationAdapter.setMany,
|
|
3303
|
+
updateIssueAssociation: issueAssociationAdapter.updateOne,
|
|
3304
|
+
updateIssueAssociations: issueAssociationAdapter.updateMany,
|
|
3305
|
+
deleteIssueAssociation: issueAssociationAdapter.deleteOne,
|
|
3306
|
+
deleteIssueAssociations: issueAssociationAdapter.deleteMany
|
|
3307
|
+
}
|
|
3308
|
+
});
|
|
3309
|
+
const {
|
|
3310
|
+
initializeIssueAssociations,
|
|
3311
|
+
setIssueAssociations,
|
|
3312
|
+
setIssueAssociation,
|
|
3313
|
+
updateIssueAssociation,
|
|
3314
|
+
updateIssueAssociations,
|
|
3315
|
+
addIssueAssociation,
|
|
3316
|
+
addIssueAssociations,
|
|
3317
|
+
deleteIssueAssociation,
|
|
3318
|
+
deleteIssueAssociations
|
|
3319
|
+
} = issueAssociationSlice.actions;
|
|
3320
|
+
const selectIssueAssociationMapping = (state) => state.issueAssociationReducer.instances;
|
|
3321
|
+
const selectIssueAssociationById = (id) => (state) => {
|
|
3322
|
+
return state.issueAssociationReducer.instances[id];
|
|
3323
|
+
};
|
|
3324
|
+
const selectAssociationsOfIssue = restructureCreateSelectorWithArgs(
|
|
3325
|
+
createSelector(
|
|
3326
|
+
[selectIssueAssociationMapping, (_state, issueId) => issueId],
|
|
3327
|
+
(associationMapping, issueId) => {
|
|
3328
|
+
return Object.values(associationMapping).filter(
|
|
3329
|
+
(assoc) => assoc.issue === issueId
|
|
3330
|
+
);
|
|
3331
|
+
}
|
|
3332
|
+
)
|
|
3333
|
+
);
|
|
3334
|
+
const issueAssociationReducer = issueAssociationSlice.reducer;
|
|
3291
3335
|
const fullAssetMarkerSize = 45;
|
|
3292
3336
|
const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
|
|
3293
3337
|
const DEFAULT_ISSUE_PRIORITY = IssuePriority.MEDIUM;
|
|
@@ -3360,7 +3404,8 @@ const overmapReducers = {
|
|
|
3360
3404
|
agentsReducer,
|
|
3361
3405
|
issueCommentReducer,
|
|
3362
3406
|
issueUpdateReducer,
|
|
3363
|
-
geoImageReducer
|
|
3407
|
+
geoImageReducer,
|
|
3408
|
+
issueAssociationReducer
|
|
3364
3409
|
};
|
|
3365
3410
|
const overmapReducer = combineReducers(overmapReducers);
|
|
3366
3411
|
const resetStore = "RESET";
|
|
@@ -7245,6 +7290,72 @@ class GeoImageService extends BaseUploadService {
|
|
|
7245
7290
|
store.dispatch(initializeGeoImages(result));
|
|
7246
7291
|
}
|
|
7247
7292
|
}
|
|
7293
|
+
class IssueAssociationService extends BaseUploadService {
|
|
7294
|
+
add(payload) {
|
|
7295
|
+
const { store } = this.client;
|
|
7296
|
+
const submittedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
7297
|
+
const createdBy = store.getState().userReducer.currentUser.id;
|
|
7298
|
+
const offlineIssueAssociation = offline({
|
|
7299
|
+
...payload,
|
|
7300
|
+
submitted_at: submittedAt,
|
|
7301
|
+
created_by: createdBy
|
|
7302
|
+
});
|
|
7303
|
+
this.dispatch(addIssueAssociation(offlineIssueAssociation));
|
|
7304
|
+
const promise = this.enqueueRequest({
|
|
7305
|
+
description: "Add issue association",
|
|
7306
|
+
method: HttpMethod.POST,
|
|
7307
|
+
url: "/issues/associations/",
|
|
7308
|
+
payload: {
|
|
7309
|
+
offline_id: offlineIssueAssociation.offline_id,
|
|
7310
|
+
submitted_at: submittedAt,
|
|
7311
|
+
created_by: createdBy,
|
|
7312
|
+
...payload
|
|
7313
|
+
},
|
|
7314
|
+
blockers: [
|
|
7315
|
+
payload.associated_issue,
|
|
7316
|
+
...payload.issue ? [payload.issue] : [],
|
|
7317
|
+
...payload.asset ? [payload.asset] : []
|
|
7318
|
+
],
|
|
7319
|
+
blocks: [offlineIssueAssociation.offline_id]
|
|
7320
|
+
});
|
|
7321
|
+
promise.then((issueAssociation) => {
|
|
7322
|
+
this.dispatch(updateIssueAssociation(issueAssociation));
|
|
7323
|
+
}).catch(() => {
|
|
7324
|
+
this.dispatch(deleteIssueAssociation(offlineIssueAssociation.offline_id));
|
|
7325
|
+
});
|
|
7326
|
+
return [offlineIssueAssociation, promise];
|
|
7327
|
+
}
|
|
7328
|
+
async delete(id) {
|
|
7329
|
+
const { store } = this.client;
|
|
7330
|
+
const issueAssociation = selectIssueAssociationById(id)(store.getState());
|
|
7331
|
+
if (!issueAssociation) {
|
|
7332
|
+
throw new Error(`Issue association with id ${id} not found in store.`);
|
|
7333
|
+
}
|
|
7334
|
+
this.dispatch(deleteIssueAssociation(id));
|
|
7335
|
+
const promise = this.enqueueRequest({
|
|
7336
|
+
description: "Delete issue association",
|
|
7337
|
+
method: HttpMethod.DELETE,
|
|
7338
|
+
url: `/issues/associations/${id}/`,
|
|
7339
|
+
blockers: [id],
|
|
7340
|
+
blocks: []
|
|
7341
|
+
});
|
|
7342
|
+
promise.catch(() => {
|
|
7343
|
+
this.dispatch(addIssueAssociation(issueAssociation));
|
|
7344
|
+
});
|
|
7345
|
+
return promise;
|
|
7346
|
+
}
|
|
7347
|
+
async refreshStore(projectId) {
|
|
7348
|
+
const issueAssociations = await this.enqueueRequest({
|
|
7349
|
+
description: "Fetch issue associations",
|
|
7350
|
+
method: HttpMethod.GET,
|
|
7351
|
+
url: "/issues/associations/",
|
|
7352
|
+
queryParams: { project_id: projectId.toString() },
|
|
7353
|
+
blockers: [],
|
|
7354
|
+
blocks: []
|
|
7355
|
+
});
|
|
7356
|
+
this.dispatch(initializeIssueAssociations(issueAssociations));
|
|
7357
|
+
}
|
|
7358
|
+
}
|
|
7248
7359
|
export {
|
|
7249
7360
|
APIError,
|
|
7250
7361
|
AgentService,
|
|
@@ -7273,6 +7384,7 @@ export {
|
|
|
7273
7384
|
GREEN,
|
|
7274
7385
|
GeoImageService,
|
|
7275
7386
|
HttpMethod,
|
|
7387
|
+
IssueAssociationService,
|
|
7276
7388
|
IssueAttachmentService,
|
|
7277
7389
|
IssueCommentService,
|
|
7278
7390
|
IssuePriority,
|
|
@@ -7334,6 +7446,8 @@ export {
|
|
|
7334
7446
|
addGeoImage,
|
|
7335
7447
|
addGeoImages,
|
|
7336
7448
|
addIssue,
|
|
7449
|
+
addIssueAssociation,
|
|
7450
|
+
addIssueAssociations,
|
|
7337
7451
|
addIssueAttachment,
|
|
7338
7452
|
addIssueAttachments,
|
|
7339
7453
|
addIssueComment,
|
|
@@ -7411,6 +7525,8 @@ export {
|
|
|
7411
7525
|
deleteGeoImage,
|
|
7412
7526
|
deleteGeoImages,
|
|
7413
7527
|
deleteIssue,
|
|
7528
|
+
deleteIssueAssociation,
|
|
7529
|
+
deleteIssueAssociations,
|
|
7414
7530
|
deleteIssueAttachment,
|
|
7415
7531
|
deleteIssueAttachments,
|
|
7416
7532
|
deleteIssueComment,
|
|
@@ -7483,6 +7599,7 @@ export {
|
|
|
7483
7599
|
initializeFormSubmissions,
|
|
7484
7600
|
initializeForms,
|
|
7485
7601
|
initializeGeoImages,
|
|
7602
|
+
initializeIssueAssociations,
|
|
7486
7603
|
initializeIssueAttachments,
|
|
7487
7604
|
initializeIssueTypes,
|
|
7488
7605
|
initializeIssueUpdates,
|
|
@@ -7495,6 +7612,8 @@ export {
|
|
|
7495
7612
|
initializeTeams,
|
|
7496
7613
|
initializeWorkspaces,
|
|
7497
7614
|
isToday,
|
|
7615
|
+
issueAssociationReducer,
|
|
7616
|
+
issueAssociationSlice,
|
|
7498
7617
|
issueAttachmentReducer,
|
|
7499
7618
|
issueAttachmentSlice,
|
|
7500
7619
|
issueCommentReducer,
|
|
@@ -7584,6 +7703,7 @@ export {
|
|
|
7584
7703
|
selectAssets,
|
|
7585
7704
|
selectAssetsMapping,
|
|
7586
7705
|
selectAssetsOfAssetType,
|
|
7706
|
+
selectAssociationsOfIssue,
|
|
7587
7707
|
selectAttachedFormSubmissionsOfAsset,
|
|
7588
7708
|
selectAttachedFormSubmissionsOfIssue,
|
|
7589
7709
|
selectAttachmentsOfAsset,
|
|
@@ -7650,6 +7770,8 @@ export {
|
|
|
7650
7770
|
selectIsImportingProjectFile,
|
|
7651
7771
|
selectIsLoggedIn,
|
|
7652
7772
|
selectIssue,
|
|
7773
|
+
selectIssueAssociationById,
|
|
7774
|
+
selectIssueAssociationMapping,
|
|
7653
7775
|
selectIssueAttachment,
|
|
7654
7776
|
selectIssueAttachmentMapping,
|
|
7655
7777
|
selectIssueAttachments,
|
|
@@ -7754,6 +7876,8 @@ export {
|
|
|
7754
7876
|
setGeoImages,
|
|
7755
7877
|
setIsFetchingInitialData,
|
|
7756
7878
|
setIsImportingProjectFile,
|
|
7879
|
+
setIssueAssociation,
|
|
7880
|
+
setIssueAssociations,
|
|
7757
7881
|
setIssueAttachment,
|
|
7758
7882
|
setIssueAttachments,
|
|
7759
7883
|
setIssueComment,
|
|
@@ -7807,6 +7931,8 @@ export {
|
|
|
7807
7931
|
updateGeoImage,
|
|
7808
7932
|
updateGeoImages,
|
|
7809
7933
|
updateIssue,
|
|
7934
|
+
updateIssueAssociation,
|
|
7935
|
+
updateIssueAssociations,
|
|
7810
7936
|
updateIssueAttachment,
|
|
7811
7937
|
updateIssueAttachments,
|
|
7812
7938
|
updateIssueType,
|